diff --git a/src/azure-firewall/HISTORY.rst b/src/azure-firewall/HISTORY.rst index 2d55f10b198..9927f705c39 100644 --- a/src/azure-firewall/HISTORY.rst +++ b/src/azure-firewall/HISTORY.rst @@ -2,6 +2,9 @@ Release History =============== +0.14.0 +++++++ +* `az network firewall policy intrusion-detection add`: add new parameter --private-ranges 0.13.0 ++++++ diff --git a/src/azure-firewall/azext_firewall/__init__.py b/src/azure-firewall/azext_firewall/__init__.py index dfd0e22e2dc..5e448dd1d7f 100644 --- a/src/azure-firewall/azext_firewall/__init__.py +++ b/src/azure-firewall/azext_firewall/__init__.py @@ -14,9 +14,9 @@ class AzureFirewallCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType from .profiles import CUSTOM_FIREWALL - register_resource_type('latest', CUSTOM_FIREWALL, '2020-07-01') + register_resource_type('latest', CUSTOM_FIREWALL, '2021-08-01') - super(AzureFirewallCommandsLoader, self).__init__( + super().__init__( cli_ctx=cli_ctx, custom_command_type=CliCommandType(operations_tmpl='azext_firewall.custom#{}'), resource_type=CUSTOM_FIREWALL diff --git a/src/azure-firewall/azext_firewall/_client_factory.py b/src/azure-firewall/azext_firewall/_client_factory.py index 7c02e4be9ae..6bb6657eafa 100644 --- a/src/azure-firewall/azext_firewall/_client_factory.py +++ b/src/azure-firewall/azext_firewall/_client_factory.py @@ -8,7 +8,7 @@ def network_client_factory(cli_ctx, aux_subscriptions=None, **_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from .profiles import CUSTOM_FIREWALL return get_mgmt_service_client(cli_ctx, CUSTOM_FIREWALL, aux_subscriptions=aux_subscriptions, - api_version='2020-07-01') + api_version='2021-08-01') def cf_firewalls(cli_ctx, _): diff --git a/src/azure-firewall/azext_firewall/_help.py b/src/azure-firewall/azext_firewall/_help.py index b5135f46416..75bdf15def2 100644 --- a/src/azure-firewall/azext_firewall/_help.py +++ b/src/azure-firewall/azext_firewall/_help.py @@ -349,7 +349,7 @@ helps['network firewall policy intrusion-detection add'] = """ type: command - short-summary: Add overrided intrusion signature or a bypass rule for intrusion detection + short-summary: Add overrided intrusion signature or a bypass rule or private ranges list for intrusion detection """ helps['network firewall policy intrusion-detection list'] = """ diff --git a/src/azure-firewall/azext_firewall/_params.py b/src/azure-firewall/azext_firewall/_params.py index b548038c601..6958c358d5e 100644 --- a/src/azure-firewall/azext_firewall/_params.py +++ b/src/azure-firewall/azext_firewall/_params.py @@ -24,7 +24,6 @@ # pylint: disable=too-many-locals, too-many-branches, too-many-statements def load_arguments(self, _): - (AzureFirewallNetworkRuleProtocol, AzureFirewallRCActionType, AzureFirewallNatRCActionType, FirewallPolicySkuTier, FirewallPolicyIntrusionDetectionStateType, FirewallPolicyIntrusionDetectionProtocol, AzureFirewallSkuTier) = \ @@ -84,7 +83,7 @@ def load_arguments(self, _): c.argument('fqdns', nargs='+', validator=process_threat_intel_allowlist_fqdns, help='Space-separated list of FQDNs.') for scope in ['network-rule', 'nat-rule']: - with self.argument_context('network firewall {}'.format(scope)) as c: + with self.argument_context(f'network firewall {scope}') as c: c.argument('protocols', arg_type=get_enum_type(AzureFirewallNetworkRuleProtocol), nargs='+', help='Space-separated list of protocols.') with self.argument_context('network firewall application-rule') as c: @@ -98,30 +97,30 @@ def load_arguments(self, _): {'name': 'application-rule', 'display': 'application rule', 'ref': 'application_rule_collections'}, ] for item in af_sub_subresources: - with self.argument_context('network firewall {}'.format(item['name'])) as c: - c.argument('item_name', options_list=['--name', '-n'], help='The name of the {}'.format(item['display']), completer=get_af_subresource_completion_list(item['ref']), id_part='child_name_2') + with self.argument_context(f'network firewall {item["name"]}') as c: + c.argument('item_name', options_list=['--name', '-n'], help=f'The name of the {item["display"]}', completer=get_af_subresource_completion_list(item['ref']), id_part='child_name_2') c.argument('collection_name', collection_name_type) c.argument('firewall_name', firewall_name_type) c.argument('azure_firewall_name', firewall_name_type) - with self.argument_context('network firewall {} list'.format(item['name'])) as c: - c.argument('item_name', options_list=['--name', '-n'], help='The name of the {}'.format(item['display']), completer=get_af_subresource_completion_list(item['ref']), id_part='child_name_2') + with self.argument_context(f'network firewall {item["name"]} list') as c: + c.argument('item_name', options_list=['--name', '-n'], help=f'The name of the {item["display"]}', completer=get_af_subresource_completion_list(item['ref']), id_part='child_name_2') c.argument('firewall_name', firewall_name_type, id_part=None) - with self.argument_context('network firewall {} create'.format(item['name']), arg_group='Collection') as c: + with self.argument_context(f'network firewall {item["name"]} create', arg_group='Collection') as c: c.argument('collection_name', collection_name_type, help='Name of the collection to create the rule in. Will create the collection if it does not exist.') c.argument('priority', help='Priority of the rule collection from 100 (high) to 65000 (low). Supply only if you want to create the collection.', type=int) - with self.argument_context('network firewall {} collection'.format(item['name'])) as c: + with self.argument_context(f'network firewall {item["name"]} collection') as c: c.argument('item_name', collection_name_type) c.argument('resource_name', firewall_name_type) - with self.argument_context('network firewall {} collection list'.format(item['name'])) as c: + with self.argument_context(f'network firewall {item["name"]} collection list') as c: c.argument('item_name', collection_name_type) c.argument('resource_name', firewall_name_type, id_part=None) for scope in ['network-rule', 'application-rule']: - with self.argument_context('network firewall {}'.format(scope), arg_group='Collection') as c: + with self.argument_context(f'network firewall {scope}', arg_group='Collection') as c: c.argument('action', arg_type=get_enum_type(AzureFirewallRCActionType), help='The action to apply for the rule collection. Supply only if you want to create the collection.') with self.argument_context('network firewall nat-rule', arg_group='Collection') as c: @@ -199,6 +198,9 @@ def load_arguments(self, _): c.argument('bypass_rule_source_ip_groups', options_list=['--rule-src-ip-groups'], nargs='+', help='Space-separated list of source IpGroups for this rule') c.argument('bypass_rule_destination_ip_groups', options_list=['--rule-dest-ip-groups'], nargs='+', help='Space-separated list of destination IpGroups for this rule') + with self.argument_context('network firewall policy intrusion-detection', min_api='2021-08-01', arg_group='IDPS Private Ranges') as c: + c.argument('private_ranges', nargs='+', options_list=["--private-ranges"], help='Space-separated list of IDPS private ranges') + with self.argument_context('network firewall policy rule-collection-group') as c: c.argument('firewall_policy_name', options_list=['--policy-name'], help='The name of the Firewall Policy.') c.argument('rule_collection_group_name', options_list=['--name', '-n'], help='The name of the Firewall Policy Rule Collection Group.') diff --git a/src/azure-firewall/azext_firewall/_util.py b/src/azure-firewall/azext_firewall/_util.py index f25c522f6d6..576cfa07949 100644 --- a/src/azure-firewall/azext_firewall/_util.py +++ b/src/azure-firewall/azext_firewall/_util.py @@ -15,7 +15,7 @@ def _get_property(items, name): result = next((x for x in items if x.name.lower() == name.lower()), None) if not result: - raise CLIError("Property '{}' does not exist".format(name)) + raise CLIError(f"Property '{name}' does not exist") return result @@ -33,7 +33,7 @@ def list_func(cmd, resource_group_name, resource_name): client = getattr(network_client_factory(cmd.cli_ctx), resource) return client.get(resource_group_name, resource_name).__getattribute__(prop) - func_name = 'list_network_resource_property_{}_{}'.format(resource, prop) + func_name = f'list_network_resource_property_{resource}_{prop}' setattr(sys.modules[__name__], func_name, list_func) return func_name @@ -47,11 +47,10 @@ def get_func(cmd, resource_group_name, resource_name, item_name): result = next((x for x in items if x.name.lower() == item_name.lower()), None) if not result: - raise CLIError("Item '{}' does not exist on {} '{}'".format( - item_name, resource, resource_name)) + raise CLIError(f"Item '{item_name}' does not exist on {resource} '{resource_name}'") return result - func_name = 'get_network_resource_property_entry_{}_{}'.format(resource, prop) + func_name = f'get_network_resource_property_entry_{resource}_{prop}' setattr(sys.modules[__name__], func_name, get_func) return func_name @@ -68,10 +67,11 @@ def delete_func(cmd, resource_group_name, resource_name, item_name, no_wait=Fals if no_wait: sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, resource_name, item) else: - result = sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, resource_name, item).result() + result = sdk_no_wait(no_wait, client.begin_create_or_update, + resource_group_name, resource_name, item).result() if next((x for x in getattr(result, prop) if x.name.lower() == item_name.lower()), None): - raise CLIError("Failed to delete '{}' on '{}'".format(item_name, resource_name)) + raise CLIError(f"Failed to delete '{item_name}' on '{resource_name}'") - func_name = 'delete_network_resource_property_entry_{}_{}'.format(resource, prop) + func_name = f'delete_network_resource_property_entry_{resource}_{prop}' setattr(sys.modules[__name__], func_name, delete_func) return func_name diff --git a/src/azure-firewall/azext_firewall/commands.py b/src/azure-firewall/azext_firewall/commands.py index 3e325745e1d..1ff16af67eb 100644 --- a/src/azure-firewall/azext_firewall/commands.py +++ b/src/azure-firewall/azext_firewall/commands.py @@ -26,28 +26,28 @@ def load_command_table(self, _): ) network_firewall_sdk = CliCommandType( - operations_tmpl='azext_firewall.vendored_sdks.v2020_07_01.operations#AzureFirewallsOperations.{}', + operations_tmpl='azext_firewall.vendored_sdks.v2021_08_01.operations#AzureFirewallsOperations.{}', client_factory=cf_firewalls, resource_type=CUSTOM_FIREWALL, min_api='2018-08-01' ) network_firewall_fqdn_tags_sdk = CliCommandType( - operations_tmpl='azext_firewall.vendored_sdks.v2020_07_01.operations#AzureFirewallFqdnTagsOperations.{}', + operations_tmpl='azext_firewall.vendored_sdks.v2021_08_01.operations#AzureFirewallFqdnTagsOperations.{}', client_factory=cf_firewall_fqdn_tags, resource_type=CUSTOM_FIREWALL, min_api='2018-08-01' ) network_firewall_policies_sdk = CliCommandType( - operations_tmpl='azext_firewall.vendored_sdks.v2020_07_01.operations#FirewallPoliciesOperations.{}', + operations_tmpl='azext_firewall.vendored_sdks.v2021_08_01.operations#FirewallPoliciesOperations.{}', client_factory=cf_firewall_policies, resource_type=CUSTOM_FIREWALL, min_api='2019-07-01' ) network_firewall_policy_rule_groups = CliCommandType( - operations_tmpl='azext_firewall.vendored_sdks.v2020_07_01.operations#FirewallPolicyRuleCollectionGroupsOperations.{}', + operations_tmpl='azext_firewall.vendored_sdks.v2021_08_01.operations#FirewallPolicyRuleCollectionGroupsOperations.{}', client_factory=cf_firewall_policy_rule_collection_groups, resource_type=CUSTOM_FIREWALL, min_api='2019-07-01' @@ -99,11 +99,11 @@ def load_command_table(self, _): } for rule_type, af_rule in af_rules.items(): - with self.command_group('network firewall {}'.format(af_rule['scope']), network_firewall_sdk) as g: - g.custom_command('create', 'create_af_{}'.format(rule_type), validator=af_rule['validator']) - g.custom_command('list', build_af_rule_list(rule_type, '{}_collections'.format(rule_type))) - g.custom_show_command('show', build_af_rule_show(rule_type, '{}_collections'.format(rule_type))) - g.custom_command('delete', build_af_rule_delete(rule_type, '{}_collections'.format(rule_type))) + with self.command_group(f'network firewall {af_rule["scope"]}', network_firewall_sdk) as g: + g.custom_command('create', f'create_af_{rule_type}', validator=af_rule['validator']) + g.custom_command('list', build_af_rule_list(rule_type, f'{rule_type}_collections')) + g.custom_show_command('show', build_af_rule_show(rule_type, f'{rule_type}_collections')) + g.custom_command('delete', build_af_rule_delete(rule_type, f'{rule_type}_collections')) af_collections = { 'network_rule_collections': 'network-rule collection', @@ -111,7 +111,7 @@ def load_command_table(self, _): 'application_rule_collections': 'application-rule collection' } for subresource, scope in af_collections.items(): - with self.command_group('network firewall {}'.format(scope), network_util) as g: + with self.command_group(f'network firewall {scope}', network_util) as g: g.command('list', list_network_resource_property('azure_firewalls', subresource)) g.show_command('show', get_network_resource_property_entry('azure_firewalls', subresource)) g.command('delete', delete_network_resource_property_entry('azure_firewalls', subresource)) @@ -131,7 +131,7 @@ def load_command_table(self, _): setter_type=network_firewall_policies_custom, exception_handler=exception_handler) - with self.command_group('network firewall policy intrusion-detection', resource_type=CUSTOM_FIREWALL, min_api='2020-07-01', is_preview=True) as g: + with self.command_group('network firewall policy intrusion-detection', resource_type=CUSTOM_FIREWALL, min_api='2021-08-01', is_preview=True) as g: g.custom_command('add', 'add_firewall_policy_intrusion_detection_config', exception_handler=exception_handler) g.custom_command('remove', 'remove_firewall_policy_intrusion_detection_config') g.custom_command('list', 'list_firewall_policy_intrusion_detection_config') diff --git a/src/azure-firewall/azext_firewall/custom.py b/src/azure-firewall/azext_firewall/custom.py index 6980147d03d..4239fdb1781 100644 --- a/src/azure-firewall/azext_firewall/custom.py +++ b/src/azure-firewall/azext_firewall/custom.py @@ -25,7 +25,7 @@ def _generic_list(cli_ctx, operation_name, resource_group_name): def _get_property(items, name): result = next((x for x in items if x.name.lower() == name.lower()), None) if not result: - raise CLIError("Property '{}' does not exist".format(name)) + raise CLIError(f"Property '{name}' does not exist") return result @@ -37,7 +37,7 @@ def _upsert(parent, collection_name, obj_to_add, key_name, warn=True): value = getattr(obj_to_add, key_name) if value is None: raise CLIError( - "Unable to resolve a value for key '{}' with which to match.".format(key_name)) + f"Unable to resolve a value for key '{key_name}' with which to match.") match = next((x for x in collection if getattr(x, key_name, None) == value), None) if match: if warn: @@ -59,7 +59,7 @@ def _find_item_at_path(instance, path): # property curr_item = getattr(curr_item, comp, None) if not curr_item: - raise CLIError("unable to find '{}'...".format(comp)) + raise CLIError(f"unable to find '{comp}'...") return curr_item @@ -121,7 +121,7 @@ def create_azure_firewall(cmd, resource_group_name, azure_firewall_name, locatio return client.begin_create_or_update(resource_group_name, azure_firewall_name, firewall) -# pylint: disable=too-many-branches +# pylint: disable=too-many-branches disable=too-many-statements def update_azure_firewall(cmd, instance, tags=None, zones=None, private_ranges=None, firewall_policy=None, virtual_hub=None, dns_servers=None, enable_dns_proxy=None, @@ -183,8 +183,8 @@ def update_azure_firewall(cmd, instance, tags=None, zones=None, private_ranges=N raise CLIError('Number of public ip addresses must be less than or equal to existing ones.') instance.hub_ip_addresses.public_i_ps.addresses = [AzureFirewallPublicIPAddress(address=ip) for ip in hub_public_ip_addresses] # pylint: disable=line-too-long instance.hub_ip_addresses.public_i_ps.count = len(hub_public_ip_addresses) - except AttributeError: - raise CLIError('Public Ip addresses must exist before deleting them.') + except AttributeError as err: + raise CLIError('Public Ip addresses must exist before deleting them.') from err if allow_active_ftp is not None: if instance.additional_properties is None: @@ -287,7 +287,7 @@ def delete_af_ip_configuration(cmd, resource_group_name, resource_name, item_nam else: result = sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, resource_name, af).result() if next((x for x in getattr(result, 'ip_configurations') if x.name.lower() == item_name.lower()), None): - raise CLIError("Failed to delete '{}' on '{}'".format(item_name, resource_name)) + raise CLIError(f"Failed to delete '{item_name}' on '{resource_name}'") def build_af_rule_list(item_param_name, collection_param_name): @@ -296,9 +296,9 @@ def build_af_rule_list(item_param_name, collection_param_name): def list_func(cmd, resource_group_name, firewall_name, collection_name): client = network_client_factory(cmd.cli_ctx).azure_firewalls af = client.get(resource_group_name, firewall_name) - return _find_item_at_path(af, '{}.{}'.format(collection_param_name, collection_name)) + return _find_item_at_path(af, f'{collection_param_name}.{collection_name}') - func_name = 'list_af_{}s'.format(item_param_name) + func_name = f'list_af_{item_param_name}s' setattr(sys.modules[__name__], func_name, list_func) return func_name @@ -309,9 +309,9 @@ def build_af_rule_show(item_param_name, collection_param_name): def show_func(cmd, resource_group_name, firewall_name, collection_name, item_name): client = network_client_factory(cmd.cli_ctx).azure_firewalls af = client.get(resource_group_name, firewall_name) - return _find_item_at_path(af, '{}.{}.rules.{}'.format(collection_param_name, collection_name, item_name)) + return _find_item_at_path(af, f'{collection_param_name}.{collection_name}.rules.{item_name}') - func_name = 'show_af_{}'.format(item_param_name) + func_name = f'show_af_{item_param_name}' setattr(sys.modules[__name__], func_name, show_func) return func_name @@ -322,11 +322,11 @@ def build_af_rule_delete(item_param_name, collection_param_name): def delete_func(cmd, resource_group_name, firewall_name, collection_name, item_name): client = network_client_factory(cmd.cli_ctx).azure_firewalls af = client.get(resource_group_name, firewall_name) - collection = _find_item_at_path(af, '{}.{}'.format(collection_param_name, collection_name)) + collection = _find_item_at_path(af, f'{collection_param_name}.{collection_name}') collection.rules = [rule for rule in collection.rules if rule.name != item_name] client.begin_create_or_update(resource_group_name, firewall_name, af) - func_name = 'delete_af_{}'.format(item_param_name) + func_name = f'delete_af_{item_param_name}' setattr(sys.modules[__name__], func_name, delete_func) return func_name @@ -361,7 +361,7 @@ def _upsert_af_rule(cmd, resource_group_name, firewall_name, collection_param_na collection_match.rules.append(item_class(**params)) _upsert(af, collection_param_name, collection_match, 'name', warn=False) af = client.begin_create_or_update(resource_group_name, firewall_name, af).result() - return _find_item_at_path(af, '{}.{}.rules.{}'.format(collection_param_name, collection_name, item_name)) + return _find_item_at_path(af, f'{collection_param_name}.{collection_name}.rules.{item_name}') def create_af_network_rule(cmd, resource_group_name, azure_firewall_name, collection_name, item_name, @@ -489,6 +489,7 @@ def delete_azure_firewall_threat_intel_allowlist(cmd, resource_group_name, azure # region AzureFirewallPolicies +# pylint: disable=too-many-locals def create_azure_firewall_policies(cmd, resource_group_name, firewall_policy_name, base_policy=None, threat_intel_mode=None, location=None, tags=None, ip_addresses=None, fqdns=None, @@ -507,6 +508,7 @@ def create_azure_firewall_policies(cmd, resource_group_name, firewall_policy_nam 'FirewallPolicyThreatIntelWhitelist', 'DnsSettings', 'FirewallPolicySku', + # pylint: disable=line-too-long 'Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', 'ManagedServiceIdentity') firewall_policy = FirewallPolicy(base_policy=SubResource(id=base_policy) if base_policy is not None else None, @@ -523,7 +525,7 @@ def create_azure_firewall_policies(cmd, resource_group_name, firewall_policy_nam dns_settings = DnsSettings(servers=dns_servers, enable_proxy=enable_dns_proxy or False) firewall_policy.dns_settings = dns_settings - if cmd.supported_api_version(min_api='2020-07-01'): + if cmd.supported_api_version(min_api='2021-08-01'): if sku is not None: firewall_policy.sku = FirewallPolicySku(tier=sku) @@ -547,7 +549,7 @@ def create_azure_firewall_policies(cmd, resource_group_name, firewall_policy_nam # identity if user_assigned_identity is not None: user_assigned_indentity_instance = ManagedServiceIdentityUserAssignedIdentitiesValue() - user_assigned_identities_instance = dict() + user_assigned_identities_instance = {} user_assigned_identities_instance[user_assigned_identity] = user_assigned_indentity_instance identity_instance = ManagedServiceIdentity( type="UserAssigned", @@ -558,6 +560,7 @@ def create_azure_firewall_policies(cmd, resource_group_name, firewall_policy_nam return client.begin_create_or_update(resource_group_name, firewall_policy_name, firewall_policy) +# pylint: disable=too-many-locals def update_azure_firewall_policies(cmd, instance, tags=None, threat_intel_mode=None, ip_addresses=None, fqdns=None, @@ -565,7 +568,8 @@ def update_azure_firewall_policies(cmd, sku=None, intrusion_detection_mode=None, key_vault_secret_id=None, certificate_name=None, user_assigned_identity=None): - (FirewallPolicyThreatIntelWhitelist, FirewallPolicySku) = cmd.get_models('FirewallPolicyThreatIntelWhitelist', 'FirewallPolicySku') + (FirewallPolicyThreatIntelWhitelist, FirewallPolicySku) = cmd.get_models('FirewallPolicyThreatIntelWhitelist', + 'FirewallPolicySku') if tags is not None: instance.tags = tags if threat_intel_mode is not None: @@ -587,7 +591,7 @@ def update_azure_firewall_policies(cmd, instance.threat_intel_whitelist.ip_addresses = ip_addresses if fqdns is not None: instance.threat_intel_whitelist.fqdns = fqdns - if cmd.supported_api_version(min_api='2020-07-01'): + if cmd.supported_api_version(min_api='2021-08-01'): if sku is not None: instance.sku = FirewallPolicySku(tier=sku) @@ -610,11 +614,12 @@ def update_azure_firewall_policies(cmd, # identity (ManagedServiceIdentityUserAssignedIdentitiesValue, - ManagedServiceIdentity) = cmd.get_models('Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', + ManagedServiceIdentity) = cmd.get_models('Components1Jq1T4ISchemasManagedserviceidentity\ + PropertiesUserassignedidentitiesAdditionalproperties', 'ManagedServiceIdentity') if user_assigned_identity is not None: user_assigned_indentity_instance = ManagedServiceIdentityUserAssignedIdentitiesValue() - user_assigned_identities_instance = dict() + user_assigned_identities_instance = {} user_assigned_identities_instance[user_assigned_identity] = user_assigned_indentity_instance identity_instance = ManagedServiceIdentity( type="UserAssigned", @@ -646,6 +651,7 @@ def list_azure_firewall_policies(cmd, resource_group_name=None): def add_firewall_policy_intrusion_detection_config(cmd, resource_group_name, firewall_policy_name, + private_ranges=None, signature_id=None, signature_mode=None, bypass_rule_name=None, @@ -669,7 +675,7 @@ def add_firewall_policy_intrusion_detection_config(cmd, for overrided_signature in firewall_policy.intrusion_detection.configuration.signature_overrides: if overrided_signature.id == signature_id: raise InvalidArgumentValueError( - 'Signature ID {} exists. Delete it first or try update instead'.format(signature_id)) + f'Signature ID {signature_id} exists. Delete it first or try update instead') FirewallPolicyIntrusionDetectionSignatureSpecification = \ cmd.get_models('FirewallPolicyIntrusionDetectionSignatureSpecification') @@ -694,6 +700,10 @@ def add_firewall_policy_intrusion_detection_config(cmd, ) firewall_policy.intrusion_detection.configuration.bypass_traffic_settings.append(bypass_traffic) + if private_ranges is not None: + __private_ranges = [x.strip() for x in private_ranges.split(",")] + firewall_policy.intrusion_detection.configuration.private_ranges = __private_ranges + result = sdk_no_wait(False, client.begin_create_or_update, resource_group_name, @@ -729,14 +739,14 @@ def remove_firewall_policy_intrusion_detection_config(cmd, signatures = firewall_policy.intrusion_detection.configuration.signature_overrides new_signatures = [s for s in signatures if s.id != signature_id] if len(signatures) == len(new_signatures): - raise InvalidArgumentValueError("Signature ID {} doesn't exist".format(signature_id)) + raise InvalidArgumentValueError(f"Signature ID {signature_id} doesn't exist") firewall_policy.intrusion_detection.configuration.signature_overrides = new_signatures if bypass_rule_name is not None: bypass_settings = firewall_policy.intrusion_detection.configuration.bypass_traffic_settings new_bypass_settings = [s for s in bypass_settings if s.name != bypass_rule_name] if len(bypass_settings) == len(new_bypass_settings): - raise InvalidArgumentValueError("Bypass rule with name {} doesn't exist".format(signature_id)) + raise InvalidArgumentValueError(f"Bypass rule with name {signature_id} doesn't exist") firewall_policy.intrusion_detection.configuration.bypass_traffic_settings = new_bypass_settings result = sdk_no_wait(False, @@ -753,7 +763,8 @@ def create_azure_firewall_policy_rule_collection_group(cmd, resource_group_name, FirewallPolicyRuleCollectionGroup = cmd.get_models('FirewallPolicyRuleCollectionGroup') rule_group = FirewallPolicyRuleCollectionGroup(priority=priority, name=rule_collection_group_name) - return client.begin_create_or_update(resource_group_name, firewall_policy_name, rule_collection_group_name, rule_group) + return client.begin_create_or_update(resource_group_name, + firewall_policy_name, rule_collection_group_name, rule_group) def update_azure_firewall_policy_rule_collection_group(instance, priority=None, tags=None): @@ -811,7 +822,8 @@ def add_azure_firewall_policy_filter_rule_collection(cmd, resource_group_name, f protocols=None, fqdn_tags=None, target_fqdns=None, source_ip_groups=None, destination_ip_groups=None, destination_fqdns=None, - target_urls=None, enable_tls_inspection=False, web_categories=None): + target_urls=None, + enable_tls_inspection=False, web_categories=None): NetworkRule, FirewallPolicyRuleApplicationProtocol,\ ApplicationRule, FirewallPolicyFilterRuleCollectionAction, FirewallPolicyFilterRuleCollection =\ cmd.get_models('NetworkRule', 'FirewallPolicyRuleApplicationProtocol', @@ -999,8 +1011,7 @@ def update_azure_firewall_policy_filter_rule(cmd, instance, rule_collection_name if target_rule_collection is None: raise UserFault("Cannot find corresponding rule, please check parameters") - for i in range(0, len(target_rule_collection.rules)): - rule = target_rule_collection.rules[i] + for i, rule in enumerate(target_rule_collection.rules): if rule_name == rule.name: new_rule = {} if rule.rule_type == "NetworkRule": @@ -1047,8 +1058,7 @@ def map_application_rule_protocol(item): if new_rule: target_rule_collection.rules[i] = copy.deepcopy(new_rule) return instance - else: - raise ServiceError(f'Undefined rule_type : {rule.rule_type}') + raise ServiceError(f'Undefined rule_type : {rule.rule_type}') raise UserFault(f'{rule_name} does not exist!!!') # endregion diff --git a/src/azure-firewall/azext_firewall/profiles.py b/src/azure-firewall/azext_firewall/profiles.py index 015fe90d479..eef6a4120eb 100644 --- a/src/azure-firewall/azext_firewall/profiles.py +++ b/src/azure-firewall/azext_firewall/profiles.py @@ -5,4 +5,4 @@ from azure.cli.core.profiles import CustomResourceType -CUSTOM_FIREWALL = CustomResourceType('azext_firewall.vendored_sdks.v2020_07_01', 'NetworkManagementClient') +CUSTOM_FIREWALL = CustomResourceType('azext_firewall.vendored_sdks.v2021_08_01', 'NetworkManagementClient') diff --git a/src/azure-firewall/azext_firewall/tests/latest/__init__.py b/src/azure-firewall/azext_firewall/tests/latest/__init__.py index b81c5f3f436..871d5083781 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/__init__.py +++ b/src/azure-firewall/azext_firewall/tests/latest/__init__.py @@ -5,4 +5,4 @@ from azure.cli.core.profiles import register_resource_type from azext_firewall.profiles import CUSTOM_FIREWALL -register_resource_type('latest', CUSTOM_FIREWALL, '2019-11-01') +register_resource_type('latest', CUSTOM_FIREWALL, '2021-08-01') diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall.yaml index 176f5569323..f20999cf4a2 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --allow-active-ftp User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001","name":"cli_test_azure_firewall000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:38:34Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001","name":"cli_test_azure_firewall000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.9325864Z","CreationDate":"2022-05-11T19:54:28.9324446Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '518' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:38:41 GMT + - Wed, 11 May 2022 19:54:32 GMT expires: - '-1' pragma: @@ -60,13 +60,13 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --allow-active-ftp User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"7de13ca7-8ac0-4e77-9db3-5522f781474b\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"80568124-4158-418c-8dc2-5ee96f743b66\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -78,15 +78,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/bdff51a5-526f-418e-9f15-8b589ee06627?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5c5674fd-2f52-4191-8504-9f0b4abc14df?api-version=2021-08-01 cache-control: - no-cache content-length: - - '740' + - '694' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:38:48 GMT + - Wed, 11 May 2022 19:54:41 GMT expires: - '-1' pragma: @@ -99,9 +99,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - afbdcd80-5909-4786-8734-f46ac1146d39 + - 286e310f-cbb9-42bf-a5cd-89005ee9a095 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -119,9 +119,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --allow-active-ftp User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/bdff51a5-526f-418e-9f15-8b589ee06627?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5c5674fd-2f52-4191-8504-9f0b4abc14df?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -133,7 +133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:38:59 GMT + - Wed, 11 May 2022 19:54:52 GMT expires: - '-1' pragma: @@ -150,7 +150,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f09abd1d-4fb1-49c8-a828-df20544eb18b + - 33a4e6b9-0d3b-4a00-9037-0a417f121efd status: code: 200 message: OK @@ -168,13 +168,13 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --allow-active-ftp User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"e73f7198-6719-48aa-b179-ae1d5bc3a5ab\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"e56165dc-b9ed-4636-97af-ed9374bec6fa\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -186,13 +186,13 @@ interactions: cache-control: - no-cache content-length: - - '741' + - '695' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:38:59 GMT + - Wed, 11 May 2022 19:54:52 GMT etag: - - W/"e73f7198-6719-48aa-b179-ae1d5bc3a5ab" + - W/"e56165dc-b9ed-4636-97af-ed9374bec6fa" expires: - '-1' pragma: @@ -209,7 +209,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 071b578e-af22-403e-adcd-86e568fdd2e5 + - d93c0c4e-103b-448f-927a-dae8904effbf status: code: 200 message: OK @@ -227,13 +227,13 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --allow-active-ftp User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"e73f7198-6719-48aa-b179-ae1d5bc3a5ab\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"e56165dc-b9ed-4636-97af-ed9374bec6fa\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -245,13 +245,13 @@ interactions: cache-control: - no-cache content-length: - - '741' + - '695' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:01 GMT + - Wed, 11 May 2022 19:54:56 GMT etag: - - W/"e73f7198-6719-48aa-b179-ae1d5bc3a5ab" + - W/"e56165dc-b9ed-4636-97af-ed9374bec6fa" expires: - '-1' pragma: @@ -268,7 +268,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c1795cc6-ce5a-4056-ab13-4913b83144c7 + - 7013835e-ba1e-48d8-9922-0025fe2222f2 status: code: 200 message: OK @@ -288,19 +288,19 @@ interactions: Connection: - keep-alive Content-Length: - - '456' + - '410' Content-Type: - application/json ParameterSetName: - -g -n --threat-intel-mode --allow-active-ftp User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"eeb4ba4d-3372-4c5e-a7b0-c4ee44cdd1be\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"593f3998-57fb-4e02-86e9-9920d5fb3312\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -311,15 +311,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ec0de15d-159d-4016-b078-117f5603a566?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cccda90c-4887-4522-9a61-82992bd7fd81?api-version=2021-08-01 cache-control: - no-cache content-length: - - '689' + - '643' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:03 GMT + - Wed, 11 May 2022 19:54:58 GMT expires: - '-1' pragma: @@ -336,9 +336,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 554b2fbe-9826-4809-afe5-f84251e0a2eb + - 96db0b10-6bb0-4546-b041-6112ca192196 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -356,9 +356,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --allow-active-ftp User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ec0de15d-159d-4016-b078-117f5603a566?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cccda90c-4887-4522-9a61-82992bd7fd81?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -370,7 +370,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:14 GMT + - Wed, 11 May 2022 19:55:08 GMT expires: - '-1' pragma: @@ -387,7 +387,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - fdea5df4-60f3-44be-908e-eef02de10326 + - ee0f9052-4273-425e-9759-196c3006c977 status: code: 200 message: OK @@ -405,13 +405,13 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --allow-active-ftp User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"c2448388-46fb-4f99-8ebd-735efebd1312\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f90d6f03-6440-4f7c-b7aa-48116c78990f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -422,13 +422,13 @@ interactions: cache-control: - no-cache content-length: - - '690' + - '644' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:15 GMT + - Wed, 11 May 2022 19:55:12 GMT etag: - - W/"c2448388-46fb-4f99-8ebd-735efebd1312" + - W/"f90d6f03-6440-4f7c-b7aa-48116c78990f" expires: - '-1' pragma: @@ -445,7 +445,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 45d121aa-e002-4b98-b266-00fb7e23b567 + - d1647cd0-e899-43ae-8550-92f830008a43 status: code: 200 message: OK @@ -463,13 +463,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"c2448388-46fb-4f99-8ebd-735efebd1312\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f90d6f03-6440-4f7c-b7aa-48116c78990f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -480,13 +480,13 @@ interactions: cache-control: - no-cache content-length: - - '690' + - '644' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:17 GMT + - Wed, 11 May 2022 19:55:14 GMT etag: - - W/"c2448388-46fb-4f99-8ebd-735efebd1312" + - W/"f90d6f03-6440-4f7c-b7aa-48116c78990f" expires: - '-1' pragma: @@ -503,7 +503,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 27bbbb72-84ad-414e-b246-3b0bad9a1012 + - 17a62baf-e38a-401c-9e73-6bbabdcfd0f0 status: code: 200 message: OK @@ -521,14 +521,14 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls?api-version=2021-08-01 response: body: string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"c2448388-46fb-4f99-8ebd-735efebd1312\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f90d6f03-6440-4f7c-b7aa-48116c78990f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": @@ -540,11 +540,11 @@ interactions: cache-control: - no-cache content-length: - - '795' + - '749' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:18 GMT + - Wed, 11 May 2022 19:55:16 GMT expires: - '-1' pragma: @@ -561,7 +561,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5c9d425a-e0cd-4206-881d-73d61735e0cb + - f4cfe50e-f6cf-449b-8d0d-b2180c4c0179 status: code: 200 message: OK @@ -581,9 +581,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: '' @@ -591,17 +591,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/eb1f8b53-8c4c-40b4-adc8-21f72a36e4d5?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/b5db0bc6-5fb3-483e-8ecc-c8dd5051577b?api-version=2021-08-01 cache-control: - no-cache content-length: - '0' date: - - Mon, 02 Aug 2021 02:39:21 GMT + - Wed, 11 May 2022 19:55:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/eb1f8b53-8c4c-40b4-adc8-21f72a36e4d5?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/b5db0bc6-5fb3-483e-8ecc-c8dd5051577b?api-version=2021-08-01 pragma: - no-cache server: @@ -612,7 +612,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ee3db8b8-b764-4ca1-a6d4-1e28eaad8596 + - b32eab88-a623-472c-9a60-59a3cf7e81b7 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -632,9 +632,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/eb1f8b53-8c4c-40b4-adc8-21f72a36e4d5?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/b5db0bc6-5fb3-483e-8ecc-c8dd5051577b?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -646,7 +646,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:31 GMT + - Wed, 11 May 2022 19:55:30 GMT expires: - '-1' pragma: @@ -663,7 +663,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 93cb06f8-b771-402b-9b12-5c2c43a27cc7 + - ece2c1eb-1188-40b0-8946-a986b6cd0d6b status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_ip_config.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_ip_config.yaml index 585cfffab74..b0453ef22ef 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_ip_config.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_ip_config.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001","name":"cli_test_azure_firewall_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001","name":"cli_test_azure_firewall_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.8575300Z","CreationDate":"2022-05-11T19:54:28.8574506Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '538' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:06:45 GMT + - Wed, 11 May 2022 19:54:32 GMT expires: - '-1' pragma: @@ -59,13 +59,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"cbbe47ee-f22c-4c7d-8719-ed819cf6a138\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"b2f0790d-21c5-4f9d-a84d-92a1637b0a58\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -76,15 +76,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3d92994e-1fdd-4244-ab14-40a5f4bbbf10?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5bc00b38-3966-4a20-9a5f-be599a460244?api-version=2021-08-01 cache-control: - no-cache content-length: - - '690' + - '654' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:06:53 GMT + - Wed, 11 May 2022 19:54:41 GMT expires: - '-1' pragma: @@ -97,7 +97,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f6d838cc-2f74-4fe4-9d4a-48212f22f5f9 + - ae82735b-2aa6-449a-bbca-5d7c6eece454 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -117,9 +117,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3d92994e-1fdd-4244-ab14-40a5f4bbbf10?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5bc00b38-3966-4a20-9a5f-be599a460244?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -131,7 +131,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:03 GMT + - Wed, 11 May 2022 19:54:51 GMT expires: - '-1' pragma: @@ -148,7 +148,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cc1dcb6b-b441-4045-be56-a8e7a28e4c06 + - 074f8d1b-2ddf-4516-82bf-5e1b492b6ec2 status: code: 200 message: OK @@ -166,13 +166,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"56feb8b4-b929-4434-a7d3-8f138d449e0a\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f69f389e-7273-4cdb-846f-9c603d4f304a\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -183,13 +183,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '655' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:04 GMT + - Wed, 11 May 2022 19:54:52 GMT etag: - - W/"56feb8b4-b929-4434-a7d3-8f138d449e0a" + - W/"f69f389e-7273-4cdb-846f-9c603d4f304a" expires: - '-1' pragma: @@ -206,7 +206,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9c9b2c1e-c999-45e1-aa33-aadd334479c9 + - e06061d9-58d9-4e06-8a14-06172e283b0f status: code: 200 message: OK @@ -224,21 +224,21 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001","name":"cli_test_azure_firewall_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001","name":"cli_test_azure_firewall_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.8575300Z","CreationDate":"2022-05-11T19:54:28.8574506Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '538' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:04 GMT + - Wed, 11 May 2022 19:54:52 GMT expires: - '-1' pragma: @@ -271,15 +271,15 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\",\r\n - \ \"etag\": \"W/\\\"e8712ce9-00cb-4306-8178-b48b7e99bacc\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"d4b9af4c-c437-449c-871b-c6012168f2aa\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"1bd05af1-7de8-44ce-ae91-e3d23f5d5712\",\r\n \"publicIPAddressVersion\": + \ \"resourceGuid\": \"cc01a33a-bfcd-4439-82d3-c7a75dece1f2\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n @@ -288,15 +288,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/b4928e79-f7b8-497b-84f1-f7ca404721b3?api-version=2021-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/91d4becb-b166-4f9d-a30d-ee2667dd46c4?api-version=2021-05-01 cache-control: - no-cache content-length: - - '685' + - '649' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:12 GMT + - Wed, 11 May 2022 19:55:00 GMT expires: - '-1' pragma: @@ -309,7 +309,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8d61f126-4d4c-4b9d-a86a-38b3607e120a + - 4f2a0ad3-7a61-4f49-ae13-f8eeb3eb437d x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -329,9 +329,9 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/b4928e79-f7b8-497b-84f1-f7ca404721b3?api-version=2021-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/91d4becb-b166-4f9d-a30d-ee2667dd46c4?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -343,7 +343,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:13 GMT + - Wed, 11 May 2022 19:55:02 GMT expires: - '-1' pragma: @@ -360,7 +360,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 637d15a0-4170-4521-824b-7a6b3508f2cc + - 99315171-77d4-4c89-9408-8c5083ae5388 status: code: 200 message: OK @@ -378,16 +378,16 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\",\r\n - \ \"etag\": \"W/\\\"e2492100-234d-4354-a461-00a223114e0b\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"001d2510-5642-45c2-a1d0-8efedded6903\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"1bd05af1-7de8-44ce-ae91-e3d23f5d5712\",\r\n \"ipAddress\": - \"52.180.66.194\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \ \"resourceGuid\": \"cc01a33a-bfcd-4439-82d3-c7a75dece1f2\",\r\n \"ipAddress\": + \"20.228.113.46\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" @@ -395,13 +395,13 @@ interactions: cache-control: - no-cache content-length: - - '721' + - '685' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:13 GMT + - Wed, 11 May 2022 19:55:02 GMT etag: - - W/"e2492100-234d-4354-a461-00a223114e0b" + - W/"001d2510-5642-45c2-a1d0-8efedded6903" expires: - '-1' pragma: @@ -418,7 +418,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 96fe93a1-6be7-47b1-b66e-82e05a035366 + - 973f826a-1a09-4afb-abde-9d9542ba4680 status: code: 200 message: OK @@ -436,21 +436,21 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001","name":"cli_test_azure_firewall_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001","name":"cli_test_azure_firewall_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.8575300Z","CreationDate":"2022-05-11T19:54:28.8574506Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '538' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:14 GMT + - Wed, 11 May 2022 19:55:03 GMT expires: - '-1' pragma: @@ -483,15 +483,15 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2\",\r\n - \ \"etag\": \"W/\\\"6ad9f6e2-5d05-4d25-94ff-d43ecc8d4c42\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"733bb0b9-6d81-43f4-b9c5-693159239b68\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"a23613be-cd73-4879-988a-82fecc5eadb6\",\r\n \"publicIPAddressVersion\": + \ \"resourceGuid\": \"4a8b58fe-6f54-4a19-b8a8-451b61598da4\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n @@ -500,15 +500,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/55e35642-7157-4583-9595-bef28dfedba5?api-version=2021-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5ebca472-a6cb-4a13-989f-9bf1642ec69e?api-version=2021-05-01 cache-control: - no-cache content-length: - - '687' + - '651' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:22 GMT + - Wed, 11 May 2022 19:55:12 GMT expires: - '-1' pragma: @@ -521,9 +521,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a6cf94cb-75ac-455a-b9a5-7deedb6be859 + - 29a22510-19e8-464b-b75f-7f70a99ad963 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 201 message: Created @@ -541,9 +541,9 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/55e35642-7157-4583-9595-bef28dfedba5?api-version=2021-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5ebca472-a6cb-4a13-989f-9bf1642ec69e?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -555,7 +555,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:23 GMT + - Wed, 11 May 2022 19:55:13 GMT expires: - '-1' pragma: @@ -572,7 +572,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a9ecfeb5-8d9e-4495-b4e4-3d13052b0273 + - a0de89ff-0212-4957-bd93-24200b0cbd6f status: code: 200 message: OK @@ -590,16 +590,16 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2\",\r\n - \ \"etag\": \"W/\\\"c8ce0eb4-f504-4929-a414-313bdd29bb61\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"ecc8ee0f-bee6-48e0-8ce2-bffbeefa8096\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"a23613be-cd73-4879-988a-82fecc5eadb6\",\r\n \"ipAddress\": - \"52.180.66.11\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \ \"resourceGuid\": \"4a8b58fe-6f54-4a19-b8a8-451b61598da4\",\r\n \"ipAddress\": + \"20.228.115.235\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" @@ -607,13 +607,13 @@ interactions: cache-control: - no-cache content-length: - - '722' + - '688' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:23 GMT + - Wed, 11 May 2022 19:55:13 GMT etag: - - W/"c8ce0eb4-f504-4929-a414-313bdd29bb61" + - W/"ecc8ee0f-bee6-48e0-8ce2-bffbeefa8096" expires: - '-1' pragma: @@ -630,7 +630,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 87bc060d-6543-4eb4-95ac-eeb698e5bc86 + - 1bb922a7-18b7-4b71-897d-3b43afc04a56 status: code: 200 message: OK @@ -648,21 +648,21 @@ interactions: ParameterSetName: - -g -n --subnet-name --address-prefixes --subnet-prefixes User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001","name":"cli_test_azure_firewall_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001","name":"cli_test_azure_firewall_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.8575300Z","CreationDate":"2022-05-11T19:54:28.8574506Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '538' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:24 GMT + - Wed, 11 May 2022 19:55:13 GMT expires: - '-1' pragma: @@ -697,21 +697,21 @@ interactions: ParameterSetName: - -g -n --subnet-name --address-prefixes --subnet-prefixes User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n - \ \"etag\": \"W/\\\"c0bce2f4-2091-4c21-ab07-da26161b89e6\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"6179930b-5e94-4d7c-933b-257f9c914c58\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"c8ba0fcc-f425-4103-9e7a-a7a4b8ec06da\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"4d892cdc-be7a-4a23-b578-6f8ec0b2349a\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"AzureFirewallSubnet\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\",\r\n - \ \"etag\": \"W/\\\"c0bce2f4-2091-4c21-ab07-da26161b89e6\\\"\",\r\n + \ \"etag\": \"W/\\\"6179930b-5e94-4d7c-933b-257f9c914c58\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -722,15 +722,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/094d8be4-2ce1-4291-b9b4-8c7c063794d2?api-version=2021-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a77912bb-48b6-4d56-99bf-acde1ccb2b8e?api-version=2021-05-01 cache-control: - no-cache content-length: - - '1430' + - '1358' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:31 GMT + - Wed, 11 May 2022 19:55:21 GMT expires: - '-1' pragma: @@ -743,9 +743,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 80a6bfd4-4ae5-4359-9386-f39e39a62e7a + - 850153b8-3209-47e8-8d29-180beb758715 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 201 message: Created @@ -763,9 +763,9 @@ interactions: ParameterSetName: - -g -n --subnet-name --address-prefixes --subnet-prefixes User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/094d8be4-2ce1-4291-b9b4-8c7c063794d2?api-version=2021-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a77912bb-48b6-4d56-99bf-acde1ccb2b8e?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -777,7 +777,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:34 GMT + - Wed, 11 May 2022 19:55:24 GMT expires: - '-1' pragma: @@ -794,7 +794,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 68672705-bf60-4fd7-a48b-213654a0b162 + - 4ee52eea-3fff-4432-a4af-7cd1922c3398 status: code: 200 message: OK @@ -812,21 +812,21 @@ interactions: ParameterSetName: - -g -n --subnet-name --address-prefixes --subnet-prefixes User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n - \ \"etag\": \"W/\\\"30c6b290-fd68-4084-9df4-986137309baa\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"79fc3194-da10-48c2-946f-1172f756c9a9\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"c8ba0fcc-f425-4103-9e7a-a7a4b8ec06da\",\r\n \"addressSpace\": + \ \"resourceGuid\": \"4d892cdc-be7a-4a23-b578-6f8ec0b2349a\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n \ \"subnets\": [\r\n {\r\n \"name\": \"AzureFirewallSubnet\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\",\r\n - \ \"etag\": \"W/\\\"30c6b290-fd68-4084-9df4-986137309baa\\\"\",\r\n + \ \"etag\": \"W/\\\"79fc3194-da10-48c2-946f-1172f756c9a9\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -837,13 +837,13 @@ interactions: cache-control: - no-cache content-length: - - '1432' + - '1360' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:34 GMT + - Wed, 11 May 2022 19:55:25 GMT etag: - - W/"30c6b290-fd68-4084-9df4-986137309baa" + - W/"79fc3194-da10-48c2-946f-1172f756c9a9" expires: - '-1' pragma: @@ -860,7 +860,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cfb04934-32df-4d78-8344-99429e3d8e6a + - 5b748f6e-3805-456f-b51a-0e5a46382dfc status: code: 200 message: OK @@ -872,19 +872,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network firewall ip-config create + - network firewall ip-config delete Connection: - keep-alive ParameterSetName: - - -g -n -f --public-ip-address --vnet-name + - -g -n -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"56feb8b4-b929-4434-a7d3-8f138d449e0a\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f69f389e-7273-4cdb-846f-9c603d4f304a\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -895,13 +895,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '655' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:36 GMT + - Wed, 11 May 2022 19:55:28 GMT etag: - - W/"56feb8b4-b929-4434-a7d3-8f138d449e0a" + - W/"f69f389e-7273-4cdb-846f-9c603d4f304a" expires: - '-1' pragma: @@ -918,68 +918,57 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - db5d03e7-975e-4ea0-b195-db898662d24c + - 70402c8f-a1c8-43fc-af1f-ddaa8d7a4ab9 status: code: 200 message: OK - request: body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1", "location": "westus", "properties": {"applicationRuleCollections": [], "natRuleCollections": - [], "networkRuleCollections": [], "ipConfigurations": [{"name": "myipconfig1", - "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet"}, - "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip"}}}], - "threatIntelMode": "Alert", "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "additionalProperties": {}}}' + [], "networkRuleCollections": [], "threatIntelMode": "Alert", "sku": {"name": + "AZFW_VNet", "tier": "Standard"}, "additionalProperties": {}}}' headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - network firewall ip-config create + - network firewall ip-config delete Connection: - keep-alive Content-Length: - - '964' + - '397' Content-Type: - application/json ParameterSetName: - - -g -n -f --public-ip-address --vnet-name + - -g -n -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"57433aec-c6a2-4dd4-9264-0502b0300fc7\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f69f389e-7273-4cdb-846f-9c603d4f304a\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"57433aec-c6a2-4dd4-9264-0502b0300fc7\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" + [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": + [],\r\n \"natRuleCollections\": []\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/90abd110-c352-4b66-a024-8f666c6ae26f?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9c1d9c9e-c5b8-4376-b615-65431521476b?api-version=2021-08-01 cache-control: - no-cache content-length: - - '1815' + - '655' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:37 GMT + - Wed, 11 May 2022 19:55:28 GMT expires: - '-1' pragma: @@ -996,7 +985,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3da521ca-802c-47a4-b147-49d9f067e731 + - f6697dc8-285b-4631-9cf3-defa33d93489 x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -1010,223 +999,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/90abd110-c352-4b66-a024-8f666c6ae26f?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:07:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e3519570-6794-4b47-89eb-bb9e51bd5908 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/90abd110-c352-4b66-a024-8f666c6ae26f?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:07:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - edca02b8-ffcd-4e25-bb95-dc0a194ad556 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/90abd110-c352-4b66-a024-8f666c6ae26f?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:08:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8019d873-792e-4470-a3dd-93c192a853fd - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/90abd110-c352-4b66-a024-8f666c6ae26f?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:08:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f804123a-65fd-49d1-b253-85a5e80cb255 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create + - network firewall ip-config delete Connection: - keep-alive ParameterSetName: - - -g -n -f --public-ip-address --vnet-name + - -g -n -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/90abd110-c352-4b66-a024-8f666c6ae26f?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9c1d9c9e-c5b8-4376-b615-65431521476b?api-version=2021-08-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: - no-cache content-length: - - '30' + - '29' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:09:19 GMT + - Wed, 11 May 2022 19:55:58 GMT expires: - '-1' pragma: @@ -1243,7 +1036,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a6505cf7-7ec8-4790-bd3a-7d928f1175f4 + - 375e466d-aca2-4f9c-9b4d-e42eb8a3b3bf status: code: 200 message: OK @@ -1255,27 +1048,36 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network firewall ip-config create + - network firewall ip-config delete Connection: - keep-alive ParameterSetName: - - -g -n -f --public-ip-address --vnet-name + - -g -n -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/90abd110-c352-4b66-a024-8f666c6ae26f?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n + \ \"etag\": \"W/\\\"f69f389e-7273-4cdb-846f-9c603d4f304a\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": + \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": + \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": + [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": + [],\r\n \"natRuleCollections\": []\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '30' + - '655' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:09:59 GMT + - Wed, 11 May 2022 19:55:59 GMT + etag: + - W/"f69f389e-7273-4cdb-846f-9c603d4f304a" expires: - '-1' pragma: @@ -1292,7 +1094,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2dde6fe9-8194-416b-b09e-ab19bfc2deb7 + - e2fdea5a-1ccc-48ee-9be1-ad8f21bf3975 status: code: 200 message: OK @@ -1300,31 +1102,40 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - network firewall ip-config create + - network firewall ip-config delete Connection: - keep-alive ParameterSetName: - - -g -n -f --public-ip-address --vnet-name + - -g -n -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/90abd110-c352-4b66-a024-8f666c6ae26f?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" + string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n + \ \"etag\": \"W/\\\"f69f389e-7273-4cdb-846f-9c603d4f304a\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": + \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": + \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": + [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": + [],\r\n \"natRuleCollections\": []\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '29' + - '655' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:11:20 GMT + - Wed, 11 May 2022 19:56:02 GMT + etag: + - W/"f69f389e-7273-4cdb-846f-9c603d4f304a" expires: - '-1' pragma: @@ -1341,56 +1152,57 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b58549a7-15d1-42c5-b313-8577de0479f4 + - 1d426838-bc79-4132-8657-ba028fd59968 status: code: 200 message: OK - request: - body: null + body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1", + "location": "westus", "properties": {"applicationRuleCollections": [], "natRuleCollections": + [], "networkRuleCollections": [], "threatIntelMode": "Alert", "sku": {"name": + "AZFW_VNet", "tier": "Standard"}, "additionalProperties": {}}}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - network firewall ip-config create + - network firewall ip-config delete Connection: - keep-alive + Content-Length: + - '397' + Content-Type: + - application/json ParameterSetName: - - -g -n -f --public-ip-address --vnet-name + - -g -n -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"f985df2b-4bf1-4fa9-b303-0fa47319ace5\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f69f389e-7273-4cdb-846f-9c603d4f304a\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"f985df2b-4bf1-4fa9-b303-0fa47319ace5\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" + [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": + [],\r\n \"natRuleCollections\": []\r\n }\r\n}" headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9da6dd26-877b-432b-bccd-02b8c13da371?api-version=2021-08-01 cache-control: - no-cache content-length: - - '1859' + - '655' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:11:20 GMT - etag: - - W/"f985df2b-4bf1-4fa9-b303-0fa47319ace5" + - Wed, 11 May 2022 19:56:03 GMT expires: - '-1' pragma: @@ -1407,1473 +1219,12 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6f475ba0-5789-4a39-83a7-07985d914ed9 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"f985df2b-4bf1-4fa9-b303-0fa47319ace5\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"f985df2b-4bf1-4fa9-b303-0fa47319ace5\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1859' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:21 GMT - etag: - - W/"f985df2b-4bf1-4fa9-b303-0fa47319ace5" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a717d923-834f-487a-a4ce-0e48f48f8570 - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1", - "location": "westus", "properties": {"applicationRuleCollections": [], "natRuleCollections": - [], "networkRuleCollections": [], "ipConfigurations": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1", - "name": "myipconfig1", "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet"}, - "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip"}}}, - {"name": "myipconfig2", "properties": {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2"}}}], - "threatIntelMode": "Alert", "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - Content-Length: - - '1472' - Content-Type: - - application/json - ParameterSetName: - - -g -n -f --public-ip-address - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"6c9950e8-f2f7-4010-a2bb-17bdb22b3940\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"6c9950e8-f2f7-4010-a2bb-17bdb22b3940\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n },\r\n {\r\n \"name\": \"myipconfig2\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig2\",\r\n - \ \"etag\": \"W/\\\"6c9950e8-f2f7-4010-a2bb-17bdb22b3940\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9fb5bee9-8fe6-4fbb-90e4-917c1458c782?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '2699' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - cd60db9e-ce90-4873-8767-e4f99ffa2daa + - c52e31a8-1927-4fda-809a-fc3c10600723 x-ms-ratelimit-remaining-subscription-writes: - '1198' status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9fb5bee9-8fe6-4fbb-90e4-917c1458c782?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - c2bc42e7-5c3e-4da6-b78d-da5740dd2839 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9fb5bee9-8fe6-4fbb-90e4-917c1458c782?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 6e12ca1b-e22d-4aed-8829-5e5d214e5741 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9fb5bee9-8fe6-4fbb-90e4-917c1458c782?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:12:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3a226292-e771-4c6c-b726-c6a51354c976 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9fb5bee9-8fe6-4fbb-90e4-917c1458c782?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:12:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3cfd3d9a-5f64-466d-83fd-7f7954a4711d - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9fb5bee9-8fe6-4fbb-90e4-917c1458c782?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:13:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0d7c4cc7-ab88-4511-986d-c37bfe893f8f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d57700d3-cf59-4c65-8a08-5b0b9acfe33a\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"d57700d3-cf59-4c65-8a08-5b0b9acfe33a\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n },\r\n {\r\n \"name\": \"myipconfig2\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig2\",\r\n - \ \"etag\": \"W/\\\"d57700d3-cf59-4c65-8a08-5b0b9acfe33a\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '2700' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:13:05 GMT - etag: - - W/"d57700d3-cf59-4c65-8a08-5b0b9acfe33a" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8067120e-b4fb-425e-ad58-07b2a3425caf - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d57700d3-cf59-4c65-8a08-5b0b9acfe33a\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"d57700d3-cf59-4c65-8a08-5b0b9acfe33a\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n },\r\n {\r\n \"name\": \"myipconfig2\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig2\",\r\n - \ \"etag\": \"W/\\\"d57700d3-cf59-4c65-8a08-5b0b9acfe33a\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '2700' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:13:05 GMT - etag: - - W/"d57700d3-cf59-4c65-8a08-5b0b9acfe33a" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9c23d29e-0cee-4098-97fb-6544178f9958 - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1", - "location": "westus", "properties": {"applicationRuleCollections": [], "natRuleCollections": - [], "networkRuleCollections": [], "ipConfigurations": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1", - "name": "myipconfig1", "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet"}, - "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip"}}}], - "threatIntelMode": "Alert", "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - Content-Length: - - '1205' - Content-Type: - - application/json - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"9c962062-1d59-43ec-b18a-42788dad2d0b\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"9c962062-1d59-43ec-b18a-42788dad2d0b\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f687a1e4-60cb-46ab-b78f-32a3e08e03d4?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '1858' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:13:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b170f638-0afc-4463-b87f-6b700412a4d6 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f687a1e4-60cb-46ab-b78f-32a3e08e03d4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:13:16 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a08e1d0d-175d-4fd0-a4c3-4fe95a15fdb0 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f687a1e4-60cb-46ab-b78f-32a3e08e03d4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:13:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - fdad26df-d141-435f-aaf8-bb7e91f8aa48 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f687a1e4-60cb-46ab-b78f-32a3e08e03d4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:13:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ee67099a-891b-4b81-8d06-3978ea562cc2 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f687a1e4-60cb-46ab-b78f-32a3e08e03d4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:14:08 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e7280cc8-807a-4c0f-99af-0e2c0134dc51 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f687a1e4-60cb-46ab-b78f-32a3e08e03d4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:14:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 20f0b5e4-8c66-40b9-a90e-08cfa21888d1 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f687a1e4-60cb-46ab-b78f-32a3e08e03d4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 930b36fe-cf4a-40b5-bdd8-1016f3148250 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"59df8743-09d0-4c46-b1d8-74ebb461fa48\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"59df8743-09d0-4c46-b1d8-74ebb461fa48\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1859' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:28 GMT - etag: - - W/"59df8743-09d0-4c46-b1d8-74ebb461fa48" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - c837ce73-4940-446b-a470-9d719c960868 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"59df8743-09d0-4c46-b1d8-74ebb461fa48\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"59df8743-09d0-4c46-b1d8-74ebb461fa48\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1859' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:29 GMT - etag: - - W/"59df8743-09d0-4c46-b1d8-74ebb461fa48" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 1b9cd9bd-d9f5-476e-a475-d0f8abb90269 - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1", - "location": "westus", "properties": {"applicationRuleCollections": [], "natRuleCollections": - [], "networkRuleCollections": [], "threatIntelMode": "Alert", "sku": {"name": - "AZFW_VNet", "tier": "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - Content-Length: - - '433' - Content-Type: - - application/json - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"791533f0-f2ec-48c4-9d3c-c715a380653e\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": - [],\r\n \"natRuleCollections\": []\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '690' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 1402d23f-b190-4952-bc25-18b5d4ae64cf - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0fe6acf3-305f-4b67-917f-fce488e5a23b - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:50 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0fc5043f-bcb4-438e-ade1-ec362788efdd - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:16:11 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - cf54fe70-2801-4787-ac4f-01888b5d7de3 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:16:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a4a66fa1-291e-4caa-a2cb-3fa29e72b1e6 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:17:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - caf03ed2-5392-4737-b97d-c75ebe111478 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:17:53 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9a683b56-b6f0-4ea8-b0b8-2f04d8241300 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -n -f - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:19:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 798d5b7a-e77d-42c0-b65f-d270df43c08a - status: - code: 200 - message: OK - request: body: null headers: @@ -2888,9 +1239,9 @@ interactions: ParameterSetName: - -g -n -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d601adfa-8067-4ffd-8e47-9b26c9c56e26?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9da6dd26-877b-432b-bccd-02b8c13da371?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2902,7 +1253,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:21:54 GMT + - Wed, 11 May 2022 19:56:33 GMT expires: - '-1' pragma: @@ -2919,7 +1270,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 94beb92d-0917-418a-a11f-a91d60c73361 + - 68acdf91-edd1-4169-902a-e643360d7afd status: code: 200 message: OK @@ -2937,13 +1288,13 @@ interactions: ParameterSetName: - -g -n -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"461f6167-7d8d-4ebe-91b9-ef01a376d303\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f69f389e-7273-4cdb-846f-9c603d4f304a\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -2954,13 +1305,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '655' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:21:55 GMT + - Wed, 11 May 2022 19:56:35 GMT etag: - - W/"461f6167-7d8d-4ebe-91b9-ef01a376d303" + - W/"f69f389e-7273-4cdb-846f-9c603d4f304a" expires: - '-1' pragma: @@ -2977,7 +1328,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9eeb958a-675d-4eec-8e63-99af57815dbc + - 28a4b47b-089b-4765-8db0-f9045aed929d status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_management_ip_config.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_management_ip_config.yaml index f85560bfb42..db9ed582d07 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_management_ip_config.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_management_ip_config.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_management_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.9767155Z","CreationDate":"2022-05-11T19:54:28.9766808Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '552' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:06:46 GMT + - Wed, 11 May 2022 19:54:31 GMT expires: - '-1' pragma: @@ -59,13 +59,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"582b2b17-3de8-4b9f-8645-b7c52f579e27\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"1ae45158-d3df-4944-9d46-9b09d306e07a\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -76,15 +76,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/edf1c1d5-608d-47a5-9f47-fd711e9c0457?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1864eb35-4286-4d69-a94a-bb7286ba585d?api-version=2021-08-01 cache-control: - no-cache content-length: - - '690' + - '661' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:06:52 GMT + - Wed, 11 May 2022 19:54:41 GMT expires: - '-1' pragma: @@ -97,9 +97,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1dd0c483-316a-4801-b768-6f6e29892626 + - facaf00f-06dd-4e04-97af-1f88ec0c26cd x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 201 message: Created @@ -117,9 +117,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/edf1c1d5-608d-47a5-9f47-fd711e9c0457?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1864eb35-4286-4d69-a94a-bb7286ba585d?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -131,7 +131,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:02 GMT + - Wed, 11 May 2022 19:54:51 GMT expires: - '-1' pragma: @@ -148,7 +148,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3b488cd3-6fb3-4388-901d-809886d061c9 + - 175a25ff-08ab-442b-baa6-f714fd4b6506 status: code: 200 message: OK @@ -166,13 +166,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"287132bf-1c1b-4f11-b6ec-47b30111e305\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5b872705-8137-4dd2-af93-84730f17291c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -183,13 +183,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '662' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:02 GMT + - Wed, 11 May 2022 19:54:52 GMT etag: - - W/"287132bf-1c1b-4f11-b6ec-47b30111e305" + - W/"5b872705-8137-4dd2-af93-84730f17291c" expires: - '-1' pragma: @@ -206,7 +206,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ca5a1f0e-1201-4b62-97cc-6b02333ff039 + - 8eaa4410-0d30-4ba0-bb6b-c011d00ef0e7 status: code: 200 message: OK @@ -224,21 +224,21 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_management_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.9767155Z","CreationDate":"2022-05-11T19:54:28.9766808Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '552' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:04 GMT + - Wed, 11 May 2022 19:54:52 GMT expires: - '-1' pragma: @@ -271,15 +271,15 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\",\r\n - \ \"etag\": \"W/\\\"f335c507-c1b5-4b95-b68c-56130b0213ce\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"45fed903-9573-41dd-9f81-cd02580789b1\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"ef8cdd0f-0aa5-47c8-a18e-f3a7faf858b3\",\r\n \"publicIPAddressVersion\": + \ \"resourceGuid\": \"1477dc32-5b59-4362-88b3-580b83ee7ed3\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n @@ -288,15 +288,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/05f0ece2-f82b-4395-a3bc-c5979e09c8ea?api-version=2021-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5ae663b1-a5f7-452c-afb7-ce1e0bd332ed?api-version=2021-05-01 cache-control: - no-cache content-length: - - '685' + - '656' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:12 GMT + - Wed, 11 May 2022 19:55:02 GMT expires: - '-1' pragma: @@ -309,9 +309,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 49315000-8c05-44eb-8880-b3ec81946094 + - 2299d4f3-9e48-4457-b641-f56da2290d11 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -329,9 +329,9 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/05f0ece2-f82b-4395-a3bc-c5979e09c8ea?api-version=2021-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5ae663b1-a5f7-452c-afb7-ce1e0bd332ed?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -343,7 +343,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:13 GMT + - Wed, 11 May 2022 19:55:03 GMT expires: - '-1' pragma: @@ -360,7 +360,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b4120028-5898-425d-a1cd-c7bd04063120 + - 15f2ed12-65b4-4fcd-9106-a9810e6cc36f status: code: 200 message: OK @@ -378,16 +378,16 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip\",\r\n - \ \"etag\": \"W/\\\"05a2b854-bf3d-4a31-88cc-b6c2367224f0\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"45b20ffe-7025-4171-a386-190c655d6b80\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"ef8cdd0f-0aa5-47c8-a18e-f3a7faf858b3\",\r\n \"ipAddress\": - \"52.180.67.4\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \ \"resourceGuid\": \"1477dc32-5b59-4362-88b3-580b83ee7ed3\",\r\n \"ipAddress\": + \"20.228.113.48\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" @@ -395,13 +395,13 @@ interactions: cache-control: - no-cache content-length: - - '719' + - '692' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:13 GMT + - Wed, 11 May 2022 19:55:03 GMT etag: - - W/"05a2b854-bf3d-4a31-88cc-b6c2367224f0" + - W/"45b20ffe-7025-4171-a386-190c655d6b80" expires: - '-1' pragma: @@ -418,7 +418,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cc591ee2-9ed4-4798-925d-5bb71461712a + - 7d42cf92-ec6f-4c19-8707-93451e09ddc9 status: code: 200 message: OK @@ -436,21 +436,21 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_management_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.9767155Z","CreationDate":"2022-05-11T19:54:28.9766808Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '552' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:13 GMT + - Wed, 11 May 2022 19:55:04 GMT expires: - '-1' pragma: @@ -483,15 +483,15 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2\",\r\n - \ \"etag\": \"W/\\\"b263d4f1-ccc2-4675-9b3b-dd0dd124b10e\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"94a04e2d-0026-44da-be2a-bd2d4935c499\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"d8144c38-0f7b-4ed6-b0e6-d68e07db0571\",\r\n \"publicIPAddressVersion\": + \ \"resourceGuid\": \"261f03bc-3579-48aa-a499-0b531e7d7442\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n @@ -500,15 +500,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/067056f1-241a-4925-840b-160678cbb35d?api-version=2021-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d8c17024-0fe3-4e8b-9c79-ebaa25ab5321?api-version=2021-05-01 cache-control: - no-cache content-length: - - '687' + - '658' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:21 GMT + - Wed, 11 May 2022 19:55:14 GMT expires: - '-1' pragma: @@ -521,7 +521,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c676076b-c66f-499d-8bca-84a26c6ef7f5 + - 6f793b30-954b-4ad5-83ac-ff413018d878 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -541,9 +541,9 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/067056f1-241a-4925-840b-160678cbb35d?api-version=2021-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d8c17024-0fe3-4e8b-9c79-ebaa25ab5321?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -555,7 +555,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:22 GMT + - Wed, 11 May 2022 19:55:15 GMT expires: - '-1' pragma: @@ -572,7 +572,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4dec88a6-1cf5-4ab7-adea-7d49904777cf + - 74889810-1421-4c92-8fdc-efb871048884 status: code: 200 message: OK @@ -590,16 +590,16 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip2\",\r\n - \ \"etag\": \"W/\\\"f360afd2-add9-4ccf-b16b-b1d81393d4fc\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"6ceaf0cc-5eaf-4042-b35a-62382fb45d84\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"d8144c38-0f7b-4ed6-b0e6-d68e07db0571\",\r\n \"ipAddress\": - \"52.180.67.7\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \ \"resourceGuid\": \"261f03bc-3579-48aa-a499-0b531e7d7442\",\r\n \"ipAddress\": + \"20.228.117.36\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" @@ -607,13 +607,13 @@ interactions: cache-control: - no-cache content-length: - - '721' + - '694' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:22 GMT + - Wed, 11 May 2022 19:55:16 GMT etag: - - W/"f360afd2-add9-4ccf-b16b-b1d81393d4fc" + - W/"6ceaf0cc-5eaf-4042-b35a-62382fb45d84" expires: - '-1' pragma: @@ -630,7 +630,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 61998a79-036a-481a-8674-478d7a86a9f8 + - 8bf76de9-9006-45ff-a987-4a152e61a39b status: code: 200 message: OK @@ -648,21 +648,21 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_management_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.9767155Z","CreationDate":"2022-05-11T19:54:28.9766808Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '552' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:23 GMT + - Wed, 11 May 2022 19:55:17 GMT expires: - '-1' pragma: @@ -695,15 +695,15 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip3?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip3\",\r\n - \ \"etag\": \"W/\\\"31193c33-b475-4850-982f-764833d6bafb\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"b691a127-c677-4942-b97b-ffae0683d614\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"0253c8a0-625d-445f-a097-9adc96b3f5f3\",\r\n \"publicIPAddressVersion\": + \ \"resourceGuid\": \"99427c3a-30ca-4b7c-8004-ab5083cc672a\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n @@ -712,15 +712,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ae01c782-3838-4292-9ca0-c290f3613eb7?api-version=2021-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d6d78d11-207f-413c-b7a7-5328a58e8d60?api-version=2021-05-01 cache-control: - no-cache content-length: - - '687' + - '658' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:31 GMT + - Wed, 11 May 2022 19:55:24 GMT expires: - '-1' pragma: @@ -733,7 +733,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 58b809d2-a39a-4ea1-aa66-643d0ffc7530 + - ffa61c18-3b0f-4bfd-bec4-55632cdcdac0 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -753,9 +753,9 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ae01c782-3838-4292-9ca0-c290f3613eb7?api-version=2021-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d6d78d11-207f-413c-b7a7-5328a58e8d60?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -767,7 +767,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:32 GMT + - Wed, 11 May 2022 19:55:26 GMT expires: - '-1' pragma: @@ -784,7 +784,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9487b004-c3d6-4ded-b12a-546f49612f1a + - 90f7a76e-c4b9-4492-8c61-373629a57169 status: code: 200 message: OK @@ -802,16 +802,16 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip3?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip3\",\r\n - \ \"etag\": \"W/\\\"dfbb4e4d-a2b7-40b4-8a17-ea19c34c5e48\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"eb48fa41-3a60-459e-9f1c-5176af9bcd12\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"0253c8a0-625d-445f-a097-9adc96b3f5f3\",\r\n \"ipAddress\": - \"52.180.66.101\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \ \"resourceGuid\": \"99427c3a-30ca-4b7c-8004-ab5083cc672a\",\r\n \"ipAddress\": + \"20.228.119.187\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" @@ -819,13 +819,13 @@ interactions: cache-control: - no-cache content-length: - - '723' + - '695' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:33 GMT + - Wed, 11 May 2022 19:55:26 GMT etag: - - W/"dfbb4e4d-a2b7-40b4-8a17-ea19c34c5e48" + - W/"eb48fa41-3a60-459e-9f1c-5176af9bcd12" expires: - '-1' pragma: @@ -842,7 +842,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3264581c-f21c-4abc-b3cb-5379fbb4daee + - f812cfcd-10ba-4f11-acc3-d82dec806ccf status: code: 200 message: OK @@ -860,21 +860,21 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_management_ip_config000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:28.9767155Z","CreationDate":"2022-05-11T19:54:28.9766808Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '428' + - '552' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:33 GMT + - Wed, 11 May 2022 19:55:26 GMT expires: - '-1' pragma: @@ -907,15 +907,15 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip4?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip4\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip4\",\r\n - \ \"etag\": \"W/\\\"d1ab6aae-f49c-4bfe-894e-eac899aed0b1\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"02de3781-921a-4589-9726-2b6ccca1da49\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"de42a620-e56b-4ddf-947e-f14ac97fbff0\",\r\n \"publicIPAddressVersion\": + \ \"resourceGuid\": \"e018bd86-d4e9-48ca-8eeb-87461e72535b\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n @@ -924,15 +924,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7718fb6a-a88f-4672-bd5d-31219db40f4d?api-version=2021-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/89f2e302-f655-4ce2-a29e-e17395d13b2c?api-version=2021-05-01 cache-control: - no-cache content-length: - - '687' + - '658' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:41 GMT + - Wed, 11 May 2022 19:55:34 GMT expires: - '-1' pragma: @@ -945,9 +945,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 15d75161-9b29-4ee3-8d9f-c65182e4e28b + - 2e8adb4d-1838-4923-8626-87f960cd9b89 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -965,9 +965,9 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7718fb6a-a88f-4672-bd5d-31219db40f4d?api-version=2021-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/89f2e302-f655-4ce2-a29e-e17395d13b2c?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -979,7 +979,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:42 GMT + - Wed, 11 May 2022 19:55:35 GMT expires: - '-1' pragma: @@ -996,7 +996,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e0ff3c3c-4f55-42a4-82a4-08887cd8e991 + - 5a196882-5684-4bda-ba42-0335dabe25e9 status: code: 200 message: OK @@ -1014,16 +1014,16 @@ interactions: ParameterSetName: - -g -n --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip4?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"pubip4\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip4\",\r\n - \ \"etag\": \"W/\\\"47b270ac-2953-4502-87b8-12a90e34fa98\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"dcaae724-1e1c-490c-a5d6-a5cb07644c50\\\"\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"de42a620-e56b-4ddf-947e-f14ac97fbff0\",\r\n \"ipAddress\": - \"52.180.67.21\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \ \"resourceGuid\": \"e018bd86-d4e9-48ca-8eeb-87461e72535b\",\r\n \"ipAddress\": + \"20.228.117.74\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" @@ -1031,243 +1031,13 @@ interactions: cache-control: - no-cache content-length: - - '722' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:07:43 GMT - etag: - - W/"47b270ac-2953-4502-87b8-12a90e34fa98" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 5340b73b-9323-4706-af47-ff4a6ea26729 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network vnet create - Connection: - - keep-alive - ParameterSetName: - - -g -n --subnet-name --address-prefixes --subnet-prefixes - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_management_ip_config000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001","name":"test_azure_firewall_management_ip_config000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '428' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:07:44 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "westus", "tags": {}, "properties": {"addressSpace": {"addressPrefixes": - ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"name": "AzureFirewallSubnet", - "properties": {"addressPrefix": "10.0.0.0/24", "privateEndpointNetworkPolicies": - "Enabled", "privateLinkServiceNetworkPolicies": "Enabled"}}]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network vnet create - Connection: - - keep-alive - Content-Length: - - '310' - Content-Type: - - application/json - ParameterSetName: - - -g -n --subnet-name --address-prefixes --subnet-prefixes - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2021-05-01 - response: - body: - string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n - \ \"etag\": \"W/\\\"54c95890-e56c-4e5a-92cf-77fec0cfcab8\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"94e9a9ba-b68f-4b73-86db-65b7f165ccd3\",\r\n \"addressSpace\": - {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n - \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n - \ \"subnets\": [\r\n {\r\n \"name\": \"AzureFirewallSubnet\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\",\r\n - \ \"etag\": \"W/\\\"54c95890-e56c-4e5a-92cf-77fec0cfcab8\\\"\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": - [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": - \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n - \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": - false\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/30fd67a6-302a-4818-ac86-f8473251e226?api-version=2021-05-01 - cache-control: - - no-cache - content-length: - - '1430' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:07:50 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - c39b18cd-32de-4b5e-be6a-9a8fe8fb4f62 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vnet create - Connection: - - keep-alive - ParameterSetName: - - -g -n --subnet-name --address-prefixes --subnet-prefixes - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/30fd67a6-302a-4818-ac86-f8473251e226?api-version=2021-05-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:07:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 7465e4c3-f7db-44df-96c2-be45dd37aa1c - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vnet create - Connection: - - keep-alive - ParameterSetName: - - -g -n --subnet-name --address-prefixes --subnet-prefixes - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2021-05-01 - response: - body: - string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n - \ \"etag\": \"W/\\\"53f1eff2-12b8-4535-8798-2490fe9c6cb0\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"94e9a9ba-b68f-4b73-86db-65b7f165ccd3\",\r\n \"addressSpace\": - {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n - \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n - \ \"subnets\": [\r\n {\r\n \"name\": \"AzureFirewallSubnet\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\",\r\n - \ \"etag\": \"W/\\\"53f1eff2-12b8-4535-8798-2490fe9c6cb0\\\"\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": - [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": - \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n - \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": - false\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1432' + - '694' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:54 GMT + - Wed, 11 May 2022 19:55:36 GMT etag: - - W/"53f1eff2-12b8-4535-8798-2490fe9c6cb0" + - W/"dcaae724-1e1c-490c-a5d6-a5cb07644c50" expires: - '-1' pragma: @@ -1284,7 +1054,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a4dfbdeb-63f4-4d68-928d-d80e55ab7783 + - 45e302bc-54fb-4496-80d2-206abaa00ee9 status: code: 200 message: OK @@ -1296,19 +1066,19 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network firewall ip-config create + - network firewall ip-config delete Connection: - keep-alive ParameterSetName: - - -g -n -f --public-ip-address --vnet-name + - -g -f -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"287132bf-1c1b-4f11-b6ec-47b30111e305\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5b872705-8137-4dd2-af93-84730f17291c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -1319,13 +1089,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '662' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:55 GMT + - Wed, 11 May 2022 19:55:37 GMT etag: - - W/"287132bf-1c1b-4f11-b6ec-47b30111e305" + - W/"5b872705-8137-4dd2-af93-84730f17291c" expires: - '-1' pragma: @@ -1342,68 +1112,57 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 68e2867a-8e34-4a44-86d5-f829a7066c8e + - efa8a476-99ec-4924-8685-21847a54e0b3 status: code: 200 message: OK - request: body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1", "location": "westus", "properties": {"applicationRuleCollections": [], "natRuleCollections": - [], "networkRuleCollections": [], "ipConfigurations": [{"name": "myipconfig3", - "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet"}, - "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip3"}}}], - "threatIntelMode": "Alert", "sku": {"name": "AZFW_VNet", "tier": "Standard"}, - "additionalProperties": {}}}' + [], "networkRuleCollections": [], "threatIntelMode": "Alert", "sku": {"name": + "AZFW_VNet", "tier": "Standard"}, "additionalProperties": {}}}' headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - network firewall ip-config create + - network firewall ip-config delete Connection: - keep-alive Content-Length: - - '965' + - '404' Content-Type: - application/json ParameterSetName: - - -g -n -f --public-ip-address --vnet-name + - -g -f -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d54a13b1-ddf3-4975-b3b1-35cc8702be11\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5b872705-8137-4dd2-af93-84730f17291c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig3\",\r\n - \ \"etag\": \"W/\\\"d54a13b1-ddf3-4975-b3b1-35cc8702be11\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip3\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" + [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": + [],\r\n \"natRuleCollections\": []\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/444b4b0b-a80b-4d3f-9861-c26bce0dee47?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f93d2fdf-ff59-4acb-b10b-097d44d79fca?api-version=2021-08-01 cache-control: - no-cache content-length: - - '1816' + - '662' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:56 GMT + - Wed, 11 May 2022 19:55:37 GMT expires: - '-1' pragma: @@ -1420,896 +1179,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 61387a8a-0c09-4a79-8ff9-9a4b9e239edc + - e89b5940-bdaa-43bb-85d4-1afab822bc23 x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/444b4b0b-a80b-4d3f-9861-c26bce0dee47?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:08:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 84e32b5d-095d-4e7b-9aad-cba7b8ca0f14 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/444b4b0b-a80b-4d3f-9861-c26bce0dee47?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:08:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 5a75de44-2201-4342-8568-4e7ba84175e5 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/444b4b0b-a80b-4d3f-9861-c26bce0dee47?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:08:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d72eaec6-5daf-45ba-9d73-8b9e354be03f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/444b4b0b-a80b-4d3f-9861-c26bce0dee47?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:08:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9befc543-f406-4ea3-9317-1839ab8f9696 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/444b4b0b-a80b-4d3f-9861-c26bce0dee47?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:09:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9b3a8079-f9c3-4745-ad43-51d8de21c416 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/444b4b0b-a80b-4d3f-9861-c26bce0dee47?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:10:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - fa7af3ee-13f4-40f5-be6b-8e6ba1d39afd - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/444b4b0b-a80b-4d3f-9861-c26bce0dee47?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ad1284df-512c-468b-a174-3f80b090a8aa - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"9637e2bc-2547-4285-8b0c-8718e5d187fd\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig3\",\r\n - \ \"etag\": \"W/\\\"9637e2bc-2547-4285-8b0c-8718e5d187fd\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip3\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1860' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:40 GMT - etag: - - W/"9637e2bc-2547-4285-8b0c-8718e5d187fd" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0886caa2-2b37-45c5-9925-89c6fb0d99e7 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"9637e2bc-2547-4285-8b0c-8718e5d187fd\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [\r\n {\r\n \"name\": \"myipconfig3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1/azureFirewallIpConfigurations/myipconfig3\",\r\n - \ \"etag\": \"W/\\\"9637e2bc-2547-4285-8b0c-8718e5d187fd\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/publicIPAddresses/pubip3\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - []\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1860' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:42 GMT - etag: - - W/"9637e2bc-2547-4285-8b0c-8718e5d187fd" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 72731eb3-f0e0-40e8-b3be-a045954d15b3 - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1", - "location": "westus", "properties": {"applicationRuleCollections": [], "natRuleCollections": - [], "networkRuleCollections": [], "threatIntelMode": "Alert", "sku": {"name": - "AZFW_VNet", "tier": "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - Content-Length: - - '433' - Content-Type: - - application/json - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"31b804f1-3113-4235-84ca-2c03558906d5\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": - \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": - [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": - [],\r\n \"natRuleCollections\": []\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '690' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d4decd8b-f54b-400e-a206-60af09200f72 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:11:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 57f43757-9d51-47bd-aef8-1f59f5ab9465 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:12:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 615c243c-89b0-4dd6-92bc-3acfe725ca33 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:12:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0ff26bc1-95f7-493e-a18f-422aaf48071f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:12:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 155aa95b-ee6e-4135-bbaf-abe74ed21786 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:13:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 491a4990-1c7f-478d-a47e-4e5fb87f1de2 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:14:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f7749160-30c3-4076-b774-85b0f5ae5bff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config delete - Connection: - - keep-alive - ParameterSetName: - - -g -f -n - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 89c064fd-9b76-488f-9697-a6d98edd1aa7 + - '1198' status: code: 200 message: OK @@ -2327,9 +1199,9 @@ interactions: ParameterSetName: - -g -f -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cb9da1ec-01f4-4de9-acab-cc34078ee012?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f93d2fdf-ff59-4acb-b10b-097d44d79fca?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2341,7 +1213,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:18:05 GMT + - Wed, 11 May 2022 19:56:08 GMT expires: - '-1' pragma: @@ -2358,7 +1230,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f7ba36d9-3b91-48be-9cf3-a8c74d915371 + - 3a652d73-54d1-4f4c-b8c6-56bc5f39d853 status: code: 200 message: OK @@ -2376,13 +1248,13 @@ interactions: ParameterSetName: - -g -f -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"786004ff-7a16-4f84-8efc-0e24896b3f98\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5b872705-8137-4dd2-af93-84730f17291c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -2393,13 +1265,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '662' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:18:05 GMT + - Wed, 11 May 2022 19:56:08 GMT etag: - - W/"786004ff-7a16-4f84-8efc-0e24896b3f98" + - W/"5b872705-8137-4dd2-af93-84730f17291c" expires: - '-1' pragma: @@ -2416,7 +1288,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6fdfdcad-ff70-4136-af74-a3a2374389cf + - e1e9963b-cef2-47f1-8139-1be8c7cb865a status: code: 200 message: OK @@ -2434,13 +1306,13 @@ interactions: ParameterSetName: - -g -f -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"786004ff-7a16-4f84-8efc-0e24896b3f98\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5b872705-8137-4dd2-af93-84730f17291c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -2451,13 +1323,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '662' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:18:07 GMT + - Wed, 11 May 2022 19:56:10 GMT etag: - - W/"786004ff-7a16-4f84-8efc-0e24896b3f98" + - W/"5b872705-8137-4dd2-af93-84730f17291c" expires: - '-1' pragma: @@ -2474,7 +1346,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e1c7e27b-52df-43e8-97b9-79b6c02d3bad + - d3ac6cd6-b462-4466-8219-c3640578ccc7 status: code: 200 message: OK @@ -2493,19 +1365,19 @@ interactions: Connection: - keep-alive Content-Length: - - '433' + - '404' Content-Type: - application/json ParameterSetName: - -g -f -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"786004ff-7a16-4f84-8efc-0e24896b3f98\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5b872705-8137-4dd2-af93-84730f17291c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -2516,15 +1388,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/b7ae541b-1b2b-43c1-a241-920b46479847?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5ab50014-108e-4486-98f3-ef9f6e76733a?api-version=2021-08-01 cache-control: - no-cache content-length: - - '691' + - '662' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:18:07 GMT + - Wed, 11 May 2022 19:56:11 GMT expires: - '-1' pragma: @@ -2541,7 +1413,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 61e7fc01-d738-4472-8840-8ce81e534654 + - 9ff3ae08-5511-445a-bbd0-ef40317f4182 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -2561,9 +1433,9 @@ interactions: ParameterSetName: - -g -f -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/b7ae541b-1b2b-43c1-a241-920b46479847?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5ab50014-108e-4486-98f3-ef9f6e76733a?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2575,7 +1447,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:18:37 GMT + - Wed, 11 May 2022 19:56:43 GMT expires: - '-1' pragma: @@ -2592,7 +1464,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ec35e9a3-f08d-4211-88fc-76197c35612a + - 8e579dfa-0656-4cab-af45-dc812b0d0c55 status: code: 200 message: OK @@ -2610,13 +1482,13 @@ interactions: ParameterSetName: - -g -f -n User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"786004ff-7a16-4f84-8efc-0e24896b3f98\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5b872705-8137-4dd2-af93-84730f17291c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -2627,13 +1499,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '662' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:18:37 GMT + - Wed, 11 May 2022 19:56:44 GMT etag: - - W/"786004ff-7a16-4f84-8efc-0e24896b3f98" + - W/"5b872705-8137-4dd2-af93-84730f17291c" expires: - '-1' pragma: @@ -2650,7 +1522,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ed8dd547-56a8-4821-a14f-df8a32daf255 + - 2d9b6547-7dc9-4910-9f8a-3cdf0fe46cf3 status: code: 200 message: OK @@ -2668,13 +1540,13 @@ interactions: ParameterSetName: - -g -f User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_management_ip_config000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"786004ff-7a16-4f84-8efc-0e24896b3f98\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5b872705-8137-4dd2-af93-84730f17291c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -2685,13 +1557,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '662' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:18:39 GMT + - Wed, 11 May 2022 19:56:47 GMT etag: - - W/"786004ff-7a16-4f84-8efc-0e24896b3f98" + - W/"5b872705-8137-4dd2-af93-84730f17291c" expires: - '-1' pragma: @@ -2708,7 +1580,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ff0e8fbf-dad5-4d56-a9f8-1a472a9cd0c0 + - a4031f2a-5e5b-4e74-b1e8-e0a428e6ecd1 status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy.yaml index 1c938fbbe46..b8a3912d96c 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy.yaml @@ -19,9 +19,9 @@ interactions: ParameterSetName: - -g -n -l --ip-addresses --fqdns --sku --idps-mode User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -34,18 +34,18 @@ interactions: []\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"fc1eede5-3c0d-49a8-9e77-81800d66e342\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"01ed06ef-4581-4d88-a928-ad81054704fa\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/d6a36f5c-400b-45a2-b109-152042e43220?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/e6ec502b-e7f7-42eb-9bd3-7b965c956dce?api-version=2021-08-01 cache-control: - no-cache content-length: - - '929' + - '890' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:13 GMT + - Wed, 11 May 2022 19:54:42 GMT expires: - '-1' pragma: @@ -75,9 +75,9 @@ interactions: ParameterSetName: - -g -n -l --ip-addresses --fqdns --sku --idps-mode User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/d6a36f5c-400b-45a2-b109-152042e43220?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/e6ec502b-e7f7-42eb-9bd3-7b965c956dce?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -89,7 +89,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:23 GMT + - Wed, 11 May 2022 19:54:54 GMT expires: - '-1' pragma: @@ -121,9 +121,9 @@ interactions: ParameterSetName: - -g -n -l --ip-addresses --fqdns --sku --idps-mode User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -136,18 +136,18 @@ interactions: []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"fc1eede5-3c0d-49a8-9e77-81800d66e342\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"01ed06ef-4581-4d88-a928-ad81054704fa\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '930' + - '891' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:23 GMT + - Wed, 11 May 2022 19:54:54 GMT etag: - - '"fc1eede5-3c0d-49a8-9e77-81800d66e342"' + - '"01ed06ef-4581-4d88-a928-ad81054704fa"' expires: - '-1' pragma: @@ -179,9 +179,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -194,18 +194,18 @@ interactions: []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"fc1eede5-3c0d-49a8-9e77-81800d66e342\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"01ed06ef-4581-4d88-a928-ad81054704fa\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '930' + - '891' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:26 GMT + - Wed, 11 May 2022 19:54:57 GMT etag: - - '"fc1eede5-3c0d-49a8-9e77-81800d66e342"' + - '"01ed06ef-4581-4d88-a928-ad81054704fa"' expires: - '-1' pragma: @@ -237,9 +237,9 @@ interactions: ParameterSetName: - -g User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies?api-version=2021-08-01 response: body: string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"sku\": @@ -254,17 +254,17 @@ interactions: \ \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"fc1eede5-3c0d-49a8-9e77-81800d66e342\",\r\n \"location\": + \ \"etag\": \"01ed06ef-4581-4d88-a928-ad81054704fa\",\r\n \"location\": \"centralus\"\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '1087' + - '1048' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:28 GMT + - Wed, 11 May 2022 19:54:59 GMT expires: - '-1' pragma: @@ -294,48 +294,88 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/firewallPolicies?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/firewallPolicies?api-version=2021-08-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"sku\": - {\r\n \"tier\": \"Premium\"\r\n },\r\n \"threatIntelMode\": - \"Alert\",\r\n \"threatIntelWhitelist\": {\r\n \"fqdns\": - [\r\n \"*.microsoft.com\"\r\n ],\r\n \"ipAddresses\": - [\r\n \"101.0.0.0\",\r\n \"101.0.0.1\"\r\n ]\r\n - \ },\r\n \"childPolicies\": [],\r\n \"ruleCollectionGroups\": - [],\r\n \"firewalls\": [],\r\n \"intrusionDetection\": {\r\n - \ \"mode\": \"Deny\",\r\n \"configuration\": {\r\n \"signatureOverrides\": - [],\r\n \"bypassTrafficSettings\": []\r\n }\r\n },\r\n - \ \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n - \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"fc1eede5-3c0d-49a8-9e77-81800d66e342\",\r\n \"location\": - \"centralus\"\r\n }\r\n ]\r\n}" + string: '{"value":[{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolicyWithShimi","name":"firewallPolicyWithShimi","type":"Microsoft.Network/FirewallPolicies","etag":"1894d051-c6bb-4327-a1f4-b2cd37777ba6","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolic1","name":"firewallPolic1","type":"Microsoft.Network/FirewallPolicies","etag":"2e067436-f49a-490b-b30f-e979e42df920","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolic2","name":"firewallPolic2","type":"Microsoft.Network/FirewallPolicies","etag":"247ac188-d82d-42cc-b928-116a546f4d4b","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallP765olic2","name":"firewallP765olic2","type":"Microsoft.Network/FirewallPolicies","etag":"8e94ea0f-7dd0-4698-97d5-a8da350f928d","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/adi123","name":"adi123","type":"Microsoft.Network/FirewallPolicies","etag":"5cec1d46-e9b3-4f5c-b55d-5cad047a057e","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"democert","keyVaultSecretId":"https://fw-premium-psybnozbyy53c.vault.azure.net/secrets/democert/ddddbfe41cb545a1a4aef705b3c7a957"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/liz_portalTesting/providers/Microsoft.Network/azureFirewalls/lihamilt_premiumTesting_inheritance"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy"},"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01","name":"premium-insik-bugbash-01","type":"Microsoft.Network/FirewallPolicies","etag":"769ec627-fb34-48fb-8b17-a1ae566572da","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sujith-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/DemoIdentity1":{"clientId":"7226a344-ae58-44cd-a8ab-28f09ddf2b92","principalId":"7ba56c8f-95ab-4472-83e1-a54f5fac574f"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Insik_TestRG/providers/Microsoft.Network/firewallPolicies/insikfirewallpolicy"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku","name":"lihamilt_testingSku","type":"Microsoft.Network/FirewallPolicies","etag":"5fd0fe10-2f67-4de3-8928-0911201d82b2","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"dnsSettings":{"servers":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/DefaultDnatRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/lihamilt_ruleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy","name":"lihamilt_premiumPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"2b1b699d-c566-4611-911b-e2d7c1f613b6","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest10","keyVaultSecretId":"https://fw-premium-25huhucywxyzm.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert1337/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert1337/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert1337/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"0f4346a8-a9ce-44eb-ac17-df74a5f94016","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert1337/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"02270c7f-874b-45d9-8a83-9555eeb3440a","principalId":"74304d77-0da4-41ba-a9f2-09d94379576b"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest22","keyVaultSecretId":"https://fw-premium-rxkde7yvqiewa.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert50/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert50/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert50/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"69bf3f83-336e-4055-bdde-69ed787549d2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert50/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0ba591e0-0b50-496e-aa3e-c616c24998c0","principalId":"2aafea1f-585f-4094-b2c6-e9a3ae576be8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"7cd7f1ec-bd3d-4f63-a074-7d62837929fb","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Yasmin-fw-premiun-rg2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e161bfaf-8162-4916-8734-003adedd7435","principalId":"2bb120d8-7c5e-448d-ad45-fcf33ce63082"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-23ixqaupttwxs.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Denis-perf-24/providers/Microsoft.Network/firewallPolicies/test006/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2800985","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Denis-perf-24/providers/Microsoft.Network/firewallPolicies/test006","name":"test006","type":"Microsoft.Network/FirewallPolicies","etag":"4c49529e-35cd-4b93-82ad-40aa47d4fea2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Denis-perf-24/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b6743fce-8526-414a-8f2a-09c59e5a553f","principalId":"673c69ae-7885-466a-8642-575b3845df3a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-tomzrisybep6e.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test010/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["142.251.36.14"],"destinationPorts":["80","443"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test010","name":"test010","type":"Microsoft.Network/FirewallPolicies","etag":"cba668a4-2adc-4eaf-a6e8-a33c6b07ff05","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e43eb4d4-9d1b-4e5d-9d3f-48847369c7aa","principalId":"46f95387-bebf-4253-be00-ef9c1eafb661"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-livoixkl5cxjo.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.Network/firewallPolicies/testPolicy/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.Network/firewallPolicies/testPolicy","name":"testPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"d55cd757-974b-4aa0-94ba-b11311276f99","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"799fddf0-1b9c-4746-bb93-4ab9d3c7e2a2","principalId":"3c3526a9-2286-46ed-a455-a53ccf1aef43"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-xybgfzp4hvuas.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/test010/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/test010","name":"test010","type":"Microsoft.Network/FirewallPolicies","etag":"9ba4469e-16fc-429e-8cf9-0583cc67457e","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b561b149-5b71-45a7-b967-fc65fa6e8a2a","principalId":"9dee91d8-3e3b-4789-8a22-cab9ae5ffd14"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-xybgfzp4hvuas.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"b7afa0be-b64a-4957-b201-39172b47d5ce","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b561b149-5b71-45a7-b967-fc65fa6e8a2a","principalId":"9dee91d8-3e3b-4789-8a22-cab9ae5ffd14"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-atjt3tinrphvs.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"a9483f84-e3a0-44db-8687-dc518963c42e","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e5b1fe27-492b-47f9-9d1d-60710a468168","principalId":"03f348eb-e158-45d8-8bcb-a09e9c04c9a3"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-zqf32efj7p626.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"168a3f27-6702-4b37-9aba-c540262314c1","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"ea441d5d-4b3a-4f28-9e09-9ca7cc27130f","principalId":"33bec4c0-743c-4558-95c1-fad995a7b304"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-rm3vsljlr3a7s.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"7117e063-1517-4f75-8a89-61387520a8a2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cbn-july-0/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-premium-rm3vsljlr3a7s":{"clientId":"475c0e65-b2d3-4c7f-8ea5-fb344644b1e4","principalId":"c88fa78a-2f25-45ad-b3da-f9ac870df7f5"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-f3skogsb3s4lo.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-idps-cve/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-idps-cve/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-idps-cve/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"810f0bf8-f651-45ae-a2b1-a2d64730299a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-idps-cve/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"3d3cb04b-fff8-43ba-902c-e6cc0ec180a4","principalId":"dc36afa4-dd47-4e47-83a7-7c92acbe2a38"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-iovui5jy3gmw6.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cdm-000/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cdm-000/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cdm-000/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"8033fff4-cad0-4214-8507-efc7a225bd59","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cdm-000/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-premium-iovui5jy3gmw6":{"clientId":"6264a47d-d07c-4251-a50e-b169cd0eab5c","principalId":"54cd7a80-51e0-444a-a16b-1f0d8a2bd8ef"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTestPurge","keyVaultSecretId":"https://fw-c-prgxurttmold6hva.vault.azure.net/secrets/cacertcprg"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-purge-25/providers/Microsoft.Network/firewallPolicies/test250/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[{"id":"2800985","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-purge-25/providers/Microsoft.Network/firewallPolicies/test250","name":"test250","type":"Microsoft.Network/FirewallPolicies","etag":"df2b593b-6ce4-42c5-a5ec-67ba5c70b681","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-purge-25/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"3812e637-437c-43e1-b0ad-5492b5ea785e","principalId":"97197d35-9672-4bc7-97a2-38ffc12e0169"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-7bqubu4527na2.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dmanesku_premium_2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dmanesku_premium_2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dmanesku_premium_2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"c9a20c7a-a1e7-4caa-a007-4ede7f904443","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dmanesku_premium_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"23aad456-9dd6-47c6-94f1-3c31b1a250f7","principalId":"db60e3cf-6d1d-49c8-b388-adcf4523fab8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"c53a7d79-d314-4a17-b2ef-d7d56a91ae73","location":"westus2","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-ew572cqbwhcx4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-perf-35/providers/Microsoft.Network/firewallPolicies/policy-perf/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-perf-35/providers/Microsoft.Network/azureFirewalls/fw-perf"}],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-perf-35/providers/Microsoft.Network/firewallPolicies/policy-perf","name":"policy-perf","type":"Microsoft.Network/FirewallPolicies","etag":"e47b0c74-8558-4959-ac0f-d37889e54696","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-perf-35/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-perf":{"clientId":"cbd06206-491f-41af-a616-be395fc17e1d","principalId":"a53e027e-2af9-44d0-9b09-7c477e63d77a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-b6lo3cxvj624c.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-managed-id/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"61ea50c7-367d-401b-a3e8-989b96dae564","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-managed-id/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"650b503f-1ba4-466e-ac94-6b83e1d85f78","principalId":"57b4671f-4192-48e1-ba80-bc0ba49e3d68"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-z6eqstx6vkpx4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-first-party/providers/Microsoft.Network/firewallPolicies/test005","name":"test005","type":"Microsoft.Network/FirewallPolicies","etag":"4dd51730-bd3c-46bb-b4a0-c4f71f316553","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-first-party/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"58464149-c734-4217-8432-63452c47e546","principalId":"e2182021-db06-4363-9b47-d19c3dc05788"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-qpmchjx4isthm.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-same-host-auth/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"0c868320-7aaa-4e68-b042-338276b8f7d5","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-same-host-auth/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"53d5e508-0cd1-4895-8b34-199249650458","principalId":"8a9c1071-c5dd-492c-9ea8-e6a7f186081a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-kb3gce25qnk5u.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-auth-2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"b7f59328-01d7-4e2f-82ff-cdfa5bace144","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-auth-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"1eaa595d-5fb0-4cca-a73d-5c127a7ec62c","principalId":"e2f995eb-9275-42a2-8add-1d32fcc32a61"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2000332","mode":"Off"},{"id":"2000015","mode":"Deny"},{"id":"2000345","mode":"Off"}],"bypassTrafficSettings":[]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/dikla_policy_parent","name":"dikla_policy_parent","type":"Microsoft.Network/FirewallPolicies","etag":"291e3d16-de25-4ca9-8a5c-fc9ccc4974d1","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest","name":"policytest","type":"Microsoft.Network/FirewallPolicies","etag":"67b132ce-7051-49e9-be92-d8d6cadb7299","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702","name":"policytest_premium_68a702","type":"Microsoft.Network/FirewallPolicies","etag":"97732749-46d1-44ad-a042-1ba931300541","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a","name":"policytest_premium_ae848a","type":"Microsoft.Network/FirewallPolicies","etag":"727b775a-2e0a-4c43-9c10-b48d1bcc2f10","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8","name":"policytest_premium_20b5d8","type":"Microsoft.Network/FirewallPolicies","etag":"b322f9dc-b515-4252-9450-7817c3a02532","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4","name":"policytest_premium_1557a4","type":"Microsoft.Network/FirewallPolicies","etag":"1418ee00-3be1-475d-8c41-04e9c24ad174","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd","name":"policytest_premium_ac81fd","type":"Microsoft.Network/FirewallPolicies","etag":"e3080d70-a166-4916-82b4-2c355bac64db","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-kyvs233i2kwnu.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/azureFirewalls/fw_premium_with_1"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"3d0e2d94-9da6-445d-95a5-c00bb9adfdaf","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_no_AZ_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"64885563-2191-46dd-bdf5-30fc6b79ffac","principalId":"3d256820-e46a-4085-8970-b7f9bd01b740"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/azureFirewalls/fw_premium_with_1"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"76d2128b-7bc6-4957-b58a-ebe561bb0e75","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-n4xywerujpzhg.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_false_2/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_false_2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_false_2/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"e8abda69-833e-4ffd-9689-e3adc3ff29ac","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_false_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"be131978-ae64-48c2-94bc-b0fab7a739b5","principalId":"3b64f1a9-e973-443a-85f5-b83d231ad82e"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/2"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/3"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/4"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/5"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/6"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/7"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/8"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/19"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/9"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/10"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/11"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/12"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/13"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/14"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/15"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/16"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/17"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/18"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/20"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/21"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/22"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/23"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/24"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/25"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/26"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/27"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/28"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/29"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/30"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/31"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/32"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/33"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/34"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/35"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/36"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/37"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/38"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/39"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice","name":"policy_slice","type":"Microsoft.Network/FirewallPolicies","etag":"b1b160ff-a4ee-4071-816c-a3010e73066b","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2004079","mode":"Deny"},{"id":"2000105","mode":"Deny"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/fw-policy","name":"fw-policy","type":"Microsoft.Network/FirewallPolicies","etag":"bb112786-65ea-4a7a-90a6-66239cfe25f3","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy02/ruleCollectionGroups/RulesCollectionGroup_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy02","name":"testpolicy02","type":"Microsoft.Network/FirewallPolicies","etag":"f58fdfdc-e4e4-44cb-957d-59804c0f2b99","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy03/ruleCollectionGroups/RulesCollectionGrouppp_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy03","name":"testpolicy03","type":"Microsoft.Network/FirewallPolicies","etag":"4efc21d5-ac6c-4766-9ad3-e46d369bc577","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy04/ruleCollectionGroups/RulesCollectionGroup_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy04","name":"testpolicy04","type":"Microsoft.Network/FirewallPolicies","etag":"6e1a1283-d95b-48d9-9eb5-0cb1c087f817","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child","name":"lihamilt_SQL_Redirect_Child","type":"Microsoft.Network/FirewallPolicies","etag":"1c929848-8b17-42f5-b1d1-d03265702474","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"sql":{"allowSqlRedirect":true},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child"}],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Parent","name":"lihamilt_SQL_Redirect_Parent","type":"Microsoft.Network/FirewallPolicies","etag":"7adabeb6-f743-467e-80a6-68711ab9b9f1","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-vpmlpyfh5dbbk.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/logging-poc/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/logging-poc/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/logging-poc/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"042ffa98-2438-4366-97cf-237144f8f4d1","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/logging-poc/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"25ec5f9a-c8c4-447e-bad1-2545bd9c5b5f","principalId":"fcd6a28c-bae5-49d2-9187-14ef0571cf46"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/ProductRuleCollectionGroupDevStorage"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"369701ce-84eb-421a-812a-65357f1b3fd0","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"fb54ef5f-b646-48f1-9420-331525ab1264","principalId":"109ae32a-3842-479a-81f3-5b96425d852b"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"cert","keyVaultSecretId":"https://bewaters-features-mwh.vault.azure.net/secrets/cert/a9e77ff7af1e451fae03fed9fc6abb4e"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/bewaters-trusted-services-mwh","name":"bewaters-trusted-services-mwh","type":"Microsoft.Network/FirewallPolicies","etag":"8dc0daa0-8568-4602-85a6-337730b34fcd","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-ma/providers/Microsoft.ManagedIdentity/userAssignedIdentities/bewaters-byok-success-ma":{"clientId":"3a73f346-1e57-4bfd-8bae-8af20dce0d3b","principalId":"e52b1619-d7ab-4f17-a1d1-be13afc9a95a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/trusted-services-mwh","name":"trusted-services-mwh","type":"Microsoft.Network/FirewallPolicies","etag":"5c56636f-4501-419b-b322-a614e0cfdb45","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testNfvrpRelease209/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy2/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testNfvrpRelease209/providers/Microsoft.Network/azureFirewalls/TestFW2"}],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testNfvrpRelease209/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy2","name":"TestFirewallPolicy2","type":"Microsoft.Network/FirewallPolicies","etag":"04456f78-3cf2-4857-afd3-d4070b3eb4e1","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"dnsSettings":{"servers":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/isguNfvrpImprovements/providers/Microsoft.Network/firewallPolicies/polic22","name":"polic22","type":"Microsoft.Network/FirewallPolicies","etag":"9a466aa3-6044-4dcf-b659-f79552043098","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/isguTestRuleAnalytics/providers/Microsoft.Network/firewallPolicies/policyTestRGDeprecation1","name":"policyTestRGDeprecation1","type":"Microsoft.Network/FirewallPolicies","etag":"55805402-9686-4d59-8584-3b8cc451fbd8","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testDeprecationRCG/providers/Microsoft.Network/firewallPolicies/fwPolicy1","name":"fwPolicy1","type":"Microsoft.Network/FirewallPolicies","etag":"c7380f36-4b45-4506-8ba8-50349d24740d","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testDeprecationRCG/providers/Microsoft.Network/firewallPolicies/fwPolicy2/ruleCollectionGroups/RCG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testDeprecationRCG/providers/Microsoft.Network/firewallPolicies/fwPolicy2","name":"fwPolicy2","type":"Microsoft.Network/FirewallPolicies","etag":"0183e4c1-e8a3-4400-ae9e-c69a2346aee7","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testDeprecationRCG/providers/Microsoft.Network/firewallPolicies/testBatch1","name":"testBatch1","type":"Microsoft.Network/FirewallPolicies","etag":"ba31a54c-7360-4f54-8551-83a9522a9c33","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testDeprecationRCG/providers/Microsoft.Network/firewallPolicies/policyFetchTrue","name":"policyFetchTrue","type":"Microsoft.Network/FirewallPolicies","etag":"8c23df9e-7321-4af6-9c74-1325ca28bc3e","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Deny","dnsSettings":{"servers":["8.8.18.8"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testDeprecationRCG/providers/Microsoft.Network/firewallPolicies/PolicyFetch2/ruleCollectionGroups/testRCG1"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testDeprecationRCG/providers/Microsoft.Network/azureFirewalls/fw2"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testDeprecationRCG/providers/Microsoft.Network/firewallPolicies/PolicyFetch2","name":"PolicyFetch2","type":"Microsoft.Network/FirewallPolicies","etag":"0b7a9ecc-1cca-46a8-a606-21e6933df8a7","location":"canadaeast"},{"properties":{"sku":{"tier":"Basic"},"threatIntelMode":"Alert","snat":{"privateRanges":["10.0.2.4","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","100.64.0.0/10"]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Mena-resource-group/providers/Microsoft.Network/azureFirewalls/basic_firewall_Mena"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/DefaultResourceGroup-CUS/providers/Microsoft.Network/azureFirewalls/Firewall_basic_test"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ssp-slice-testing-basic/providers/Microsoft.Network/firewallPolicies/policyTestJayBasic","name":"policyTestJayBasic","type":"Microsoft.Network/FirewallPolicies","etag":"d40bcad6-30df-4a77-a06e-58906355d7c7","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inherit_errortest02RG/providers/Microsoft.Network/firewallPolicies/jammyFPBase","name":"jammyFPBase","type":"Microsoft.Network/FirewallPolicies","etag":"cea7e4bc-4762-4c7f-ac4c-514c1f4fc404","location":"canadaeast"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_0"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_2"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_3"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_4"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_5"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_6"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_7"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_8"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_9"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_10"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_11"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_12"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_13"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_14"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_15"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_16"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_17"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_18"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_19"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_20"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_21"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_22"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_23"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_24"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_25"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_26"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_27"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_28"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_29"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_30"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_31"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_32"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_33"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_34"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_35"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_36"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_37"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_38"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_39"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_40"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_41"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_42"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_43"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_44"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_45"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_46"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_47"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_48"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_49"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_50"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_51"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_52"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_53"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_54"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_55"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_56"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_57"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_58"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4/ruleCollectionGroups/policy_4-RCG_59"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_canada_east/providers/Microsoft.Network/firewallPolicies/policy_4","name":"policy_4","type":"Microsoft.Network/FirewallPolicies","etag":"c83d7cf1-a5cc-4c79-a4e0-bdeef70c326d","location":"canadaeast"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"sql":{"allowSqlRedirect":true},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSQLCasing","name":"lihamilt_testingSQLCasing","type":"Microsoft.Network/FirewallPolicies","etag":"dadacb51-aab3-4f32-bcb4-11f442547471","location":"canadaeast","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://bewaters-byok-success-ma.vault.azure.net/secrets/interCA/a3003bed1de64f4cac7afbea98ccdfb2"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/policy/ruleCollectionGroups/RCG"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/policy","name":"policy","type":"Microsoft.Network/FirewallPolicies","etag":"adbce0f2-8533-4c67-866d-271ba05d103c","location":"southindia","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-ma/providers/Microsoft.ManagedIdentity/userAssignedIdentities/bewaters-byok-success-ma":{"clientId":"3a73f346-1e57-4bfd-8bae-8af20dce0d3b","principalId":"e52b1619-d7ab-4f17-a1d1-be13afc9a95a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://bewaters-byok-success-ma.vault.azure.net/secrets/interCA/a3003bed1de64f4cac7afbea98ccdfb2"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-ma/providers/Microsoft.Network/firewallPolicies/bewaters-byok-ma/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-ma/providers/Microsoft.Network/firewallPolicies/bewaters-byok-ma","name":"bewaters-byok-ma","type":"Microsoft.Network/FirewallPolicies","etag":"158fe807-8536-4061-bc72-da26427232fa","location":"southindia","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-ma/providers/Microsoft.ManagedIdentity/userAssignedIdentities/bewaters-byok-success-ma":{"clientId":"3a73f346-1e57-4bfd-8bae-8af20dce0d3b","principalId":"e52b1619-d7ab-4f17-a1d1-be13afc9a95a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/policy_2","name":"policy_2","type":"Microsoft.Network/FirewallPolicies","etag":"bbcd88a5-551f-4cb7-986f-90d8c71e02c6","location":"southindia","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/policy_3","name":"policy_3","type":"Microsoft.Network/FirewallPolicies","etag":"170560f8-bea6-4b67-b41c-20df838d0cbd","location":"southindia","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"transportSecurity":{"certificateAuthority":{"name":"tsName","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.Network/firewallPolicies/policy_1","name":"policy_1","type":"Microsoft.Network/FirewallPolicies","etag":"589075cd-2fea-4e9e-b524-5d577b3990d4","location":"southindia","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Deny","dnsSettings":{"servers":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/isguBB01/providers/Microsoft.Network/firewallPolicies/isguTest1","name":"isguTest1","type":"Microsoft.Network/FirewallPolicies","etag":"eb2ea486-67b4-4868-bba4-1c2427153af3","location":"westus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Deny","threatIntelWhitelist":{"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/isguBB01/providers/Microsoft.Network/firewallPolicies/isguTest12","name":"isguTest12","type":"Microsoft.Network/FirewallPolicies","etag":"7cf17faa-d7b5-4afe-b832-a6704aebe549","location":"westus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Deny","threatIntelWhitelist":{"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/isguBB01/providers/Microsoft.Network/firewallPolicies/isguTest22","name":"isguTest22","type":"Microsoft.Network/FirewallPolicies","etag":"cc755c2c-ec3f-46ec-b092-85d9472836f1","location":"westus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Deny","threatIntelWhitelist":{"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/isguBB01/providers/Microsoft.Network/firewallPolicies/isguTest221","name":"isguTest221","type":"Microsoft.Network/FirewallPolicies","etag":"2b756c19-48b8-4b11-81ab-1cbaf938d155","location":"westus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"6b88e30d-a80a-4f5a-8179-8a5e04e4d945","location":"westus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection2z4xtrlgsk365ul3xuvjwc37mbxx7/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy","name":"myFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"58511935-8e33-4af5-bdbc-7bedbd39a1f5","location":"westus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"dnsSettings":{"servers":["10.0.2.4"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/iavor-tcpreset1/providers/Microsoft.Network/firewallPolicies/FirewallPolicy_firewall1/ruleCollectionGroups/DefaultDnatRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/iavor-tcpreset1/providers/Microsoft.Network/firewallPolicies/FirewallPolicy_firewall1/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/iavor-tcpreset1/providers/Microsoft.Network/firewallPolicies/FirewallPolicy_firewall1","name":"FirewallPolicy_firewall1","type":"Microsoft.Network/FirewallPolicies","etag":"d6d24094-19f3-47d4-881b-1c970ad0afbc","location":"eastus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRunCommand/providers/Microsoft.Network/firewallPolicies/jammyFP02/ruleCollectionGroups/rcg01"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRunCommand/providers/Microsoft.Network/azureFirewalls/firewall1"}],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRunCommand/providers/Microsoft.Network/firewallPolicies/jammyFP02","name":"jammyFP02","type":"Microsoft.Network/FirewallPolicies","etag":"22c1bd61-cb70-4de1-a9ea-f7a3b735aec4","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand/providers/Microsoft.Network/firewallPolicies/jammyFPChild"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand/providers/Microsoft.Network/firewallPolicies/jammyFPBase/ruleCollectionGroups/rcg01"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand/providers/Microsoft.Network/firewallPolicies/jammyFPBase","name":"jammyFPBase","type":"Microsoft.Network/FirewallPolicies","etag":"db6bda68-c2a2-4add-bbaa-57bfbaf53f15","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand/providers/Microsoft.Network/azureFirewalls/firewall1"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand/providers/Microsoft.Network/firewallPolicies/jammyFPBase"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand/providers/Microsoft.Network/firewallPolicies/jammyFPChild","name":"jammyFPChild","type":"Microsoft.Network/FirewallPolicies","etag":"47cae14e-32b4-4288-8f01-c143a4404e38","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand2/providers/Microsoft.Network/firewallPolicies/jammyFPChild"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand2/providers/Microsoft.Network/firewallPolicies/jammyFPBase/ruleCollectionGroups/rcg01"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand2/providers/Microsoft.Network/firewallPolicies/jammyFPBase","name":"jammyFPBase","type":"Microsoft.Network/FirewallPolicies","etag":"302f49b6-08b2-45ef-a360-dca3e2721533","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand2/providers/Microsoft.Network/azureFirewalls/firewall1"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand2/providers/Microsoft.Network/firewallPolicies/jammyFPBase"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/inheritencetestRunCommand2/providers/Microsoft.Network/firewallPolicies/jammyFPChild","name":"jammyFPChild","type":"Microsoft.Network/FirewallPolicies","etag":"bd3320b4-e173-4f62-a380-1612608d04d9","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jagangul-dev-setup-fat-flows-april26-attempt-1/providers/Microsoft.Network/firewallpolicies/firewallPolicy1/ruleCollectionGroups/AppRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jagangul-dev-setup-fat-flows-april26-attempt-1/providers/Microsoft.Network/firewallpolicies/firewallPolicy1/ruleCollectionGroups/NetworkRG"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jagangul-dev-setup-fat-flows-april26-attempt-1/providers/Microsoft.Network/azureFirewalls/firewall1"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/jagangul-dev-setup-fat-flows-april26-attempt-1/providers/Microsoft.Network/firewallPolicies/firewallPolicy1","name":"firewallPolicy1","type":"Microsoft.Network/FirewallPolicies","etag":"acdf9d26-e3e7-4d9f-bdd1-03793e809aa1","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/joanna-pagination/providers/Microsoft.Network/firewallPolicies/basepolicy-eastus","name":"basepolicy-eastus","type":"Microsoft.Network/FirewallPolicies","etag":"e5e942e3-e9d7-4a7a-bfe7-86fb1546a310","location":"eastus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/policy_standard/ruleCollectionGroups/spcial_chars_RCG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/policy_standard/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/policy_standard","name":"policy_standard","type":"Microsoft.Network/FirewallPolicies","etag":"da9f5afc-54d7-4df8-801d-9263c460fd13","location":"eastus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy/ruleCollectionGroups/spcial_chars_RCG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy","name":"premium_policy","type":"Microsoft.Network/FirewallPolicies","etag":"15bcbeb6-dffc-49cd-b076-a64cb6641477","location":"eastus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy_2/ruleCollectionGroups/spcial_chars_RCG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy_2/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy_2","name":"premium_policy_2","type":"Microsoft.Network/FirewallPolicies","etag":"24367b1a-8a0f-4b93-8349-0ef2a605f0a6","location":"eastus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy_3/ruleCollectionGroups/spcial_chars_RCG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy_3/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy_3","name":"premium_policy_3","type":"Microsoft.Network/FirewallPolicies","etag":"9f8ee6b3-38ee-4ccc-91e6-d439a6292445","location":"eastus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_byok/providers/Microsoft.Network/firewallPolicies/premium_policy_choko","name":"premium_policy_choko","type":"Microsoft.Network/FirewallPolicies","etag":"5d28999e-106f-48cd-9915-ce0851b0131e","location":"eastus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Alert"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"73071c25-d249-44af-b921-1667bb8bd7c3","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test10RG/providers/Microsoft.Network/firewallPolicies/jammyFP01/ruleCollectionGroups/rcg01"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test10RG/providers/Microsoft.Network/firewallPolicies/jammyFP01","name":"jammyFP01","type":"Microsoft.Network/FirewallPolicies","etag":"ede96bb3-0640-4fdd-8cb9-e179174d1907","location":"eastus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub9/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Alert"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub9/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"79eccaa2-066f-4f20-89f8-5ae2afc31583","location":"eastus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Alert"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"76e6caf2-c377-493a-9df2-b14285af8d0a","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ssp-housekeep-leak-slice/providers/Microsoft.Network/firewallpolicies/firewallPolicy1/ruleCollectionGroups/AppRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ssp-housekeep-leak-slice/providers/Microsoft.Network/firewallpolicies/firewallPolicy1/ruleCollectionGroups/NetworkRG"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ssp-housekeep-leak-slice/providers/Microsoft.Network/azureFirewalls/firewall1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jagangul-dev-setup-fatflows-may10/providers/Microsoft.Network/azureFirewalls/firewall1"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ssp-housekeep-leak-slice/providers/Microsoft.Network/firewallPolicies/firewallPolicy1","name":"firewallPolicy1","type":"Microsoft.Network/FirewallPolicies","etag":"bee27983-fe91-41d0-b5e9-5b101394515d","location":"eastus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Alert"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"a186feec-2217-4f6e-bd75-fbe6a03d72ff","location":"eastus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Alert"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"d487a7ab-22c2-4742-bd63-2677f2f55953","location":"eastus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Alert"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"e13b1841-73be-44bc-8a7f-9e8bce10f386","location":"eastus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jagangul-dev-setup-fatflows-may10/providers/Microsoft.Network/firewallpolicies/firewallPolicy1/ruleCollectionGroups/AppRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jagangul-dev-setup-fatflows-may10/providers/Microsoft.Network/firewallpolicies/firewallPolicy1/ruleCollectionGroups/NetworkRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/jagangul-dev-setup-fatflows-may10/providers/Microsoft.Network/firewallPolicies/firewallPolicy1","name":"firewallPolicy1","type":"Microsoft.Network/FirewallPolicies","etag":"c65a5b5d-abf9-46bb-a387-872da33b9d5d","location":"eastus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Alert"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeletePremiumAzFwInHub2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"a91fa08a-e946-45bd-8f23-b9b4070f2d7e","location":"eastus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Child2"}],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Parent2","name":"lihamilt_SQL_Parent2","type":"Microsoft.Network/FirewallPolicies","etag":"68125877-e179-4b28-abae-6d4fd556cc9c","location":"westeurope","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Child2/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Child2/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Parent2"},"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Child2","name":"lihamilt_SQL_Child2","type":"Microsoft.Network/FirewallPolicies","etag":"5cf0041a-526d-47b0-862d-ba44361c1883","location":"westeurope","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolicyWithShimi","name":"firewallPolicyWithShimi","type":"Microsoft.Network/FirewallPolicies","etag":"1894d051-c6bb-4327-a1f4-b2cd37777ba6","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolic1","name":"firewallPolic1","type":"Microsoft.Network/FirewallPolicies","etag":"2e067436-f49a-490b-b30f-e979e42df920","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolic2","name":"firewallPolic2","type":"Microsoft.Network/FirewallPolicies","etag":"247ac188-d82d-42cc-b928-116a546f4d4b","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallP765olic2","name":"firewallP765olic2","type":"Microsoft.Network/FirewallPolicies","etag":"8e94ea0f-7dd0-4698-97d5-a8da350f928d","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/adi123","name":"adi123","type":"Microsoft.Network/FirewallPolicies","etag":"5cec1d46-e9b3-4f5c-b55d-5cad047a057e","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"democert","keyVaultSecretId":"https://fw-premium-psybnozbyy53c.vault.azure.net/secrets/democert/ddddbfe41cb545a1a4aef705b3c7a957"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/liz_portalTesting/providers/Microsoft.Network/azureFirewalls/lihamilt_premiumTesting_inheritance"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy"},"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01","name":"premium-insik-bugbash-01","type":"Microsoft.Network/FirewallPolicies","etag":"769ec627-fb34-48fb-8b17-a1ae566572da","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sujith-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/DemoIdentity1":{"clientId":"7226a344-ae58-44cd-a8ab-28f09ddf2b92","principalId":"7ba56c8f-95ab-4472-83e1-a54f5fac574f"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Insik_TestRG/providers/Microsoft.Network/firewallPolicies/insikfirewallpolicy"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku","name":"lihamilt_testingSku","type":"Microsoft.Network/FirewallPolicies","etag":"5fd0fe10-2f67-4de3-8928-0911201d82b2","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"dnsSettings":{"servers":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/DefaultDnatRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/lihamilt_ruleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy","name":"lihamilt_premiumPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"2b1b699d-c566-4611-911b-e2d7c1f613b6","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest10","keyVaultSecretId":"https://fw-premium-25huhucywxyzm.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert1337/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert1337/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert1337/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"0f4346a8-a9ce-44eb-ac17-df74a5f94016","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert1337/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"02270c7f-874b-45d9-8a83-9555eeb3440a","principalId":"74304d77-0da4-41ba-a9f2-09d94379576b"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest22","keyVaultSecretId":"https://fw-premium-rxkde7yvqiewa.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert50/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert50/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert50/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"69bf3f83-336e-4055-bdde-69ed787549d2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert50/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0ba591e0-0b50-496e-aa3e-c616c24998c0","principalId":"2aafea1f-585f-4094-b2c6-e9a3ae576be8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"7cd7f1ec-bd3d-4f63-a074-7d62837929fb","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Yasmin-fw-premiun-rg2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e161bfaf-8162-4916-8734-003adedd7435","principalId":"2bb120d8-7c5e-448d-ad45-fcf33ce63082"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-23ixqaupttwxs.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Denis-perf-24/providers/Microsoft.Network/firewallPolicies/test006/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2800985","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Denis-perf-24/providers/Microsoft.Network/firewallPolicies/test006","name":"test006","type":"Microsoft.Network/FirewallPolicies","etag":"4c49529e-35cd-4b93-82ad-40aa47d4fea2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Denis-perf-24/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b6743fce-8526-414a-8f2a-09c59e5a553f","principalId":"673c69ae-7885-466a-8642-575b3845df3a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-tomzrisybep6e.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test010/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["142.251.36.14"],"destinationPorts":["80","443"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test010","name":"test010","type":"Microsoft.Network/FirewallPolicies","etag":"cba668a4-2adc-4eaf-a6e8-a33c6b07ff05","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e43eb4d4-9d1b-4e5d-9d3f-48847369c7aa","principalId":"46f95387-bebf-4253-be00-ef9c1eafb661"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-livoixkl5cxjo.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.Network/firewallPolicies/testPolicy/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.Network/firewallPolicies/testPolicy","name":"testPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"d55cd757-974b-4aa0-94ba-b11311276f99","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"799fddf0-1b9c-4746-bb93-4ab9d3c7e2a2","principalId":"3c3526a9-2286-46ed-a455-a53ccf1aef43"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-xybgfzp4hvuas.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/test010/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/test010","name":"test010","type":"Microsoft.Network/FirewallPolicies","etag":"9ba4469e-16fc-429e-8cf9-0583cc67457e","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b561b149-5b71-45a7-b967-fc65fa6e8a2a","principalId":"9dee91d8-3e3b-4789-8a22-cab9ae5ffd14"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-xybgfzp4hvuas.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"b7afa0be-b64a-4957-b201-39172b47d5ce","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b561b149-5b71-45a7-b967-fc65fa6e8a2a","principalId":"9dee91d8-3e3b-4789-8a22-cab9ae5ffd14"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-atjt3tinrphvs.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"a9483f84-e3a0-44db-8687-dc518963c42e","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e5b1fe27-492b-47f9-9d1d-60710a468168","principalId":"03f348eb-e158-45d8-8bcb-a09e9c04c9a3"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-zqf32efj7p626.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"168a3f27-6702-4b37-9aba-c540262314c1","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"ea441d5d-4b3a-4f28-9e09-9ca7cc27130f","principalId":"33bec4c0-743c-4558-95c1-fad995a7b304"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-rm3vsljlr3a7s.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"7117e063-1517-4f75-8a89-61387520a8a2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cbn-july-0/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-premium-rm3vsljlr3a7s":{"clientId":"475c0e65-b2d3-4c7f-8ea5-fb344644b1e4","principalId":"c88fa78a-2f25-45ad-b3da-f9ac870df7f5"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-f3skogsb3s4lo.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-idps-cve/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-idps-cve/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-idps-cve/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"810f0bf8-f651-45ae-a2b1-a2d64730299a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-idps-cve/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"3d3cb04b-fff8-43ba-902c-e6cc0ec180a4","principalId":"dc36afa4-dd47-4e47-83a7-7c92acbe2a38"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-iovui5jy3gmw6.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cdm-000/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cdm-000/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cdm-000/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"8033fff4-cad0-4214-8507-efc7a225bd59","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cdm-000/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-premium-iovui5jy3gmw6":{"clientId":"6264a47d-d07c-4251-a50e-b169cd0eab5c","principalId":"54cd7a80-51e0-444a-a16b-1f0d8a2bd8ef"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTestPurge","keyVaultSecretId":"https://fw-c-prgxurttmold6hva.vault.azure.net/secrets/cacertcprg"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-purge-25/providers/Microsoft.Network/firewallPolicies/test250/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[{"id":"2800985","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-purge-25/providers/Microsoft.Network/firewallPolicies/test250","name":"test250","type":"Microsoft.Network/FirewallPolicies","etag":"df2b593b-6ce4-42c5-a5ec-67ba5c70b681","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-purge-25/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"3812e637-437c-43e1-b0ad-5492b5ea785e","principalId":"97197d35-9672-4bc7-97a2-38ffc12e0169"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-7bqubu4527na2.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dmanesku_premium_2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dmanesku_premium_2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dmanesku_premium_2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"c9a20c7a-a1e7-4caa-a007-4ede7f904443","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dmanesku_premium_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"23aad456-9dd6-47c6-94f1-3c31b1a250f7","principalId":"db60e3cf-6d1d-49c8-b388-adcf4523fab8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"c53a7d79-d314-4a17-b2ef-d7d56a91ae73","location":"westus2","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-ew572cqbwhcx4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-perf-35/providers/Microsoft.Network/firewallPolicies/policy-perf/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-perf-35/providers/Microsoft.Network/azureFirewalls/fw-perf"}],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-perf-35/providers/Microsoft.Network/firewallPolicies/policy-perf","name":"policy-perf","type":"Microsoft.Network/FirewallPolicies","etag":"e47b0c74-8558-4959-ac0f-d37889e54696","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-perf-35/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-perf":{"clientId":"cbd06206-491f-41af-a616-be395fc17e1d","principalId":"a53e027e-2af9-44d0-9b09-7c477e63d77a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-b6lo3cxvj624c.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-managed-id/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"61ea50c7-367d-401b-a3e8-989b96dae564","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-managed-id/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"650b503f-1ba4-466e-ac94-6b83e1d85f78","principalId":"57b4671f-4192-48e1-ba80-bc0ba49e3d68"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-z6eqstx6vkpx4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-first-party/providers/Microsoft.Network/firewallPolicies/test005","name":"test005","type":"Microsoft.Network/FirewallPolicies","etag":"4dd51730-bd3c-46bb-b4a0-c4f71f316553","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-first-party/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"58464149-c734-4217-8432-63452c47e546","principalId":"e2182021-db06-4363-9b47-d19c3dc05788"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-qpmchjx4isthm.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-same-host-auth/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"0c868320-7aaa-4e68-b042-338276b8f7d5","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-same-host-auth/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"53d5e508-0cd1-4895-8b34-199249650458","principalId":"8a9c1071-c5dd-492c-9ea8-e6a7f186081a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-kb3gce25qnk5u.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-auth-2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"b7f59328-01d7-4e2f-82ff-cdfa5bace144","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-auth-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"1eaa595d-5fb0-4cca-a73d-5c127a7ec62c","principalId":"e2f995eb-9275-42a2-8add-1d32fcc32a61"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2000332","mode":"Off"},{"id":"2000015","mode":"Deny"},{"id":"2000345","mode":"Off"}],"bypassTrafficSettings":[]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/dikla_policy_parent","name":"dikla_policy_parent","type":"Microsoft.Network/FirewallPolicies","etag":"291e3d16-de25-4ca9-8a5c-fc9ccc4974d1","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest","name":"policytest","type":"Microsoft.Network/FirewallPolicies","etag":"67b132ce-7051-49e9-be92-d8d6cadb7299","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702","name":"policytest_premium_68a702","type":"Microsoft.Network/FirewallPolicies","etag":"97732749-46d1-44ad-a042-1ba931300541","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a","name":"policytest_premium_ae848a","type":"Microsoft.Network/FirewallPolicies","etag":"727b775a-2e0a-4c43-9c10-b48d1bcc2f10","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8","name":"policytest_premium_20b5d8","type":"Microsoft.Network/FirewallPolicies","etag":"b322f9dc-b515-4252-9450-7817c3a02532","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4","name":"policytest_premium_1557a4","type":"Microsoft.Network/FirewallPolicies","etag":"1418ee00-3be1-475d-8c41-04e9c24ad174","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd","name":"policytest_premium_ac81fd","type":"Microsoft.Network/FirewallPolicies","etag":"e3080d70-a166-4916-82b4-2c355bac64db","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-kyvs233i2kwnu.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/azureFirewalls/fw_premium_with_1"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"3d0e2d94-9da6-445d-95a5-c00bb9adfdaf","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_no_AZ_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"64885563-2191-46dd-bdf5-30fc6b79ffac","principalId":"3d256820-e46a-4085-8970-b7f9bd01b740"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/azureFirewalls/fw_premium_with_1"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"76d2128b-7bc6-4957-b58a-ebe561bb0e75","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-n4xywerujpzhg.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_false_2/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_false_2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_false_2/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"e8abda69-833e-4ffd-9689-e3adc3ff29ac","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_false_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"be131978-ae64-48c2-94bc-b0fab7a739b5","principalId":"3b64f1a9-e973-443a-85f5-b83d231ad82e"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/2"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/3"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/4"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/5"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/6"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/7"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/8"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/19"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/9"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/10"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/11"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/12"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/13"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/14"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/15"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/16"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/17"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/18"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/20"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/21"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/22"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/23"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/24"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/25"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/26"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/27"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/28"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/29"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/30"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/31"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/32"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/33"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/34"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/35"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/36"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/37"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/38"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/39"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice","name":"policy_slice","type":"Microsoft.Network/FirewallPolicies","etag":"b1b160ff-a4ee-4071-816c-a3010e73066b","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2004079","mode":"Deny"},{"id":"2000105","mode":"Deny"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/fw-policy","name":"fw-policy","type":"Microsoft.Network/FirewallPolicies","etag":"bb112786-65ea-4a7a-90a6-66239cfe25f3","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy02/ruleCollectionGroups/RulesCollectionGroup_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy02","name":"testpolicy02","type":"Microsoft.Network/FirewallPolicies","etag":"f58fdfdc-e4e4-44cb-957d-59804c0f2b99","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy03/ruleCollectionGroups/RulesCollectionGrouppp_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy03","name":"testpolicy03","type":"Microsoft.Network/FirewallPolicies","etag":"4efc21d5-ac6c-4766-9ad3-e46d369bc577","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy04/ruleCollectionGroups/RulesCollectionGroup_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy04","name":"testpolicy04","type":"Microsoft.Network/FirewallPolicies","etag":"6e1a1283-d95b-48d9-9eb5-0cb1c087f817","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child","name":"lihamilt_SQL_Redirect_Child","type":"Microsoft.Network/FirewallPolicies","etag":"1c929848-8b17-42f5-b1d1-d03265702474","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"sql":{"allowSqlRedirect":true},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child"}],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Parent","name":"lihamilt_SQL_Redirect_Parent","type":"Microsoft.Network/FirewallPolicies","etag":"7adabeb6-f743-467e-80a6-68711ab9b9f1","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-vpmlpyfh5dbbk.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/logging-poc/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/logging-poc/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/logging-poc/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"042ffa98-2438-4366-97cf-237144f8f4d1","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/logging-poc/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"25ec5f9a-c8c4-447e-bad1-2545bd9c5b5f","principalId":"fcd6a28c-bae5-49d2-9187-14ef0571cf46"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/ProductRuleCollectionGroupDevStorage"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"369701ce-84eb-421a-812a-65357f1b3fd0","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"fb54ef5f-b646-48f1-9420-331525ab1264","principalId":"109ae32a-3842-479a-81f3-5b96425d852b"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"cert","keyVaultSecretId":"https://bewaters-features-mwh.vault.azure.net/secrets/cert/a9e77ff7af1e451fae03fed9fc6abb4e"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/bewaters-trusted-services-mwh","name":"bewaters-trusted-services-mwh","type":"Microsoft.Network/FirewallPolicies","etag":"8dc0daa0-8568-4602-85a6-337730b34fcd","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-ma/providers/Microsoft.ManagedIdentity/userAssignedIdentities/bewaters-byok-success-ma":{"clientId":"3a73f346-1e57-4bfd-8bae-8af20dce0d3b","principalId":"e52b1619-d7ab-4f17-a1d1-be13afc9a95a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/trusted-services-mwh","name":"trusted-services-mwh","type":"Microsoft.Network/FirewallPolicies","etag":"5c56636f-4501-419b-b322-a614e0cfdb45","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolicyWithShimi","name":"firewallPolicyWithShimi","type":"Microsoft.Network/FirewallPolicies","etag":"1894d051-c6bb-4327-a1f4-b2cd37777ba6","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolic1","name":"firewallPolic1","type":"Microsoft.Network/FirewallPolicies","etag":"2e067436-f49a-490b-b30f-e979e42df920","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolic2","name":"firewallPolic2","type":"Microsoft.Network/FirewallPolicies","etag":"247ac188-d82d-42cc-b928-116a546f4d4b","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallP765olic2","name":"firewallP765olic2","type":"Microsoft.Network/FirewallPolicies","etag":"8e94ea0f-7dd0-4698-97d5-a8da350f928d","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/adi123","name":"adi123","type":"Microsoft.Network/FirewallPolicies","etag":"5cec1d46-e9b3-4f5c-b55d-5cad047a057e","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"democert","keyVaultSecretId":"https://fw-premium-psybnozbyy53c.vault.azure.net/secrets/democert/ddddbfe41cb545a1a4aef705b3c7a957"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/liz_portalTesting/providers/Microsoft.Network/azureFirewalls/lihamilt_premiumTesting_inheritance"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy"},"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01","name":"premium-insik-bugbash-01","type":"Microsoft.Network/FirewallPolicies","etag":"769ec627-fb34-48fb-8b17-a1ae566572da","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sujith-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/DemoIdentity1":{"clientId":"7226a344-ae58-44cd-a8ab-28f09ddf2b92","principalId":"7ba56c8f-95ab-4472-83e1-a54f5fac574f"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Insik_TestRG/providers/Microsoft.Network/firewallPolicies/insikfirewallpolicy"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku","name":"lihamilt_testingSku","type":"Microsoft.Network/FirewallPolicies","etag":"5fd0fe10-2f67-4de3-8928-0911201d82b2","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"dnsSettings":{"servers":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/DefaultDnatRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/lihamilt_ruleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy","name":"lihamilt_premiumPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"2b1b699d-c566-4611-911b-e2d7c1f613b6","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest10","keyVaultSecretId":"https://fw-premium-25huhucywxyzm.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert1337/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert1337/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert1337/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"0f4346a8-a9ce-44eb-ac17-df74a5f94016","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert1337/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"02270c7f-874b-45d9-8a83-9555eeb3440a","principalId":"74304d77-0da4-41ba-a9f2-09d94379576b"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest22","keyVaultSecretId":"https://fw-premium-rxkde7yvqiewa.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert50/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert50/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert50/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"69bf3f83-336e-4055-bdde-69ed787549d2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert50/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0ba591e0-0b50-496e-aa3e-c616c24998c0","principalId":"2aafea1f-585f-4094-b2c6-e9a3ae576be8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"7cd7f1ec-bd3d-4f63-a074-7d62837929fb","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Yasmin-fw-premiun-rg2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e161bfaf-8162-4916-8734-003adedd7435","principalId":"2bb120d8-7c5e-448d-ad45-fcf33ce63082"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-23ixqaupttwxs.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Denis-perf-24/providers/Microsoft.Network/firewallPolicies/test006/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2800985","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Denis-perf-24/providers/Microsoft.Network/firewallPolicies/test006","name":"test006","type":"Microsoft.Network/FirewallPolicies","etag":"4c49529e-35cd-4b93-82ad-40aa47d4fea2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Denis-perf-24/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b6743fce-8526-414a-8f2a-09c59e5a553f","principalId":"673c69ae-7885-466a-8642-575b3845df3a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-tomzrisybep6e.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test010/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["142.251.36.14"],"destinationPorts":["80","443"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test010","name":"test010","type":"Microsoft.Network/FirewallPolicies","etag":"cba668a4-2adc-4eaf-a6e8-a33c6b07ff05","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e43eb4d4-9d1b-4e5d-9d3f-48847369c7aa","principalId":"46f95387-bebf-4253-be00-ef9c1eafb661"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-livoixkl5cxjo.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.Network/firewallPolicies/testPolicy/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.Network/firewallPolicies/testPolicy","name":"testPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"d55cd757-974b-4aa0-94ba-b11311276f99","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"799fddf0-1b9c-4746-bb93-4ab9d3c7e2a2","principalId":"3c3526a9-2286-46ed-a455-a53ccf1aef43"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-xybgfzp4hvuas.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/test010/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/test010","name":"test010","type":"Microsoft.Network/FirewallPolicies","etag":"9ba4469e-16fc-429e-8cf9-0583cc67457e","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b561b149-5b71-45a7-b967-fc65fa6e8a2a","principalId":"9dee91d8-3e3b-4789-8a22-cab9ae5ffd14"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-xybgfzp4hvuas.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"b7afa0be-b64a-4957-b201-39172b47d5ce","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b561b149-5b71-45a7-b967-fc65fa6e8a2a","principalId":"9dee91d8-3e3b-4789-8a22-cab9ae5ffd14"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-atjt3tinrphvs.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"a9483f84-e3a0-44db-8687-dc518963c42e","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e5b1fe27-492b-47f9-9d1d-60710a468168","principalId":"03f348eb-e158-45d8-8bcb-a09e9c04c9a3"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-zqf32efj7p626.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"168a3f27-6702-4b37-9aba-c540262314c1","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"ea441d5d-4b3a-4f28-9e09-9ca7cc27130f","principalId":"33bec4c0-743c-4558-95c1-fad995a7b304"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-rm3vsljlr3a7s.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"7117e063-1517-4f75-8a89-61387520a8a2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cbn-july-0/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-premium-rm3vsljlr3a7s":{"clientId":"475c0e65-b2d3-4c7f-8ea5-fb344644b1e4","principalId":"c88fa78a-2f25-45ad-b3da-f9ac870df7f5"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-f3skogsb3s4lo.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-idps-cve/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-idps-cve/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-idps-cve/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"810f0bf8-f651-45ae-a2b1-a2d64730299a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-idps-cve/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"3d3cb04b-fff8-43ba-902c-e6cc0ec180a4","principalId":"dc36afa4-dd47-4e47-83a7-7c92acbe2a38"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-iovui5jy3gmw6.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cdm-000/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cdm-000/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cdm-000/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"8033fff4-cad0-4214-8507-efc7a225bd59","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cdm-000/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-premium-iovui5jy3gmw6":{"clientId":"6264a47d-d07c-4251-a50e-b169cd0eab5c","principalId":"54cd7a80-51e0-444a-a16b-1f0d8a2bd8ef"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTestPurge","keyVaultSecretId":"https://fw-c-prgxurttmold6hva.vault.azure.net/secrets/cacertcprg"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-purge-25/providers/Microsoft.Network/firewallPolicies/test250/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[{"id":"2800985","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-purge-25/providers/Microsoft.Network/firewallPolicies/test250","name":"test250","type":"Microsoft.Network/FirewallPolicies","etag":"df2b593b-6ce4-42c5-a5ec-67ba5c70b681","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-purge-25/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"3812e637-437c-43e1-b0ad-5492b5ea785e","principalId":"97197d35-9672-4bc7-97a2-38ffc12e0169"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-7bqubu4527na2.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dmanesku_premium_2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dmanesku_premium_2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dmanesku_premium_2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"c9a20c7a-a1e7-4caa-a007-4ede7f904443","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dmanesku_premium_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"23aad456-9dd6-47c6-94f1-3c31b1a250f7","principalId":"db60e3cf-6d1d-49c8-b388-adcf4523fab8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"c53a7d79-d314-4a17-b2ef-d7d56a91ae73","location":"westus2","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-ew572cqbwhcx4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-perf-35/providers/Microsoft.Network/firewallPolicies/policy-perf/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-perf-35/providers/Microsoft.Network/azureFirewalls/fw-perf"}],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-perf-35/providers/Microsoft.Network/firewallPolicies/policy-perf","name":"policy-perf","type":"Microsoft.Network/FirewallPolicies","etag":"e47b0c74-8558-4959-ac0f-d37889e54696","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-perf-35/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-perf":{"clientId":"cbd06206-491f-41af-a616-be395fc17e1d","principalId":"a53e027e-2af9-44d0-9b09-7c477e63d77a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-b6lo3cxvj624c.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-managed-id/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"61ea50c7-367d-401b-a3e8-989b96dae564","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-managed-id/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"650b503f-1ba4-466e-ac94-6b83e1d85f78","principalId":"57b4671f-4192-48e1-ba80-bc0ba49e3d68"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-z6eqstx6vkpx4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-first-party/providers/Microsoft.Network/firewallPolicies/test005","name":"test005","type":"Microsoft.Network/FirewallPolicies","etag":"4dd51730-bd3c-46bb-b4a0-c4f71f316553","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-first-party/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"58464149-c734-4217-8432-63452c47e546","principalId":"e2182021-db06-4363-9b47-d19c3dc05788"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-qpmchjx4isthm.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-same-host-auth/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"0c868320-7aaa-4e68-b042-338276b8f7d5","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-same-host-auth/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"53d5e508-0cd1-4895-8b34-199249650458","principalId":"8a9c1071-c5dd-492c-9ea8-e6a7f186081a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-kb3gce25qnk5u.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-auth-2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"b7f59328-01d7-4e2f-82ff-cdfa5bace144","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-auth-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"1eaa595d-5fb0-4cca-a73d-5c127a7ec62c","principalId":"e2f995eb-9275-42a2-8add-1d32fcc32a61"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2000332","mode":"Off"},{"id":"2000015","mode":"Deny"},{"id":"2000345","mode":"Off"}],"bypassTrafficSettings":[]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/dikla_policy_parent","name":"dikla_policy_parent","type":"Microsoft.Network/FirewallPolicies","etag":"291e3d16-de25-4ca9-8a5c-fc9ccc4974d1","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest","name":"policytest","type":"Microsoft.Network/FirewallPolicies","etag":"67b132ce-7051-49e9-be92-d8d6cadb7299","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702","name":"policytest_premium_68a702","type":"Microsoft.Network/FirewallPolicies","etag":"97732749-46d1-44ad-a042-1ba931300541","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a","name":"policytest_premium_ae848a","type":"Microsoft.Network/FirewallPolicies","etag":"727b775a-2e0a-4c43-9c10-b48d1bcc2f10","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8","name":"policytest_premium_20b5d8","type":"Microsoft.Network/FirewallPolicies","etag":"b322f9dc-b515-4252-9450-7817c3a02532","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4","name":"policytest_premium_1557a4","type":"Microsoft.Network/FirewallPolicies","etag":"1418ee00-3be1-475d-8c41-04e9c24ad174","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd","name":"policytest_premium_ac81fd","type":"Microsoft.Network/FirewallPolicies","etag":"e3080d70-a166-4916-82b4-2c355bac64db","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-kyvs233i2kwnu.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/azureFirewalls/fw_premium_with_1"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"3d0e2d94-9da6-445d-95a5-c00bb9adfdaf","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_no_AZ_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"64885563-2191-46dd-bdf5-30fc6b79ffac","principalId":"3d256820-e46a-4085-8970-b7f9bd01b740"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/azureFirewalls/fw_premium_with_1"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"76d2128b-7bc6-4957-b58a-ebe561bb0e75","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-n4xywerujpzhg.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_false_2/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_false_2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_false_2/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"e8abda69-833e-4ffd-9689-e3adc3ff29ac","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_false_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"be131978-ae64-48c2-94bc-b0fab7a739b5","principalId":"3b64f1a9-e973-443a-85f5-b83d231ad82e"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/2"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/3"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/4"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/5"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/6"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/7"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/8"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/19"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/9"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/10"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/11"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/12"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/13"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/14"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/15"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/16"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/17"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/18"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/20"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/21"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/22"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/23"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/24"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/25"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/26"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/27"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/28"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/29"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/30"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/31"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/32"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/33"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/34"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/35"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/36"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/37"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/38"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/39"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice","name":"policy_slice","type":"Microsoft.Network/FirewallPolicies","etag":"b1b160ff-a4ee-4071-816c-a3010e73066b","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2004079","mode":"Deny"},{"id":"2000105","mode":"Deny"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/fw-policy","name":"fw-policy","type":"Microsoft.Network/FirewallPolicies","etag":"bb112786-65ea-4a7a-90a6-66239cfe25f3","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy02/ruleCollectionGroups/RulesCollectionGroup_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy02","name":"testpolicy02","type":"Microsoft.Network/FirewallPolicies","etag":"f58fdfdc-e4e4-44cb-957d-59804c0f2b99","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy03/ruleCollectionGroups/RulesCollectionGrouppp_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy03","name":"testpolicy03","type":"Microsoft.Network/FirewallPolicies","etag":"4efc21d5-ac6c-4766-9ad3-e46d369bc577","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy04/ruleCollectionGroups/RulesCollectionGroup_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy04","name":"testpolicy04","type":"Microsoft.Network/FirewallPolicies","etag":"6e1a1283-d95b-48d9-9eb5-0cb1c087f817","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child","name":"lihamilt_SQL_Redirect_Child","type":"Microsoft.Network/FirewallPolicies","etag":"1c929848-8b17-42f5-b1d1-d03265702474","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"sql":{"allowSqlRedirect":true},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child"}],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Parent","name":"lihamilt_SQL_Redirect_Parent","type":"Microsoft.Network/FirewallPolicies","etag":"7adabeb6-f743-467e-80a6-68711ab9b9f1","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-vpmlpyfh5dbbk.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/logging-poc/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/logging-poc/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/logging-poc/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"042ffa98-2438-4366-97cf-237144f8f4d1","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/logging-poc/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"25ec5f9a-c8c4-447e-bad1-2545bd9c5b5f","principalId":"fcd6a28c-bae5-49d2-9187-14ef0571cf46"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/ProductRuleCollectionGroupDevStorage"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"369701ce-84eb-421a-812a-65357f1b3fd0","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"fb54ef5f-b646-48f1-9420-331525ab1264","principalId":"109ae32a-3842-479a-81f3-5b96425d852b"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"cert","keyVaultSecretId":"https://bewaters-features-mwh.vault.azure.net/secrets/cert/a9e77ff7af1e451fae03fed9fc6abb4e"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/bewaters-trusted-services-mwh","name":"bewaters-trusted-services-mwh","type":"Microsoft.Network/FirewallPolicies","etag":"8dc0daa0-8568-4602-85a6-337730b34fcd","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-ma/providers/Microsoft.ManagedIdentity/userAssignedIdentities/bewaters-byok-success-ma":{"clientId":"3a73f346-1e57-4bfd-8bae-8af20dce0d3b","principalId":"e52b1619-d7ab-4f17-a1d1-be13afc9a95a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/trusted-services-mwh","name":"trusted-services-mwh","type":"Microsoft.Network/FirewallPolicies","etag":"5c56636f-4501-419b-b322-a614e0cfdb45","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolicyWithShimi","name":"firewallPolicyWithShimi","type":"Microsoft.Network/FirewallPolicies","etag":"1894d051-c6bb-4327-a1f4-b2cd37777ba6","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolic1","name":"firewallPolic1","type":"Microsoft.Network/FirewallPolicies","etag":"2e067436-f49a-490b-b30f-e979e42df920","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallPolic2","name":"firewallPolic2","type":"Microsoft.Network/FirewallPolicies","etag":"247ac188-d82d-42cc-b928-116a546f4d4b","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/firewallP765olic2","name":"firewallP765olic2","type":"Microsoft.Network/FirewallPolicies","etag":"8e94ea0f-7dd0-4698-97d5-a8da350f928d","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adig-test/providers/Microsoft.Network/firewallPolicies/adi123","name":"adi123","type":"Microsoft.Network/FirewallPolicies","etag":"5cec1d46-e9b3-4f5c-b55d-5cad047a057e","location":"westus","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"democert","keyVaultSecretId":"https://fw-premium-psybnozbyy53c.vault.azure.net/secrets/democert/ddddbfe41cb545a1a4aef705b3c7a957"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/liz_portalTesting/providers/Microsoft.Network/azureFirewalls/lihamilt_premiumTesting_inheritance"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy"},"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01","name":"premium-insik-bugbash-01","type":"Microsoft.Network/FirewallPolicies","etag":"769ec627-fb34-48fb-8b17-a1ae566572da","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sujith-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/DemoIdentity1":{"clientId":"7226a344-ae58-44cd-a8ab-28f09ddf2b92","principalId":"7ba56c8f-95ab-4472-83e1-a54f5fac574f"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Insik_TestRG/providers/Microsoft.Network/firewallPolicies/insikfirewallpolicy"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_testingSku","name":"lihamilt_testingSku","type":"Microsoft.Network/FirewallPolicies","etag":"5fd0fe10-2f67-4de3-8928-0911201d82b2","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"dnsSettings":{"servers":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/premium-insik-bugbash-01"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/DefaultDnatRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy/ruleCollectionGroups/lihamilt_ruleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_BugBash4Premium/providers/Microsoft.Network/firewallPolicies/lihamilt_premiumPolicy","name":"lihamilt_premiumPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"2b1b699d-c566-4611-911b-e2d7c1f613b6","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest10","keyVaultSecretId":"https://fw-premium-25huhucywxyzm.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert1337/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert1337/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert1337/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"0f4346a8-a9ce-44eb-ac17-df74a5f94016","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert1337/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"02270c7f-874b-45d9-8a83-9555eeb3440a","principalId":"74304d77-0da4-41ba-a9f2-09d94379576b"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest22","keyVaultSecretId":"https://fw-premium-rxkde7yvqiewa.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert50/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert50/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-cbn-cert50/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"69bf3f83-336e-4055-bdde-69ed787549d2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-cbn-cert50/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0ba591e0-0b50-496e-aa3e-c616c24998c0","principalId":"2aafea1f-585f-4094-b2c6-e9a3ae576be8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"7cd7f1ec-bd3d-4f63-a074-7d62837929fb","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Yasmin-fw-premiun-rg2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e161bfaf-8162-4916-8734-003adedd7435","principalId":"2bb120d8-7c5e-448d-ad45-fcf33ce63082"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-23ixqaupttwxs.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Denis-perf-24/providers/Microsoft.Network/firewallPolicies/test006/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2800985","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Denis-perf-24/providers/Microsoft.Network/firewallPolicies/test006","name":"test006","type":"Microsoft.Network/FirewallPolicies","etag":"4c49529e-35cd-4b93-82ad-40aa47d4fea2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Denis-perf-24/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b6743fce-8526-414a-8f2a-09c59e5a553f","principalId":"673c69ae-7885-466a-8642-575b3845df3a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-tomzrisybep6e.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test010/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["142.251.36.14"],"destinationPorts":["80","443"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test010","name":"test010","type":"Microsoft.Network/FirewallPolicies","etag":"cba668a4-2adc-4eaf-a6e8-a33c6b07ff05","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e43eb4d4-9d1b-4e5d-9d3f-48847369c7aa","principalId":"46f95387-bebf-4253-be00-ef9c1eafb661"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-livoixkl5cxjo.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.Network/firewallPolicies/testPolicy/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.Network/firewallPolicies/testPolicy","name":"testPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"d55cd757-974b-4aa0-94ba-b11311276f99","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/manuelberger-eastus2euap-slice-test-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"799fddf0-1b9c-4746-bb93-4ab9d3c7e2a2","principalId":"3c3526a9-2286-46ed-a455-a53ccf1aef43"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-xybgfzp4hvuas.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/test010/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/test010","name":"test010","type":"Microsoft.Network/FirewallPolicies","etag":"9ba4469e-16fc-429e-8cf9-0583cc67457e","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b561b149-5b71-45a7-b967-fc65fa6e8a2a","principalId":"9dee91d8-3e3b-4789-8a22-cab9ae5ffd14"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-xybgfzp4hvuas.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"b7afa0be-b64a-4957-b201-39172b47d5ce","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"b561b149-5b71-45a7-b967-fc65fa6e8a2a","principalId":"9dee91d8-3e3b-4789-8a22-cab9ae5ffd14"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-atjt3tinrphvs.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"a9483f84-e3a0-44db-8687-dc518963c42e","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_centraluseuap_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"e5b1fe27-492b-47f9-9d1d-60710a468168","principalId":"03f348eb-e158-45d8-8bcb-a09e9c04c9a3"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-zqf32efj7p626.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"168a3f27-6702-4b37-9aba-c540262314c1","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_s2s_eastus2euap_rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"ea441d5d-4b3a-4f28-9e09-9ca7cc27130f","principalId":"33bec4c0-743c-4558-95c1-fad995a7b304"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-rm3vsljlr3a7s.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cbn-july-0/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"7117e063-1517-4f75-8a89-61387520a8a2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cbn-july-0/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-premium-rm3vsljlr3a7s":{"clientId":"475c0e65-b2d3-4c7f-8ea5-fb344644b1e4","principalId":"c88fa78a-2f25-45ad-b3da-f9ac870df7f5"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-f3skogsb3s4lo.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-idps-cve/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-idps-cve/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-idps-cve/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"810f0bf8-f651-45ae-a2b1-a2d64730299a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-idps-cve/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"3d3cb04b-fff8-43ba-902c-e6cc0ec180a4","principalId":"dc36afa4-dd47-4e47-83a7-7c92acbe2a38"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-iovui5jy3gmw6.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cdm-000/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cdm-000/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sgersner-slice-cdm-000/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"8033fff4-cad0-4214-8507-efc7a225bd59","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sgersner-slice-cdm-000/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-premium-iovui5jy3gmw6":{"clientId":"6264a47d-d07c-4251-a50e-b169cd0eab5c","principalId":"54cd7a80-51e0-444a-a16b-1f0d8a2bd8ef"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTestPurge","keyVaultSecretId":"https://fw-c-prgxurttmold6hva.vault.azure.net/secrets/cacertcprg"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-purge-25/providers/Microsoft.Network/firewallPolicies/test250/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[{"id":"2800985","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-purge-25/providers/Microsoft.Network/firewallPolicies/test250","name":"test250","type":"Microsoft.Network/FirewallPolicies","etag":"df2b593b-6ce4-42c5-a5ec-67ba5c70b681","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-purge-25/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"3812e637-437c-43e1-b0ad-5492b5ea785e","principalId":"97197d35-9672-4bc7-97a2-38ffc12e0169"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-7bqubu4527na2.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dmanesku_premium_2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dmanesku_premium_2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dmanesku_premium_2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"c9a20c7a-a1e7-4caa-a007-4ede7f904443","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dmanesku_premium_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"23aad456-9dd6-47c6-94f1-3c31b1a250f7","principalId":"db60e3cf-6d1d-49c8-b388-adcf4523fab8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_test_rg4/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"c53a7d79-d314-4a17-b2ef-d7d56a91ae73","location":"westus2","tags":{"key1":"value1"}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-ew572cqbwhcx4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-perf-35/providers/Microsoft.Network/firewallPolicies/policy-perf/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-perf-35/providers/Microsoft.Network/azureFirewalls/fw-perf"}],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-perf-35/providers/Microsoft.Network/firewallPolicies/policy-perf","name":"policy-perf","type":"Microsoft.Network/FirewallPolicies","etag":"e47b0c74-8558-4959-ac0f-d37889e54696","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-perf-35/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-perf":{"clientId":"cbd06206-491f-41af-a616-be395fc17e1d","principalId":"a53e027e-2af9-44d0-9b09-7c477e63d77a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-b6lo3cxvj624c.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-managed-id/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"61ea50c7-367d-401b-a3e8-989b96dae564","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-managed-id/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"650b503f-1ba4-466e-ac94-6b83e1d85f78","principalId":"57b4671f-4192-48e1-ba80-bc0ba49e3d68"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-z6eqstx6vkpx4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-first-party/providers/Microsoft.Network/firewallPolicies/test005","name":"test005","type":"Microsoft.Network/FirewallPolicies","etag":"4dd51730-bd3c-46bb-b4a0-c4f71f316553","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-first-party/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"58464149-c734-4217-8432-63452c47e546","principalId":"e2182021-db06-4363-9b47-d19c3dc05788"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-qpmchjx4isthm.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-same-host-auth/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"0c868320-7aaa-4e68-b042-338276b8f7d5","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-same-host-auth/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"53d5e508-0cd1-4895-8b34-199249650458","principalId":"8a9c1071-c5dd-492c-9ea8-e6a7f186081a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-kb3gce25qnk5u.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Deny"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/aarbiv-test-auth-2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"b7f59328-01d7-4e2f-82ff-cdfa5bace144","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aarbiv-test-auth-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"1eaa595d-5fb0-4cca-a73d-5c127a7ec62c","principalId":"e2f995eb-9275-42a2-8add-1d32fcc32a61"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2000332","mode":"Off"},{"id":"2000015","mode":"Deny"},{"id":"2000345","mode":"Off"}],"bypassTrafficSettings":[]}},"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/dikla_policy_parent","name":"dikla_policy_parent","type":"Microsoft.Network/FirewallPolicies","etag":"291e3d16-de25-4ca9-8a5c-fc9ccc4974d1","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest","name":"policytest","type":"Microsoft.Network/FirewallPolicies","etag":"67b132ce-7051-49e9-be92-d8d6cadb7299","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_68a702","name":"policytest_premium_68a702","type":"Microsoft.Network/FirewallPolicies","etag":"97732749-46d1-44ad-a042-1ba931300541","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ae848a","name":"policytest_premium_ae848a","type":"Microsoft.Network/FirewallPolicies","etag":"727b775a-2e0a-4c43-9c10-b48d1bcc2f10","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_20b5d8","name":"policytest_premium_20b5d8","type":"Microsoft.Network/FirewallPolicies","etag":"b322f9dc-b515-4252-9450-7817c3a02532","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_1557a4","name":"policytest_premium_1557a4","type":"Microsoft.Network/FirewallPolicies","etag":"1418ee00-3be1-475d-8c41-04e9c24ad174","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg101"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg102"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg103"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg104"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg105"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg106"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg107"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg108"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg109"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg110"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg111"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg112"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg113"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg114"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg115"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg116"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg117"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg118"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg119"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg120"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg121"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg122"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg123"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg124"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg125"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg126"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg127"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg128"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg129"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg130"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg131"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg132"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg133"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg134"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg135"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg137"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg138"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg139"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg140"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg141"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg142"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg143"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg144"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg145"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg146"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg147"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg148"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg149"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd/ruleCollectionGroups/rcg150"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-76/providers/Microsoft.Network/firewallPolicies/policytest_premium_ac81fd","name":"policytest_premium_ac81fd","type":"Microsoft.Network/FirewallPolicies","etag":"e3080d70-a166-4916-82b4-2c355bac64db","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-kyvs233i2kwnu.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/azureFirewalls/fw_premium_with_1"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_no_AZ_2/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"3d0e2d94-9da6-445d-95a5-c00bb9adfdaf","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_no_AZ_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"64885563-2191-46dd-bdf5-30fc6b79ffac","principalId":"3d256820-e46a-4085-8970-b7f9bd01b740"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/azureFirewalls/fw_premium_with_1"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_true_standard_no_az/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"76d2128b-7bc6-4957-b58a-ebe561bb0e75","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-n4xywerujpzhg.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_false_2/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_false_2/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_ff_false_2/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"e8abda69-833e-4ffd-9689-e3adc3ff29ac","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_ff_false_2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"be131978-ae64-48c2-94bc-b0fab7a739b5","principalId":"3b64f1a9-e973-443a-85f5-b83d231ad82e"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","snat":{"privateRanges":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/2"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/3"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/4"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/5"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/6"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/7"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/8"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/19"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/9"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/10"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/11"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/12"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/13"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/14"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/15"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/16"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/17"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/18"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/20"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/21"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/22"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/23"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/24"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/25"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/26"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/27"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/28"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/29"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/30"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/31"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/32"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/33"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/34"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/35"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/36"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/37"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/38"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice/ruleCollectionGroups/39"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_RCG_slice_5/providers/Microsoft.Network/firewallPolicies/policy_slice","name":"policy_slice","type":"Microsoft.Network/FirewallPolicies","etag":"b1b160ff-a4ee-4071-816c-a3010e73066b","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2004079","mode":"Deny"},{"id":"2000105","mode":"Deny"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/Yasmin-fw-premiun-rg2/providers/Microsoft.Network/firewallPolicies/fw-policy","name":"fw-policy","type":"Microsoft.Network/FirewallPolicies","etag":"bb112786-65ea-4a7a-90a6-66239cfe25f3","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy02/ruleCollectionGroups/RulesCollectionGroup_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy02","name":"testpolicy02","type":"Microsoft.Network/FirewallPolicies","etag":"f58fdfdc-e4e4-44cb-957d-59804c0f2b99","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy03/ruleCollectionGroups/RulesCollectionGrouppp_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy03","name":"testpolicy03","type":"Microsoft.Network/FirewallPolicies","etag":"4efc21d5-ac6c-4766-9ad3-e46d369bc577","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy04/ruleCollectionGroups/RulesCollectionGroup_0"}],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/fw_deployment_slice_03-16-2022_13-25/providers/Microsoft.Network/firewallPolicies/testpolicy04","name":"testpolicy04","type":"Microsoft.Network/FirewallPolicies","etag":"6e1a1283-d95b-48d9-9eb5-0cb1c087f817","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child","name":"lihamilt_SQL_Redirect_Child","type":"Microsoft.Network/FirewallPolicies","etag":"1c929848-8b17-42f5-b1d1-d03265702474","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"sql":{"allowSqlRedirect":true},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Child"}],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Redirect_Parent","name":"lihamilt_SQL_Redirect_Parent","type":"Microsoft.Network/FirewallPolicies","etag":"7adabeb6-f743-467e-80a6-68711ab9b9f1","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-vpmlpyfh5dbbk.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/logging-poc/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/logging-poc/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/logging-poc/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"042ffa98-2438-4366-97cf-237144f8f4d1","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/logging-poc/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"25ec5f9a-c8c4-447e-bad1-2545bd9c5b5f","principalId":"fcd6a28c-bae5-49d2-9187-14ef0571cf46"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/ProductRuleCollectionGroupDevStorage"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"369701ce-84eb-421a-812a-65357f1b3fd0","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_04-27-2022_16-30_idps_alert_debug/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"fb54ef5f-b646-48f1-9420-331525ab1264","principalId":"109ae32a-3842-479a-81f3-5b96425d852b"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"cert","keyVaultSecretId":"https://bewaters-features-mwh.vault.azure.net/secrets/cert/a9e77ff7af1e451fae03fed9fc6abb4e"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/bewaters-trusted-services-mwh","name":"bewaters-trusted-services-mwh","type":"Microsoft.Network/FirewallPolicies","etag":"8dc0daa0-8568-4602-85a6-337730b34fcd","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-ma/providers/Microsoft.ManagedIdentity/userAssignedIdentities/bewaters-byok-success-ma":{"clientId":"3a73f346-1e57-4bfd-8bae-8af20dce0d3b","principalId":"e52b1619-d7ab-4f17-a1d1-be13afc9a95a"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/trusted-services-mwh","name":"trusted-services-mwh","type":"Microsoft.Network/FirewallPolicies","etag":"5c56636f-4501-419b-b322-a614e0cfdb45","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/adi-pp-renaming/providers/Microsoft.Network/firewallPolicies/test-service-tags/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adi-pp-renaming/providers/Microsoft.Network/azureFirewalls/fw-test-service-tags"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adi-pp-renaming/providers/Microsoft.Network/azureFirewalls/fw-test-service-tags2"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/adi-pp-renaming/providers/Microsoft.Network/firewallPolicies/test-service-tags","name":"test-service-tags","type":"Microsoft.Network/FirewallPolicies","etag":"e10c1637-c7ad-4320-8465-2e0f813e1663","location":"japaneast","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Deny","threatIntelWhitelist":{"ipAddresses":[]},"dnsSettings":{"servers":["8.8.8.8"]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/isguBB01/providers/Microsoft.Network/firewallPolicies/testFPPolicy1/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/isguBB01/providers/Microsoft.Network/firewallPolicies/testFPPolicy1","name":"testFPPolicy1","type":"Microsoft.Network/FirewallPolicies","etag":"1833e79d-c73f-4174-9f01-1bcb17009586","location":"eastus2euap","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ken-test-nfvrp/providers/Microsoft.Network/firewallPolicies/fwp1/ruleCollectionGroups/DefaultDnatRuleCollectionGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ken-test-nfvrp/providers/Microsoft.Network/firewallPolicies/fwp1","name":"fwp1","type":"Microsoft.Network/FirewallPolicies","etag":"6f3d073f-d157-4730-9faa-a8e8e246ebae","location":"eastus2euap","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adgrieve-prodtest/providers/Microsoft.Network/firewallPolicies/testing123","name":"testing123","type":"Microsoft.Network/FirewallPolicies","etag":"e5efbdcd-5014-4466-b48f-0a90ae27e161","location":"centraluseuap"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adgrieve-prodtest/providers/Microsoft.Network/firewallPolicies/test123","name":"test123","type":"Microsoft.Network/FirewallPolicies","etag":"c2dd06bd-9990-4d22-9c2d-744bfaa6137a","location":"centraluseuap"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Deny"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/adgrieve-prodtest/providers/Microsoft.Network/firewallPolicies/bugbash-test1","name":"bugbash-test1","type":"Microsoft.Network/FirewallPolicies","etag":"17e1eb58-2306-48d1-9b6f-d45a6f8ab7b1","location":"eastus2euap","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"ipAddresses":[]},"dnsSettings":{"servers":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Updating"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/isguBB01/providers/Microsoft.Network/firewallPolicies/testPolic01","name":"testPolic01","type":"Microsoft.Network/FirewallPolicies","etag":"02e8e2ce-ef2b-4f11-b00d-8da9a817efd2","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":["*.microsoft.com"],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-jf5w7c2nwllnm.vault.azure.net/secrets/cacert/cc00bcccaf604a0eacc6171754874a42"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/insik-rg/providers/Microsoft.Network/firewallPolicies/insik-premium-policy-base/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/insik-rg/providers/Microsoft.Network/firewallPolicies/insik-premium-policy-base","name":"insik-premium-policy-base","type":"Microsoft.Network/FirewallPolicies","etag":"ca9e976a-950e-4d23-9235-b47d0d946744","location":"centralus","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/EliranP-RG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/DemoIdentity":{"clientId":"a8f2cc63-38f7-4b1e-8a0e-ba382649e674","principalId":"3b9da44f-86fc-42de-9987-a09bcc09148e"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Deny","dnsSettings":{"servers":["8.8.18.8"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"insights":{"isEnabled":true,"retentionDays":30,"logAnalyticsResources":{"workspaces":[{"region":"eastus","workspaceId":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-cf6dd6b5-8d66-42fd-85a9-108021552699-eus"}}],"defaultWorkspaceId":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/defaultresourcegroup-suk/providers/microsoft.operationalinsights/workspaces/defaultworkspace-7a06e974-7329-4485-87e7-3211b06c15aa-suk"}}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/isguTestRuleAnalytics/providers/Microsoft.Network/firewallPolicies/develop2Policycentralus","name":"develop2Policycentralus","type":"Microsoft.Network/FirewallPolicies","etag":"9b550621-31bc-4193-97da-63eb3df806dc","location":"centralus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"sql":{"allowSqlRedirect":false},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_bugBash_child"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_bugBash_parent/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_bugBash_parent/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_bugBash_parent","name":"lihamilt_bugBash_parent","type":"Microsoft.Network/FirewallPolicies","etag":"377ee29f-06b8-4bc1-8b79-9cbb7348f4b7","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"snat":{"privateRanges":[]},"sql":{"allowSqlRedirect":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_bugBash_child/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_bugBash_child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_bugBash_parent"},"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_bugBash_child","name":"lihamilt_bugBash_child","type":"Microsoft.Network/FirewallPolicies","etag":"2204e58a-826c-4241-81c8-12e9fb225599","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_child_SQL_1/ruleCollectionGroups/DefaultNetworkRuleCollectionGroup"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_child_SQL_1/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_parent_SQL_1"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_child_SQL_1","name":"lihamilt_child_SQL_1","type":"Microsoft.Network/FirewallPolicies","etag":"0eac0cfb-2ecb-40e4-9689-dd3bd4b4d0ff","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"sql":{"allowSqlRedirect":true},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_child_SQL_1"}],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_parent_SQL_1","name":"lihamilt_parent_SQL_1","type":"Microsoft.Network/FirewallPolicies","etag":"7fd65fee-fbcb-4055-a5b6-c8f0b4773c29","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Testing_Parent"},"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Testing","name":"lihamilt_SQL_Testing","type":"Microsoft.Network/FirewallPolicies","etag":"fb1c102d-2bbf-4abe-ab5a-37f0ccea2632","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"sql":{"allowSqlRedirect":true},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Testing"}],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/lihamilt_sql_testing/providers/Microsoft.Network/firewallPolicies/lihamilt_SQL_Testing_Parent","name":"lihamilt_SQL_Testing_Parent","type":"Microsoft.Network/FirewallPolicies","etag":"0e5a83a3-1c2b-4b8d-a774-ee855872d21e","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest4/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest4/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest4/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"76fcc88c-5d4f-4f6e-a16c-422801de0a58","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub7/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub7/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateFirewallPolicyOnAzFwInHub7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"11e2eac3-f2a2-4a94-83aa-aca93e01761d","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub1/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub1/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHub1/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"ce79183a-6e37-43af-8848-c661d92fac91","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest4/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest4/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"4ab2a57d-0e2f-465e-94ee-0018a474cfdf","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest3/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest3/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest3/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"19767bad-24b5-427c-8933-50ade9d7f84d","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["8.8.8.8"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"4d42f268-7b65-4493-a376-93704f0bec4c","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest3/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest3/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"b0e32bf8-20fb-4c73-be92-59c2877e0221","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub2/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub2/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/RemoveFirewallPolicyOnAzFwInHub2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"7d127c57-3920-4e6b-8ab4-136898634b1c","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub7/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub7/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateAzFwInHub7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"34bdfd07-8421-4007-86d1-3f03dd7d6740","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub8/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub8/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateAzFwInHub8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"b0bdee47-4d0a-48e9-b9c7-c5093cab1c5c","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest0/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest0/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest0/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest0/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"7e58e1c4-a18d-47d0-9bc1-e97b6a320b26","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest0/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest0/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest0/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"5b784f95-f3cb-441d-b4ff-146c41311813","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":["*.microsoft.com"],"ipAddresses":["19.1.2.5","52.2.0.0/16","30.32.73.91"]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"6e9e2095-3b4b-48bd-90be-63b7956d6134","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest2/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest2/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest2/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"03d06f61-f2ea-421d-a953-ece8ef2ab549","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["8.8.8.8"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"117f7bd5-016a-456a-88a3-ef15d6593691","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest2/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest2/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"f1136560-75a6-48f5-8a90-63addd9c1279","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub8/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub8/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateFirewallPolicyOnAzFwInHub8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"fedecbfc-5399-4e35-8dae-4f38e6a92d22","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub4/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub4/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateAzFwInHub4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"b91fc40b-bc94-4c6d-b945-fe499baee93e","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub4/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub4/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHub4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"82897be9-e6f6-43ba-8373-bafc19f68f0f","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest7/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest7/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest7/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"0afe7755-6377-4b40-b60e-04e07a3ffce0","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest7/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest7/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"23c1f78b-72cc-4872-982f-971036b41672","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":["*.microsoft.com"],"ipAddresses":["19.1.2.5","52.2.0.0/16","30.32.73.91"]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"caee3ecc-1eb0-4e19-8b4f-03dfac0468aa","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzFwManagerFTPTest6/providers/Microsoft.Network/azureFirewalls/AzureFirewall"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzFwManagerFTPTest6/providers/Microsoft.Network/firewallPolicies/fwmanagerTestPolicy","name":"fwmanagerTestPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"ca2f17ca-2b32-405e-90b7-bd40b235d6ae","location":"centralus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub1/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub1/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateAzFwInHub1/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"96edaeba-bea8-4f00-8806-371490374220","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest6/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest6/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest6/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest6/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"de69fd2d-1643-47a1-a3f6-f465551dec9d","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest6/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest6/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest6/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"472b6d1a-1b3d-428f-bc90-edf7de2a3851","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzFwManagerFTPTest4/providers/Microsoft.Network/azureFirewalls/AzureFirewall"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzFwManagerFTPTest4/providers/Microsoft.Network/firewallPolicies/fwmanagerTestPolicy","name":"fwmanagerTestPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"0650058e-32da-4caf-bdb8-2539be06e4de","location":"centralus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub7/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub7/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/RemoveFirewallPolicyOnAzFwInHub7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"0e54a2e7-a2cb-4363-920c-91c8edd6dbcb","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub6/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub6/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHub6/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"286a379e-4887-4c54-89d6-ae7f2510cff4","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest8/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest8/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest8/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"9da2714d-bd09-408b-9ec5-39cf3efaafa6","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub5/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub5/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHub5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"b7291e4e-5b0f-40c2-9f17-f9e87ebbecd6","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest8/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest8/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"415769fa-56f3-486b-b477-220d0728a39e","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub2/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub2/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateFirewallPolicyOnAzFwInHub2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"10913629-9a99-4a11-95e3-173690ed167c","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub6/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub6/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/RemoveFirewallPolicyOnAzFwInHub6/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"59c27d15-14da-4007-988b-d9950143ffdd","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub3/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub3/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateAzFwInHub3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"48072fbc-815a-4e14-b815-2d37c21fa3e4","location":"centralus","tags":{}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/firewallPolicies?api-version=2021-08-01&%24skiptoken=7Zddj6JIFIb%2fi5nZq7WtQnGwk8kGkHJgFK2CAuWOAtTiO4Da9mT%2b%2b5ba3bvZ3d6LvdqkvSCpnK86nOIN9fzolclTN%2bdl1vYef%2fQM1XGpIxlUXfUee%2fuuq9vHwaAIy3CXFEnZPYTPhyZ5iKpi0B5YGzW87nhVtoMwYTIDUtgHW6j0R3I46ivjeNxXoAIUCOUojLaDuqmOPE6adrDgUVO11bZ7sJPuVDXZYMub5BTm%2barKecST9rew5v2jiBXlv0pAgn2g9AH85VOb8dqtsqT8uppORsw%2f7eLCO0dSfmQp4AtndDK5lrPCPgaz%2fBA8Ax6vSTF3DclMlc%2bSNsWVgqXJIRbe2Ecg9CcHbzZpAn908%2b7M6dOUSbLwyHCzJrVYUyZ1OUtHts7Vnamrive25%2bg8T1VlDoM8Km0R%2b1ZFV3crRORoRkVdb4Y4m1ER92oRfVwq7VaGnCffCN6sLRDedpsH60zkJGcLXPfl5tjkneNQPN5m5OhnteZQy%2fJpxzGNNUzRy2NMVo7teNPqyYTEwc8VXOi2ReFmvOC2RagytlMKbddISa5NlxkqyS3XxRSmvqPApeE1iYcaJ6OAUUSwH8s0Q34ALrXN1iytPSvi3EzrL2YBa3btTdgLuE900WcWzMwSTlb6ZBms94DO0FlM%2bjplR%2fLk1Q58v7y1mPHNX0yGV3sma285r7Y%2fYqmYThmsyYJJ9l7UE2ct46jIO2GXRd4%2f%2bG9nJXzvn2V6Or7%2fJfR%2bfVXDXQl3JXxwJfjG9b9wV8JdCR9cCbpqq1NVN2yXqPO7Hu56%2bOh6uCmBOnct%2fC%2b1kFoG9m3NHcYj5uIhLZD2cucXzPBfeCHQqec9YypbTIprvN5rhHcazqBGgOAQDxluhjQnk3NMMcCUDB2KkOAILUH20gFIdym5xGmhYel4LfrJYs3kJx4V6BBIlC%2fLljM%2fP5hpxS925qPRZU2yDd%2bugTIH7xHTX5jKYcP4haXczHjN%2b5P1LR6RfSSoJjaejhvpxoSrXDuHPtxHZXahtr%2f7b3QiqtpHVgpKLL0bmeTkGEre4UI6%2f0Ifn4fT3s%2bfvwM%3d"}' headers: cache-control: - no-cache content-length: - - '1087' + - '552131' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:31 GMT + - Wed, 11 May 2022 19:55:02 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network firewall policy list + Connection: + - keep-alive + User-Agent: + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/firewallPolicies?api-version=2021-08-01&%24skiptoken=7Zddj6JIFIb%2Fi5nZq7WtQnGwk8kGkHJgFK2CAuWOAtTiO4Da9mT%2B%2B5ba3bvZ3d6LvdqkvSCpnK86nOIN9fzolclTN%2Bdl1vYef%2FQM1XGpIxlUXfUee%2Fuuq9vHwaAIy3CXFEnZPYTPhyZ5iKpi0B5YGzW87nhVtoMwYTIDUtgHW6j0R3I46ivjeNxXoAIUCOUojLaDuqmOPE6adrDgUVO11bZ7sJPuVDXZYMub5BTm%2BarKecST9rew5v2jiBXlv0pAgn2g9AH85VOb8dqtsqT8uppORsw%2F7eLCO0dSfmQp4AtndDK5lrPCPgaz%2FBA8Ax6vSTF3DclMlc%2BSNsWVgqXJIRbe2Ecg9CcHbzZpAn908%2B7M6dOUSbLwyHCzJrVYUyZ1OUtHts7Vnamrive25%2Bg8T1VlDoM8Km0R%2B1ZFV3crRORoRkVdb4Y4m1ER92oRfVwq7VaGnCffCN6sLRDedpsH60zkJGcLXPfl5tjkneNQPN5m5OhnteZQy%2FJpxzGNNUzRy2NMVo7teNPqyYTEwc8VXOi2ReFmvOC2RagytlMKbddISa5NlxkqyS3XxRSmvqPApeE1iYcaJ6OAUUSwH8s0Q34ALrXN1iytPSvi3EzrL2YBa3btTdgLuE900WcWzMwSTlb6ZBms94DO0FlM%2BjplR%2FLk1Q58v7y1mPHNX0yGV3sma285r7Y%2FYqmYThmsyYJJ9l7UE2ct46jIO2GXRd4%2F%2BG9nJXzvn2V6Or7%2FJfR%2BfVXDXQl3JXxwJfjG9b9wV8JdCR9cCbpqq1NVN2yXqPO7Hu56%2BOh6uCmBOnct%2FC%2B1kFoG9m3NHcYj5uIhLZD2cucXzPBfeCHQqec9YypbTIprvN5rhHcazqBGgOAQDxluhjQnk3NMMcCUDB2KkOAILUH20gFIdym5xGmhYel4LfrJYs3kJx4V6BBIlC%2FLljM%2FP5hpxS925qPRZU2yDd%2BugTIH7xHTX5jKYcP4haXczHjN%2B5P1LR6RfSSoJjaejhvpxoSrXDuHPtxHZXahtr%2F7b3QiqtpHVgpKLL0bmeTkGEre4UI6%2F0Ifn4fT3s%2BfvwM%3D + response: + body: + string: '{"value":[{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy","name":"policy","type":"Microsoft.Network/FirewallPolicies","etag":"5545800c-a3f5-4f78-8aac-f03a55d9e073","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy2","name":"policy2","type":"Microsoft.Network/FirewallPolicies","etag":"f2df616c-f7a5-482c-bbe1-68c610a31129","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy3","name":"policy3","type":"Microsoft.Network/FirewallPolicies","etag":"252d5905-fa65-4e23-9836-44caecaaaf6d","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy4","name":"policy4","type":"Microsoft.Network/FirewallPolicies","etag":"b59db942-7fa3-4119-ae44-2c346f115a3c","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy5","name":"policy5","type":"Microsoft.Network/FirewallPolicies","etag":"899a54f8-7eaf-4d13-99ff-ec7220de3ab0","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy6","name":"policy6","type":"Microsoft.Network/FirewallPolicies","etag":"f9ae2b63-a1f3-4ced-90da-5537b20f95cd","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy7","name":"policy7","type":"Microsoft.Network/FirewallPolicies","etag":"b05c8037-0ca1-4fa5-bc7f-feda76df6c5f","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy8","name":"policy8","type":"Microsoft.Network/FirewallPolicies","etag":"1bb1c8da-8dc4-4fa2-8459-68c922753bb5","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy_1","name":"policy_1","type":"Microsoft.Network/FirewallPolicies","etag":"fb8841f4-ac7e-486e-986d-d4e75a93fb31","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy_2","name":"policy_2","type":"Microsoft.Network/FirewallPolicies","etag":"e3291f6b-7762-4d2a-8eae-ce8650a8e0a6","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/Dikla_policy/ruleCollectionGroups/collection"}],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[],"privateRanges":["10.0.0.0/8","192.168.0.0/16","100.64.0.0/10"]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/Dikla_policy","name":"Dikla_policy","type":"Microsoft.Network/FirewallPolicies","etag":"a368adca-760d-48cd-ae64-5fea578958d6","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-fligkbpgtyl2i.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"7d9c3060-9be2-4012-9bd5-b7954b412a99","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"9b50a9d4-3158-4eaa-8917-0aa60cd6287d","principalId":"a318e460-75c9-494b-887c-c5e7b83cef4c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","dnsSettings":{"servers":[],"enableProxy":true},"transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-p4scs64nhuj6y.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-3/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-3/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-3/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"f93ed87f-a687-4036-a6c7-de510f1829a2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"4af28c35-c667-4b9f-81fd-e01ff0efc798","principalId":"56616fd7-40f3-45e0-be0d-28659fa5206c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-2bn7jnzatv7n6.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-4/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-4/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-4/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"b95c24ce-eb62-4c91-8f9f-f62c67517163","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-4/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"fc5e6872-908d-46d4-9445-2ff81225cac9","principalId":"f20257bb-3269-4a97-93de-b5a7320c718c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"fw-cert-ysON8txuiUceV","keyVaultSecretId":"https://fw-cert-kv-yson8txuiucev.vault.azure.net/secrets/fw-cert-ysON8txuiUceV/3a8287fe2693442ab8c60503f2351b59"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug_westus2/providers/Microsoft.Network/firewallPolicies/parent_policy_westus2/ruleCollectionGroups/aaa"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug_westus2/providers/Microsoft.Network/firewallPolicies/parent_policy_westus2","name":"parent_policy_westus2","type":"Microsoft.Network/FirewallPolicies","etag":"05a4e34e-3c9d-472c-a7fa-7df4a5c6a819","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-cert-id-ysON8txuiUceV":{"clientId":"5939d421-cea8-4a00-897f-dc7705ab693d","principalId":"2c022e5c-acdc-429c-89fc-46f7a74e41e3"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-2ipfc2vzpk74i.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-60K-limit/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-60K-limit/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-60K-limit/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"617099c9-ac9c-4aa6-95d5-24a4aadd2653","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-60K-limit/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"76175755-2a16-4a44-91aa-2ca543c8c30c","principalId":"6fb5d5e4-faf0-4344-9f7e-d23124c68ae1"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-scu-s1/providers/Microsoft.Network/azureFirewalls/fw-scu"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard","name":"policy-scu-Standard","type":"Microsoft.Network/FirewallPolicies","etag":"144c2e8b-71a0-4e98-932f-f9164e29cefe","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium","name":"policy-scu-Premium","type":"Microsoft.Network/FirewallPolicies","etag":"6d0ff21e-6647-42a6-9838-3edeeee14985","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard","name":"policy-scu-Standard","type":"Microsoft.Network/FirewallPolicies","etag":"7f1a66e6-b881-40c6-9410-365338f4fefe","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-scu-s2/providers/Microsoft.Network/azureFirewalls/fw-scu"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium","name":"policy-scu-Premium","type":"Microsoft.Network/FirewallPolicies","etag":"f6809395-e45e-4f8a-a6e2-81e02ea49d40","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-f5hsk3cnwhvpa.vault.azure.net/secrets/cacert"}},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"e8917dd7-c59d-4da6-8129-b6f0ff15100f","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"d9d9e8e1-ebcf-48ce-a77a-db986268078d","principalId":"7e83c22d-c561-4368-af89-f80d90d251ba"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002"},"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child","name":"child","type":"Microsoft.Network/FirewallPolicies","etag":"abc45da6-a3cd-4034-8e01-499de8bae026","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"330a80b6-9f19-43e6-8a86-44fda4486205","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0e728f1d-2126-4671-9748-e1d019cd8f58","principalId":"1bdf37a0-2331-4709-93ab-6d0a2dfc6913"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-quz5fuk4txb6c.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"5fb4e660-10e4-406a-a1be-b8fbb8617cb4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0e728f1d-2126-4671-9748-e1d019cd8f58","principalId":"1bdf37a0-2331-4709-93ab-6d0a2dfc6913"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/BYOK_BUG_BASH1","name":"BYOK_BUG_BASH1","type":"Microsoft.Network/FirewallPolicies","etag":"9a7ee719-7eb4-4a6d-a35d-3f07d5ff271b","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_BYOK_put/providers/Microsoft.Network/firewallPolicies/policy_westus2","name":"policy_westus2","type":"Microsoft.Network/FirewallPolicies","etag":"54e2c905-54c3-413d-bab5-4014f6749749","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"90260815-db21-4564-8348-dd43a55ba8f4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"971e8369-3acf-47f4-9bf8-8a324cd86710","principalId":"f52b14ca-2933-4256-ab55-4adf1ea36777"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-k4srf6qv3ivz4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"f90e5ffa-18e3-4316-a54f-e239a792551a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"971e8369-3acf-47f4-9bf8-8a324cd86710","principalId":"f52b14ca-2933-4256-ab55-4adf1ea36777"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/child-policy"}],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/parent-policy","name":"parent-policy","type":"Microsoft.Network/FirewallPolicies","etag":"49d99da0-1578-40c9-88b4-f3541a38c51d","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"e1a012ef-7143-4f61-ad7d-012ad9a750b3","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1":{"clientId":"231c354c-f28a-40f3-a55a-e8ebbe3e7526","principalId":"a8042d91-b0c4-4550-9851-5c3e53b47429"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-2j25i2zhe2ohq.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"06895cea-93ed-4f8e-9fef-7ab58d314d7a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1":{"clientId":"231c354c-f28a-40f3-a55a-e8ebbe3e7526","principalId":"a8042d91-b0c4-4550-9851-5c3e53b47429"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-lkrgx5w3oaxtk.vault.azure.net/secrets/cacert/0c2f46a014544e01a63d0ff4eb1dc782"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/parent-policy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/child-policy","name":"child-policy","type":"Microsoft.Network/FirewallPolicies","etag":"29f0e814-4910-4ddc-b80b-71bc47c5fc95","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-test-byok1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"83dbbdd9-e785-4d57-a0de-8bb3ce4bcdf4","principalId":"15a559e1-cc6d-4bc2-bb72-89ff62993f25"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"3d6d374b-b5a1-404b-a084-cbfface150f4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2":{"clientId":"daa0a72c-c8f2-4f87-8a74-124859918ffe","principalId":"ffb92825-b46a-4eae-86dd-4014f94c1e53"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-6zmoixgwqga7o.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"3572602c-1933-4bd0-b846-7ae9661fae92","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity3":{"clientId":"7a260791-078f-4588-bfea-7cb8a140b897","principalId":"53197c7f-b501-4a5c-a790-bdffed9b7447"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"c128b1b9-699e-4e60-9d23-739f1fe21d1f","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-jluizkzeptzay.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"bd666cf7-8eae-41b0-b5fa-0410a6edfe10","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity3":{"clientId":"fe495093-897c-41be-8234-3bb0cc1461b9","principalId":"5b703968-72bd-4f40-932a-154b7a46c7c8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-7rzm6477l544w.vault.azure.net/secrets/cacert"}},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"7db2681d-356d-4436-83fe-b3844fed09c2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2":{"clientId":"9c5b9192-17a4-41fa-9fba-af1c2715b92c","principalId":"c694240a-11e1-47b9-86b2-0ad34e2d1697"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"dadd66e0-7c91-4a96-b648-b773a06e9730","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["10.0.0.2","10.0.0.3"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy23nlxvt25yy63664dmgh5o6ysn24676qkb7z37fgseq2a/providers/Microsoft.Network/firewallPolicies/myclipolicy","name":"myclipolicy","type":"Microsoft.Network/FirewallPolicies","etag":"bd873d9f-79b4-403d-8ce4-c2858ba6cd4c","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy","name":"policy","type":"Microsoft.Network/FirewallPolicies","etag":"5545800c-a3f5-4f78-8aac-f03a55d9e073","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy2","name":"policy2","type":"Microsoft.Network/FirewallPolicies","etag":"f2df616c-f7a5-482c-bbe1-68c610a31129","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy3","name":"policy3","type":"Microsoft.Network/FirewallPolicies","etag":"252d5905-fa65-4e23-9836-44caecaaaf6d","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy4","name":"policy4","type":"Microsoft.Network/FirewallPolicies","etag":"b59db942-7fa3-4119-ae44-2c346f115a3c","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy5","name":"policy5","type":"Microsoft.Network/FirewallPolicies","etag":"899a54f8-7eaf-4d13-99ff-ec7220de3ab0","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy6","name":"policy6","type":"Microsoft.Network/FirewallPolicies","etag":"f9ae2b63-a1f3-4ced-90da-5537b20f95cd","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy7","name":"policy7","type":"Microsoft.Network/FirewallPolicies","etag":"b05c8037-0ca1-4fa5-bc7f-feda76df6c5f","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy8","name":"policy8","type":"Microsoft.Network/FirewallPolicies","etag":"1bb1c8da-8dc4-4fa2-8459-68c922753bb5","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy_1","name":"policy_1","type":"Microsoft.Network/FirewallPolicies","etag":"fb8841f4-ac7e-486e-986d-d4e75a93fb31","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy_2","name":"policy_2","type":"Microsoft.Network/FirewallPolicies","etag":"e3291f6b-7762-4d2a-8eae-ce8650a8e0a6","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/Dikla_policy/ruleCollectionGroups/collection"}],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[],"privateRanges":["10.0.0.0/8","192.168.0.0/16","100.64.0.0/10"]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/Dikla_policy","name":"Dikla_policy","type":"Microsoft.Network/FirewallPolicies","etag":"a368adca-760d-48cd-ae64-5fea578958d6","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-fligkbpgtyl2i.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"7d9c3060-9be2-4012-9bd5-b7954b412a99","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"9b50a9d4-3158-4eaa-8917-0aa60cd6287d","principalId":"a318e460-75c9-494b-887c-c5e7b83cef4c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","dnsSettings":{"servers":[],"enableProxy":true},"transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-p4scs64nhuj6y.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-3/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-3/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-3/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"f93ed87f-a687-4036-a6c7-de510f1829a2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"4af28c35-c667-4b9f-81fd-e01ff0efc798","principalId":"56616fd7-40f3-45e0-be0d-28659fa5206c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-2bn7jnzatv7n6.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-4/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-4/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-4/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"b95c24ce-eb62-4c91-8f9f-f62c67517163","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-4/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"fc5e6872-908d-46d4-9445-2ff81225cac9","principalId":"f20257bb-3269-4a97-93de-b5a7320c718c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"fw-cert-ysON8txuiUceV","keyVaultSecretId":"https://fw-cert-kv-yson8txuiucev.vault.azure.net/secrets/fw-cert-ysON8txuiUceV/3a8287fe2693442ab8c60503f2351b59"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug_westus2/providers/Microsoft.Network/firewallPolicies/parent_policy_westus2/ruleCollectionGroups/aaa"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug_westus2/providers/Microsoft.Network/firewallPolicies/parent_policy_westus2","name":"parent_policy_westus2","type":"Microsoft.Network/FirewallPolicies","etag":"05a4e34e-3c9d-472c-a7fa-7df4a5c6a819","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-cert-id-ysON8txuiUceV":{"clientId":"5939d421-cea8-4a00-897f-dc7705ab693d","principalId":"2c022e5c-acdc-429c-89fc-46f7a74e41e3"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-2ipfc2vzpk74i.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-60K-limit/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-60K-limit/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-60K-limit/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"617099c9-ac9c-4aa6-95d5-24a4aadd2653","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-60K-limit/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"76175755-2a16-4a44-91aa-2ca543c8c30c","principalId":"6fb5d5e4-faf0-4344-9f7e-d23124c68ae1"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-scu-s1/providers/Microsoft.Network/azureFirewalls/fw-scu"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard","name":"policy-scu-Standard","type":"Microsoft.Network/FirewallPolicies","etag":"144c2e8b-71a0-4e98-932f-f9164e29cefe","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium","name":"policy-scu-Premium","type":"Microsoft.Network/FirewallPolicies","etag":"6d0ff21e-6647-42a6-9838-3edeeee14985","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard","name":"policy-scu-Standard","type":"Microsoft.Network/FirewallPolicies","etag":"7f1a66e6-b881-40c6-9410-365338f4fefe","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-scu-s2/providers/Microsoft.Network/azureFirewalls/fw-scu"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium","name":"policy-scu-Premium","type":"Microsoft.Network/FirewallPolicies","etag":"f6809395-e45e-4f8a-a6e2-81e02ea49d40","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-f5hsk3cnwhvpa.vault.azure.net/secrets/cacert"}},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"e8917dd7-c59d-4da6-8129-b6f0ff15100f","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"d9d9e8e1-ebcf-48ce-a77a-db986268078d","principalId":"7e83c22d-c561-4368-af89-f80d90d251ba"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002"},"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child","name":"child","type":"Microsoft.Network/FirewallPolicies","etag":"abc45da6-a3cd-4034-8e01-499de8bae026","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"330a80b6-9f19-43e6-8a86-44fda4486205","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0e728f1d-2126-4671-9748-e1d019cd8f58","principalId":"1bdf37a0-2331-4709-93ab-6d0a2dfc6913"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-quz5fuk4txb6c.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"5fb4e660-10e4-406a-a1be-b8fbb8617cb4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0e728f1d-2126-4671-9748-e1d019cd8f58","principalId":"1bdf37a0-2331-4709-93ab-6d0a2dfc6913"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/BYOK_BUG_BASH1","name":"BYOK_BUG_BASH1","type":"Microsoft.Network/FirewallPolicies","etag":"9a7ee719-7eb4-4a6d-a35d-3f07d5ff271b","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_BYOK_put/providers/Microsoft.Network/firewallPolicies/policy_westus2","name":"policy_westus2","type":"Microsoft.Network/FirewallPolicies","etag":"54e2c905-54c3-413d-bab5-4014f6749749","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"90260815-db21-4564-8348-dd43a55ba8f4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"971e8369-3acf-47f4-9bf8-8a324cd86710","principalId":"f52b14ca-2933-4256-ab55-4adf1ea36777"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-k4srf6qv3ivz4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"f90e5ffa-18e3-4316-a54f-e239a792551a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"971e8369-3acf-47f4-9bf8-8a324cd86710","principalId":"f52b14ca-2933-4256-ab55-4adf1ea36777"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/child-policy"}],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/parent-policy","name":"parent-policy","type":"Microsoft.Network/FirewallPolicies","etag":"49d99da0-1578-40c9-88b4-f3541a38c51d","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"e1a012ef-7143-4f61-ad7d-012ad9a750b3","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1":{"clientId":"231c354c-f28a-40f3-a55a-e8ebbe3e7526","principalId":"a8042d91-b0c4-4550-9851-5c3e53b47429"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-2j25i2zhe2ohq.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"06895cea-93ed-4f8e-9fef-7ab58d314d7a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1":{"clientId":"231c354c-f28a-40f3-a55a-e8ebbe3e7526","principalId":"a8042d91-b0c4-4550-9851-5c3e53b47429"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-lkrgx5w3oaxtk.vault.azure.net/secrets/cacert/0c2f46a014544e01a63d0ff4eb1dc782"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/parent-policy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/child-policy","name":"child-policy","type":"Microsoft.Network/FirewallPolicies","etag":"29f0e814-4910-4ddc-b80b-71bc47c5fc95","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-test-byok1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"83dbbdd9-e785-4d57-a0de-8bb3ce4bcdf4","principalId":"15a559e1-cc6d-4bc2-bb72-89ff62993f25"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"3d6d374b-b5a1-404b-a084-cbfface150f4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2":{"clientId":"daa0a72c-c8f2-4f87-8a74-124859918ffe","principalId":"ffb92825-b46a-4eae-86dd-4014f94c1e53"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-6zmoixgwqga7o.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"3572602c-1933-4bd0-b846-7ae9661fae92","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity3":{"clientId":"7a260791-078f-4588-bfea-7cb8a140b897","principalId":"53197c7f-b501-4a5c-a790-bdffed9b7447"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"c128b1b9-699e-4e60-9d23-739f1fe21d1f","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-jluizkzeptzay.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"bd666cf7-8eae-41b0-b5fa-0410a6edfe10","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity3":{"clientId":"fe495093-897c-41be-8234-3bb0cc1461b9","principalId":"5b703968-72bd-4f40-932a-154b7a46c7c8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-7rzm6477l544w.vault.azure.net/secrets/cacert"}},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"7db2681d-356d-4436-83fe-b3844fed09c2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2":{"clientId":"9c5b9192-17a4-41fa-9fba-af1c2715b92c","principalId":"c694240a-11e1-47b9-86b2-0ad34e2d1697"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"dadd66e0-7c91-4a96-b648-b773a06e9730","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["10.0.0.2","10.0.0.3"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy23nlxvt25yy63664dmgh5o6ysn24676qkb7z37fgseq2a/providers/Microsoft.Network/firewallPolicies/myclipolicy","name":"myclipolicy","type":"Microsoft.Network/FirewallPolicies","etag":"bd873d9f-79b4-403d-8ce4-c2858ba6cd4c","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy","name":"policy","type":"Microsoft.Network/FirewallPolicies","etag":"5545800c-a3f5-4f78-8aac-f03a55d9e073","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy2","name":"policy2","type":"Microsoft.Network/FirewallPolicies","etag":"f2df616c-f7a5-482c-bbe1-68c610a31129","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy3","name":"policy3","type":"Microsoft.Network/FirewallPolicies","etag":"252d5905-fa65-4e23-9836-44caecaaaf6d","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy4","name":"policy4","type":"Microsoft.Network/FirewallPolicies","etag":"b59db942-7fa3-4119-ae44-2c346f115a3c","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy5","name":"policy5","type":"Microsoft.Network/FirewallPolicies","etag":"899a54f8-7eaf-4d13-99ff-ec7220de3ab0","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy6","name":"policy6","type":"Microsoft.Network/FirewallPolicies","etag":"f9ae2b63-a1f3-4ced-90da-5537b20f95cd","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy7","name":"policy7","type":"Microsoft.Network/FirewallPolicies","etag":"b05c8037-0ca1-4fa5-bc7f-feda76df6c5f","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy8","name":"policy8","type":"Microsoft.Network/FirewallPolicies","etag":"1bb1c8da-8dc4-4fa2-8459-68c922753bb5","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy_1","name":"policy_1","type":"Microsoft.Network/FirewallPolicies","etag":"fb8841f4-ac7e-486e-986d-d4e75a93fb31","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy_2","name":"policy_2","type":"Microsoft.Network/FirewallPolicies","etag":"e3291f6b-7762-4d2a-8eae-ce8650a8e0a6","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/Dikla_policy/ruleCollectionGroups/collection"}],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[],"privateRanges":["10.0.0.0/8","192.168.0.0/16","100.64.0.0/10"]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/Dikla_policy","name":"Dikla_policy","type":"Microsoft.Network/FirewallPolicies","etag":"a368adca-760d-48cd-ae64-5fea578958d6","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-fligkbpgtyl2i.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"7d9c3060-9be2-4012-9bd5-b7954b412a99","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"9b50a9d4-3158-4eaa-8917-0aa60cd6287d","principalId":"a318e460-75c9-494b-887c-c5e7b83cef4c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","dnsSettings":{"servers":[],"enableProxy":true},"transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-p4scs64nhuj6y.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-3/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-3/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-3/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"f93ed87f-a687-4036-a6c7-de510f1829a2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"4af28c35-c667-4b9f-81fd-e01ff0efc798","principalId":"56616fd7-40f3-45e0-be0d-28659fa5206c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-2bn7jnzatv7n6.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-4/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-4/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-4/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"b95c24ce-eb62-4c91-8f9f-f62c67517163","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-4/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"fc5e6872-908d-46d4-9445-2ff81225cac9","principalId":"f20257bb-3269-4a97-93de-b5a7320c718c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"fw-cert-ysON8txuiUceV","keyVaultSecretId":"https://fw-cert-kv-yson8txuiucev.vault.azure.net/secrets/fw-cert-ysON8txuiUceV/3a8287fe2693442ab8c60503f2351b59"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug_westus2/providers/Microsoft.Network/firewallPolicies/parent_policy_westus2/ruleCollectionGroups/aaa"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug_westus2/providers/Microsoft.Network/firewallPolicies/parent_policy_westus2","name":"parent_policy_westus2","type":"Microsoft.Network/FirewallPolicies","etag":"05a4e34e-3c9d-472c-a7fa-7df4a5c6a819","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-cert-id-ysON8txuiUceV":{"clientId":"5939d421-cea8-4a00-897f-dc7705ab693d","principalId":"2c022e5c-acdc-429c-89fc-46f7a74e41e3"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-2ipfc2vzpk74i.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-60K-limit/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-60K-limit/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-60K-limit/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"617099c9-ac9c-4aa6-95d5-24a4aadd2653","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-60K-limit/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"76175755-2a16-4a44-91aa-2ca543c8c30c","principalId":"6fb5d5e4-faf0-4344-9f7e-d23124c68ae1"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-scu-s1/providers/Microsoft.Network/azureFirewalls/fw-scu"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard","name":"policy-scu-Standard","type":"Microsoft.Network/FirewallPolicies","etag":"144c2e8b-71a0-4e98-932f-f9164e29cefe","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium","name":"policy-scu-Premium","type":"Microsoft.Network/FirewallPolicies","etag":"6d0ff21e-6647-42a6-9838-3edeeee14985","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard","name":"policy-scu-Standard","type":"Microsoft.Network/FirewallPolicies","etag":"7f1a66e6-b881-40c6-9410-365338f4fefe","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-scu-s2/providers/Microsoft.Network/azureFirewalls/fw-scu"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium","name":"policy-scu-Premium","type":"Microsoft.Network/FirewallPolicies","etag":"f6809395-e45e-4f8a-a6e2-81e02ea49d40","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-f5hsk3cnwhvpa.vault.azure.net/secrets/cacert"}},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"e8917dd7-c59d-4da6-8129-b6f0ff15100f","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"d9d9e8e1-ebcf-48ce-a77a-db986268078d","principalId":"7e83c22d-c561-4368-af89-f80d90d251ba"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002"},"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child","name":"child","type":"Microsoft.Network/FirewallPolicies","etag":"abc45da6-a3cd-4034-8e01-499de8bae026","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"330a80b6-9f19-43e6-8a86-44fda4486205","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0e728f1d-2126-4671-9748-e1d019cd8f58","principalId":"1bdf37a0-2331-4709-93ab-6d0a2dfc6913"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-quz5fuk4txb6c.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"5fb4e660-10e4-406a-a1be-b8fbb8617cb4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0e728f1d-2126-4671-9748-e1d019cd8f58","principalId":"1bdf37a0-2331-4709-93ab-6d0a2dfc6913"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/BYOK_BUG_BASH1","name":"BYOK_BUG_BASH1","type":"Microsoft.Network/FirewallPolicies","etag":"9a7ee719-7eb4-4a6d-a35d-3f07d5ff271b","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_BYOK_put/providers/Microsoft.Network/firewallPolicies/policy_westus2","name":"policy_westus2","type":"Microsoft.Network/FirewallPolicies","etag":"54e2c905-54c3-413d-bab5-4014f6749749","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"90260815-db21-4564-8348-dd43a55ba8f4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"971e8369-3acf-47f4-9bf8-8a324cd86710","principalId":"f52b14ca-2933-4256-ab55-4adf1ea36777"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-k4srf6qv3ivz4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"f90e5ffa-18e3-4316-a54f-e239a792551a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"971e8369-3acf-47f4-9bf8-8a324cd86710","principalId":"f52b14ca-2933-4256-ab55-4adf1ea36777"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/child-policy"}],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/parent-policy","name":"parent-policy","type":"Microsoft.Network/FirewallPolicies","etag":"49d99da0-1578-40c9-88b4-f3541a38c51d","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"e1a012ef-7143-4f61-ad7d-012ad9a750b3","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1":{"clientId":"231c354c-f28a-40f3-a55a-e8ebbe3e7526","principalId":"a8042d91-b0c4-4550-9851-5c3e53b47429"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-2j25i2zhe2ohq.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"06895cea-93ed-4f8e-9fef-7ab58d314d7a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1":{"clientId":"231c354c-f28a-40f3-a55a-e8ebbe3e7526","principalId":"a8042d91-b0c4-4550-9851-5c3e53b47429"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-lkrgx5w3oaxtk.vault.azure.net/secrets/cacert/0c2f46a014544e01a63d0ff4eb1dc782"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/parent-policy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/child-policy","name":"child-policy","type":"Microsoft.Network/FirewallPolicies","etag":"29f0e814-4910-4ddc-b80b-71bc47c5fc95","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-test-byok1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"83dbbdd9-e785-4d57-a0de-8bb3ce4bcdf4","principalId":"15a559e1-cc6d-4bc2-bb72-89ff62993f25"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"3d6d374b-b5a1-404b-a084-cbfface150f4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2":{"clientId":"daa0a72c-c8f2-4f87-8a74-124859918ffe","principalId":"ffb92825-b46a-4eae-86dd-4014f94c1e53"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-6zmoixgwqga7o.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"3572602c-1933-4bd0-b846-7ae9661fae92","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity3":{"clientId":"7a260791-078f-4588-bfea-7cb8a140b897","principalId":"53197c7f-b501-4a5c-a790-bdffed9b7447"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"c128b1b9-699e-4e60-9d23-739f1fe21d1f","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-jluizkzeptzay.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"bd666cf7-8eae-41b0-b5fa-0410a6edfe10","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity3":{"clientId":"fe495093-897c-41be-8234-3bb0cc1461b9","principalId":"5b703968-72bd-4f40-932a-154b7a46c7c8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-7rzm6477l544w.vault.azure.net/secrets/cacert"}},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"7db2681d-356d-4436-83fe-b3844fed09c2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2":{"clientId":"9c5b9192-17a4-41fa-9fba-af1c2715b92c","principalId":"c694240a-11e1-47b9-86b2-0ad34e2d1697"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"dadd66e0-7c91-4a96-b648-b773a06e9730","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["10.0.0.2","10.0.0.3"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy23nlxvt25yy63664dmgh5o6ysn24676qkb7z37fgseq2a/providers/Microsoft.Network/firewallPolicies/myclipolicy","name":"myclipolicy","type":"Microsoft.Network/FirewallPolicies","etag":"bd873d9f-79b4-403d-8ce4-c2858ba6cd4c","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy","name":"policy","type":"Microsoft.Network/FirewallPolicies","etag":"5545800c-a3f5-4f78-8aac-f03a55d9e073","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy2","name":"policy2","type":"Microsoft.Network/FirewallPolicies","etag":"f2df616c-f7a5-482c-bbe1-68c610a31129","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy3","name":"policy3","type":"Microsoft.Network/FirewallPolicies","etag":"252d5905-fa65-4e23-9836-44caecaaaf6d","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy4","name":"policy4","type":"Microsoft.Network/FirewallPolicies","etag":"b59db942-7fa3-4119-ae44-2c346f115a3c","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy5","name":"policy5","type":"Microsoft.Network/FirewallPolicies","etag":"899a54f8-7eaf-4d13-99ff-ec7220de3ab0","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy6","name":"policy6","type":"Microsoft.Network/FirewallPolicies","etag":"f9ae2b63-a1f3-4ced-90da-5537b20f95cd","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy7","name":"policy7","type":"Microsoft.Network/FirewallPolicies","etag":"b05c8037-0ca1-4fa5-bc7f-feda76df6c5f","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy8","name":"policy8","type":"Microsoft.Network/FirewallPolicies","etag":"1bb1c8da-8dc4-4fa2-8459-68c922753bb5","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy_1","name":"policy_1","type":"Microsoft.Network/FirewallPolicies","etag":"fb8841f4-ac7e-486e-986d-d4e75a93fb31","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"interCA","keyVaultSecretId":"https://nivikeyvault.vault.azure.net/secrets/interCA/79fdc2b823d9427a8d5ad7c47f80c68d"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/bewaters-features-mwh/providers/Microsoft.Network/firewallPolicies/policy_2","name":"policy_2","type":"Microsoft.Network/FirewallPolicies","etag":"e3291f6b-7762-4d2a-8eae-ce8650a8e0a6","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_BYOK_put/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my_identity":{"clientId":"150b3516-6ff4-432f-bd8e-ffab62688ad4","principalId":"05e30182-9396-4525-bef0-15001caa5366"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/Dikla_policy/ruleCollectionGroups/collection"}],"firewalls":[],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[],"privateRanges":["10.0.0.0/8","192.168.0.0/16","100.64.0.0/10"]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/Dikla_policy","name":"Dikla_policy","type":"Microsoft.Network/FirewallPolicies","etag":"a368adca-760d-48cd-ae64-5fea578958d6","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Off","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-prm2-fligkbpgtyl2i.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/firewallPolicies/fwpolicy001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/azureFirewalls/fw1"}],"intrusionDetection":{"mode":"Alert","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"},{"id":"2024898","mode":"Alert"}],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.Network/firewallPolicies/fwpolicy001","name":"fwpolicy001","type":"Microsoft.Network/FirewallPolicies","etag":"7d9c3060-9be2-4012-9bd5-b7954b412a99","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbalandin_rg_slice_05-02-2022_16-48_amir/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"9b50a9d4-3158-4eaa-8917-0aa60cd6287d","principalId":"a318e460-75c9-494b-887c-c5e7b83cef4c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","dnsSettings":{"servers":[],"enableProxy":true},"transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-p4scs64nhuj6y.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-3/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-3/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-3/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"f93ed87f-a687-4036-a6c7-de510f1829a2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"4af28c35-c667-4b9f-81fd-e01ff0efc798","principalId":"56616fd7-40f3-45e0-be0d-28659fa5206c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-2bn7jnzatv7n6.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-4/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-4/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Off","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"sourceIpGroups":[],"destinationIpGroups":[],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-webcat-4/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"b95c24ce-eb62-4c91-8f9f-f62c67517163","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-webcat-4/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"fc5e6872-908d-46d4-9445-2ff81225cac9","principalId":"f20257bb-3269-4a97-93de-b5a7320c718c"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"transportSecurity":{"certificateAuthority":{"name":"fw-cert-ysON8txuiUceV","keyVaultSecretId":"https://fw-cert-kv-yson8txuiucev.vault.azure.net/secrets/fw-cert-ysON8txuiUceV/3a8287fe2693442ab8c60503f2351b59"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug_westus2/providers/Microsoft.Network/firewallPolicies/parent_policy_westus2/ruleCollectionGroups/aaa"}],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug_westus2/providers/Microsoft.Network/firewallPolicies/parent_policy_westus2","name":"parent_policy_westus2","type":"Microsoft.Network/FirewallPolicies","etag":"05a4e34e-3c9d-472c-a7fa-7df4a5c6a819","location":"westus2","tags":{},"identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fw-cert-id-ysON8txuiUceV":{"clientId":"5939d421-cea8-4a00-897f-dc7705ab693d","principalId":"2c022e5c-acdc-429c-89fc-46f7a74e41e3"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-2ipfc2vzpk74i.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-60K-limit/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-60K-limit/providers/Microsoft.Network/azureFirewalls/fw"}],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-60K-limit/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"617099c9-ac9c-4aa6-95d5-24a4aadd2653","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-60K-limit/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"76175755-2a16-4a44-91aa-2ca543c8c30c","principalId":"6fb5d5e4-faf0-4344-9f7e-d23124c68ae1"}}}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-scu-s1/providers/Microsoft.Network/azureFirewalls/fw-scu"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard","name":"policy-scu-Standard","type":"Microsoft.Network/FirewallPolicies","etag":"144c2e8b-71a0-4e98-932f-f9164e29cefe","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s1/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium","name":"policy-scu-Premium","type":"Microsoft.Network/FirewallPolicies","etag":"6d0ff21e-6647-42a6-9838-3edeeee14985","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Standard","name":"policy-scu-Standard","type":"Microsoft.Network/FirewallPolicies","etag":"7f1a66e6-b881-40c6-9410-365338f4fefe","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-scu-s2/providers/Microsoft.Network/azureFirewalls/fw-scu"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-scu-s2/providers/Microsoft.Network/firewallPolicies/policy-scu-Premium","name":"policy-scu-Premium","type":"Microsoft.Network/FirewallPolicies","etag":"f6809395-e45e-4f8a-a6e2-81e02ea49d40","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest24","keyVaultSecretId":"https://fw-premium-f5hsk3cnwhvpa.vault.azure.net/secrets/cacert"}},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002/ruleCollectionGroups/TestRules"}],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[{"id":"2024897","mode":"Alert"}],"bypassTrafficSettings":[{"name":"MyRule","protocol":"TCP","sourceAddresses":["10.0.10.10","10.0.10.11"],"destinationAddresses":["1.1.1.1"],"destinationPorts":["80"]}]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002","name":"test002","type":"Microsoft.Network/FirewallPolicies","etag":"e8917dd7-c59d-4da6-8129-b6f0ff15100f","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"d9d9e8e1-ebcf-48ce-a77a-db986268078d","principalId":"7e83c22d-c561-4368-af89-f80d90d251ba"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child/ruleCollectionGroups/DefaultApplicationRuleCollectionGroup"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/test002"},"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_tls_bug/providers/Microsoft.Network/firewallPolicies/child","name":"child","type":"Microsoft.Network/FirewallPolicies","etag":"abc45da6-a3cd-4034-8e01-499de8bae026","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"330a80b6-9f19-43e6-8a86-44fda4486205","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0e728f1d-2126-4671-9748-e1d019cd8f58","principalId":"1bdf37a0-2331-4709-93ab-6d0a2dfc6913"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-quz5fuk4txb6c.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-1/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"5fb4e660-10e4-406a-a1be-b8fbb8617cb4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"0e728f1d-2126-4671-9748-e1d019cd8f58","principalId":"1bdf37a0-2331-4709-93ab-6d0a2dfc6913"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/dika_private_ranges_test/providers/Microsoft.Network/firewallPolicies/BYOK_BUG_BASH1","name":"BYOK_BUG_BASH1","type":"Microsoft.Network/FirewallPolicies","etag":"9a7ee719-7eb4-4a6d-a35d-3f07d5ff271b","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/nivi_BYOK_put/providers/Microsoft.Network/firewallPolicies/policy_westus2","name":"policy_westus2","type":"Microsoft.Network/FirewallPolicies","etag":"54e2c905-54c3-413d-bab5-4014f6749749","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"90260815-db21-4564-8348-dd43a55ba8f4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"971e8369-3acf-47f4-9bf8-8a324cd86710","principalId":"f52b14ca-2933-4256-ab55-4adf1ea36777"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-k4srf6qv3ivz4.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-2/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"f90e5ffa-18e3-4316-a54f-e239a792551a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"971e8369-3acf-47f4-9bf8-8a324cd86710","principalId":"f52b14ca-2933-4256-ab55-4adf1ea36777"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":[],"ipAddresses":[]},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/child-policy"}],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Off"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/parent-policy","name":"parent-policy","type":"Microsoft.Network/FirewallPolicies","etag":"49d99da0-1578-40c9-88b4-f3541a38c51d","location":"westus2","tags":{}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"e1a012ef-7143-4f61-ad7d-012ad9a750b3","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1":{"clientId":"231c354c-f28a-40f3-a55a-e8ebbe3e7526","principalId":"a8042d91-b0c4-4550-9851-5c3e53b47429"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-2j25i2zhe2ohq.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-5/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"06895cea-93ed-4f8e-9fef-7ab58d314d7a","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-5/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1":{"clientId":"231c354c-f28a-40f3-a55a-e8ebbe3e7526","principalId":"a8042d91-b0c4-4550-9851-5c3e53b47429"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"cacert","keyVaultSecretId":"https://fw-premium-lkrgx5w3oaxtk.vault.azure.net/secrets/cacert/0c2f46a014544e01a63d0ff4eb1dc782"}},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/parent-policy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/yasmin-test-byok1/providers/Microsoft.Network/firewallPolicies/child-policy","name":"child-policy","type":"Microsoft.Network/FirewallPolicies","etag":"29f0e814-4910-4ddc-b80b-71bc47c5fc95","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yasmin-test-byok1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity0":{"clientId":"83dbbdd9-e785-4d57-a0de-8bb3ce4bcdf4","principalId":"15a559e1-cc6d-4bc2-bb72-89ff62993f25"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"3d6d374b-b5a1-404b-a084-cbfface150f4","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2":{"clientId":"daa0a72c-c8f2-4f87-8a74-124859918ffe","principalId":"ffb92825-b46a-4eae-86dd-4014f94c1e53"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-6zmoixgwqga7o.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Failed"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-6/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"3572602c-1933-4bd0-b846-7ae9661fae92","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-6/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity3":{"clientId":"7a260791-078f-4588-bfea-7cb8a140b897","principalId":"53197c7f-b501-4a5c-a790-bdffed9b7447"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"c128b1b9-699e-4e60-9d23-739f1fe21d1f","location":"westus2"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-jluizkzeptzay.vault.azure.net/secrets/cacert"}},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-7/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"bd666cf7-8eae-41b0-b5fa-0410a6edfe10","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-7/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity3":{"clientId":"fe495093-897c-41be-8234-3bb0cc1461b9","principalId":"5b703968-72bd-4f40-932a-154b7a46c7c8"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","transportSecurity":{"certificateAuthority":{"name":"caTest5","keyVaultSecretId":"https://fw-premium-7rzm6477l544w.vault.azure.net/secrets/cacert"}},"childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent/ruleCollectionGroups/TestRules"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent","name":"test001-parent","type":"Microsoft.Network/FirewallPolicies","etag":"7db2681d-356d-4436-83fe-b3844fed09c2","location":"westus2","identity":{"type":"UserAssigned","userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2":{"clientId":"9c5b9192-17a4-41fa-9fba-af1c2715b92c","principalId":"c694240a-11e1-47b9-86b2-0ad34e2d1697"}}}},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001/ruleCollectionGroups/TestRules"}],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.Network/azureFirewalls/fw"}],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001-parent"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/denis-byok-8/providers/Microsoft.Network/firewallPolicies/test001","name":"test001","type":"Microsoft.Network/FirewallPolicies","etag":"dadd66e0-7c91-4a96-b648-b773a06e9730","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["10.0.0.2","10.0.0.3"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy23nlxvt25yy63664dmgh5o6ysn24676qkb7z37fgseq2a/providers/Microsoft.Network/firewallPolicies/myclipolicy","name":"myclipolicy","type":"Microsoft.Network/FirewallPolicies","etag":"bd873d9f-79b4-403d-8ce4-c2858ba6cd4c","location":"westus2"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":["*.microsoft.com"],"ipAddresses":["19.1.2.5","52.2.0.0/16","30.32.73.91"]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest0/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest0/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"8fed7082-6e00-4fbd-b317-467ff85e470a","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest8/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest8/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest8/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"309020df-1991-4747-9239-863193da0e42","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["8.8.8.8"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest1/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest1/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"8f78f0a3-1481-44c8-908a-c0a09a5e0d88","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest8/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest8/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"0a53a99c-9c76-4ec6-bc07-c761b12758e1","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzFwManagerFTPTest5/providers/Microsoft.Network/azureFirewalls/AzureFirewall"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzFwManagerFTPTest5/providers/Microsoft.Network/firewallPolicies/fwmanagerTestPolicy","name":"fwmanagerTestPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"6d298f58-24e2-4f4f-93be-211911e72d39","location":"centralus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub2/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub2/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHub2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"2a8d0c61-7a0a-49cf-96e1-fb8b7eab8964","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest2/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest2/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest2/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"e115ff8a-3b4a-4596-82da-be315c03ccaa","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub9/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub9/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateAzFwInHub9/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"9fc70138-f59b-405d-a80a-3e89ca385e09","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest2/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest2/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest2/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"1f78d73a-342d-4e74-b62e-2e6add3e79fc","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub9/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub9/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/RemoveFirewallPolicyOnAzFwInHub9/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"6138daf1-e026-401a-91fd-d919dd722390","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub3/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub3/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateFirewallPolicyOnAzFwInHub3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"af498683-96a7-4ee5-899e-54b7ef9d2931","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["8.8.8.8"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"fe1bd64a-aaa7-4108-a143-3dd2f16013aa","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest9/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest9/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest9/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest9/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"6463c64e-b1dc-46fc-973e-cc5e3d2ce8a8","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":["*.microsoft.com"],"ipAddresses":["19.1.2.5","52.2.0.0/16","30.32.73.91"]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"e163fc89-a162-4ede-872b-b1b41e9e92a1","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest9/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest9/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest9/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"742d9f91-4a80-462f-a060-38e3d502f314","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzFwManagerFTPTest3/providers/Microsoft.Network/azureFirewalls/AzureFirewall"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzFwManagerFTPTest3/providers/Microsoft.Network/firewallPolicies/fwmanagerTestPolicy","name":"fwmanagerTestPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"41776456-0412-4c74-bb38-01425835e0a2","location":"centralus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub0/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub0/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHub0/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"1ecfdc46-3c29-4e63-958d-4563a1c1e77a","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub1/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub1/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateFirewallPolicyOnAzFwInHub1/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"58560561-5623-41cd-8488-186dd88c5469","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub1/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub1/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/RemoveFirewallPolicyOnAzFwInHub1/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"8ab26fb1-c429-4047-8e4b-cb35cca878ca","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest6/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest6/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest6/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest6/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"e2e83e9a-374c-40a4-b42b-b4c94a6e3812","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest6/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest6/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest6/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"fe50d90e-7b52-4644-a7a4-b856be465aff","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["8.8.8.8"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest4/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"9346f608-7470-4861-9fc1-f86f6ae0d8ea","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":["*.microsoft.com"],"ipAddresses":["19.1.2.5","52.2.0.0/16","30.32.73.91"]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest9/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest9/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"34b1bdb1-0bbf-4e79-a1e6-4c1f5d2ec37b","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest0/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest0/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest0/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest0/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"338dcdb6-b5f1-419c-993d-0b1e1c4ee51f","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest0/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest0/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest0/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"2a1fad8e-f062-464a-9396-c1e2ed3ffa6b","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzFwManagerFTPTest2/providers/Microsoft.Network/azureFirewalls/AzureFirewall"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzFwManagerFTPTest2/providers/Microsoft.Network/firewallPolicies/fwmanagerTestPolicy","name":"fwmanagerTestPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"c7ea53d6-5a92-433d-baa6-fd50a267fe2b","location":"centralus"},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub8/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RemoveFirewallPolicyOnAzFwInHub8/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/RemoveFirewallPolicyOnAzFwInHub8/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"26db7a05-e9d1-4c9d-be5d-716eaa3bfca3","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub5/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateAzFwInHub5/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateAzFwInHub5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"6f77b040-c92c-4ec6-b28f-41dbdaf6d9be","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub5/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateFirewallPolicyOnAzFwInHub5/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateFirewallPolicyOnAzFwInHub5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"08088313-2feb-40c0-8593-8726962119d2","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub3/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/NetworkRG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/CreateAndDeleteAzFwInHub3/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/AppRG"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHub3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"7a4369a0-5350-4740-b8e9-aed54a2058bd","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest5/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest5/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest5/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"5b675970-7588-46a0-8fb8-6c2d897a6641","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest5/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FirewallPolicyInheritanceTest5/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/FirewallPolicyInheritanceTest5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"e3a5b338-fa6b-4ec9-913d-adc12029e3a0","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy"}],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest5/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest5/providers/Microsoft.Network/firewallpolicies/TestBaseFirewallPolicy/ruleCollectionGroups/baseRG2"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest5/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy","name":"TestBaseFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"c1c54695-8427-4c70-ae89-fa37c02e0208","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest5/providers/Microsoft.Network/firewallpolicies/TestFirewallPolicy/ruleCollectionGroups/ChildRG1"}],"firewalls":[],"basePolicy":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest5/providers/Microsoft.Network/firewallPolicies/TestBaseFirewallPolicy"},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/UpdateBaseFirewallPolicyAttachedToAzFwInHubTest5/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"2daafc0d-d8f8-4062-b732-f0afb45b663f","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","dnsSettings":{"servers":["8.8.8.8"],"enableProxy":true},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwInHubWithDNSSettingsTest3/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"1a226e8f-6514-4aba-a851-4ed3ffca6fc1","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":["*.microsoft.com"],"ipAddresses":["19.1.2.5","52.2.0.0/16","30.32.73.91"]},"childPolicies":[],"ruleCollectionGroups":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy/ruleCollectionGroups/TestRuleCollGroup"}],"firewalls":[],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/CreateAndDeleteAzFwPolicyInHubWithTIWhitelistTest7/providers/Microsoft.Network/firewallPolicies/TestFirewallPolicy","name":"TestFirewallPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"5d4a177b-89d5-4e08-86e4-3579d2164e35","location":"centralus","tags":{}},{"properties":{"sku":{"tier":"Standard"},"threatIntelMode":"Alert","childPolicies":[],"ruleCollectionGroups":[],"firewalls":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzFwManagerFTPTest1/providers/Microsoft.Network/azureFirewalls/AzureFirewall"}],"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/AzFwManagerFTPTest1/providers/Microsoft.Network/firewallPolicies/fwmanagerTestPolicy","name":"fwmanagerTestPolicy","type":"Microsoft.Network/FirewallPolicies","etag":"f62ddec9-55cb-4253-bda4-57fdcaf5ac05","location":"centralus"},{"properties":{"sku":{"tier":"Premium"},"threatIntelMode":"Alert","threatIntelWhitelist":{"fqdns":["*.microsoft.com"],"ipAddresses":["101.0.0.0","101.0.0.1"]},"childPolicies":[],"ruleCollectionGroups":[],"firewalls":[],"intrusionDetection":{"mode":"Deny","configuration":{"signatureOverrides":[],"bypassTrafficSettings":[]}},"provisioningState":"Succeeded"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy","name":"myclipolicy","type":"Microsoft.Network/FirewallPolicies","etag":"01ed06ef-4581-4d88-a928-ad81054704fa","location":"centralus"}]}' + headers: + cache-control: + - no-cache + content-length: + - '195200' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 11 May 2022 19:55:02 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - Accept-Encoding x-content-type-options: - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' status: code: 200 message: OK @@ -353,9 +393,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --ip-addresses --fqdns --idps-mode User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -368,18 +408,18 @@ interactions: []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"fc1eede5-3c0d-49a8-9e77-81800d66e342\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"01ed06ef-4581-4d88-a928-ad81054704fa\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '930' + - '891' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:33 GMT + - Wed, 11 May 2022 19:55:06 GMT etag: - - '"fc1eede5-3c0d-49a8-9e77-81800d66e342"' + - '"01ed06ef-4581-4d88-a928-ad81054704fa"' expires: - '-1' pragma: @@ -413,15 +453,15 @@ interactions: Connection: - keep-alive Content-Length: - - '544' + - '505' Content-Type: - application/json ParameterSetName: - -g -n --threat-intel-mode --ip-addresses --fqdns --idps-mode User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -434,19 +474,19 @@ interactions: []\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"14e2cbd1-3659-41e2-8fbe-bc1a1718512c\",\r\n \"location\": \"centralus\",\r\n + \ \"etag\": \"a96b7459-cef1-4e4f-8040-aba5d154eb5d\",\r\n \"location\": \"centralus\",\r\n \ \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/9a49eea4-e38e-4532-9120-8f15b0e26fd6?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/60f290d2-92d9-4748-99a8-b42718c4ea1e?api-version=2021-08-01 cache-control: - no-cache content-length: - - '967' + - '928' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:41 GMT + - Wed, 11 May 2022 19:55:13 GMT expires: - '-1' pragma: @@ -462,7 +502,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 200 message: OK @@ -480,9 +520,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --ip-addresses --fqdns --idps-mode User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/9a49eea4-e38e-4532-9120-8f15b0e26fd6?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/60f290d2-92d9-4748-99a8-b42718c4ea1e?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -494,7 +534,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:52 GMT + - Wed, 11 May 2022 19:55:23 GMT expires: - '-1' pragma: @@ -526,9 +566,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --ip-addresses --fqdns --idps-mode User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -541,18 +581,18 @@ interactions: []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"14e2cbd1-3659-41e2-8fbe-bc1a1718512c\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"a96b7459-cef1-4e4f-8040-aba5d154eb5d\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '925' + - '886' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:52 GMT + - Wed, 11 May 2022 19:55:24 GMT etag: - - '"14e2cbd1-3659-41e2-8fbe-bc1a1718512c"' + - '"a96b7459-cef1-4e4f-8040-aba5d154eb5d"' expires: - '-1' pragma: @@ -588,26 +628,26 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"bbc5627d-77e6-4f66-9c11-dbba76a39e72\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"791ac46d-4761-4fa3-afd5-a195382043b6\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/6cca1ec1-3dbd-4571-926c-b6f002286e15?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/4470bd68-21fa-48af-afa4-794fbb3ac8a5?api-version=2021-08-01 cache-control: - no-cache content-length: - - '563' + - '524' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:24:56 GMT + - Wed, 11 May 2022 19:55:30 GMT expires: - '-1' pragma: @@ -619,7 +659,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 201 message: Created @@ -637,9 +677,9 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/6cca1ec1-3dbd-4571-926c-b6f002286e15?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/4470bd68-21fa-48af-afa4-794fbb3ac8a5?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -651,7 +691,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:06 GMT + - Wed, 11 May 2022 19:55:40 GMT expires: - '-1' pragma: @@ -683,26 +723,26 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"bbc5627d-77e6-4f66-9c11-dbba76a39e72\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"791ac46d-4761-4fa3-afd5-a195382043b6\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '564' + - '525' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:06 GMT + - Wed, 11 May 2022 19:55:41 GMT etag: - - '"bbc5627d-77e6-4f66-9c11-dbba76a39e72"' + - '"791ac46d-4761-4fa3-afd5-a195382043b6"' expires: - '-1' pragma: @@ -734,26 +774,26 @@ interactions: ParameterSetName: - -g --policy-name -n User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"bbc5627d-77e6-4f66-9c11-dbba76a39e72\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"791ac46d-4761-4fa3-afd5-a195382043b6\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '564' + - '525' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:09 GMT + - Wed, 11 May 2022 19:55:45 GMT etag: - - '"bbc5627d-77e6-4f66-9c11-dbba76a39e72"' + - '"791ac46d-4761-4fa3-afd5-a195382043b6"' expires: - '-1' pragma: @@ -785,26 +825,26 @@ interactions: ParameterSetName: - -g --policy-name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups?api-version=2021-08-01 response: body: string: "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"bbc5627d-77e6-4f66-9c11-dbba76a39e72\",\r\n \"location\": + \ \"etag\": \"791ac46d-4761-4fa3-afd5-a195382043b6\",\r\n \"location\": \"centralus\"\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '637' + - '598' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:11 GMT + - Wed, 11 May 2022 19:55:48 GMT expires: - '-1' pragma: @@ -836,26 +876,26 @@ interactions: ParameterSetName: - -g --policy-name -n --priority User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"bbc5627d-77e6-4f66-9c11-dbba76a39e72\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"791ac46d-4761-4fa3-afd5-a195382043b6\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '564' + - '525' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:14 GMT + - Wed, 11 May 2022 19:55:50 GMT etag: - - '"bbc5627d-77e6-4f66-9c11-dbba76a39e72"' + - '"791ac46d-4761-4fa3-afd5-a195382043b6"' expires: - '-1' pragma: @@ -887,32 +927,32 @@ interactions: Connection: - keep-alive Content-Length: - - '349' + - '310' Content-Type: - application/json ParameterSetName: - -g --policy-name -n --priority User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"724c9d2b-61a2-49ff-a601-a562ed5a8d30\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"ba40293d-8c44-43f5-942b-a52f47d02c4f\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/36ce4e7f-9e21-44c9-b0d6-45ef359150eb?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/ab564055-61d8-4b69-ae99-2b529aef58bf?api-version=2021-08-01 cache-control: - no-cache content-length: - - '563' + - '524' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:18 GMT + - Wed, 11 May 2022 19:56:00 GMT expires: - '-1' pragma: @@ -928,7 +968,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -946,9 +986,9 @@ interactions: ParameterSetName: - -g --policy-name -n --priority User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/36ce4e7f-9e21-44c9-b0d6-45ef359150eb?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/ab564055-61d8-4b69-ae99-2b529aef58bf?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -960,7 +1000,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:28 GMT + - Wed, 11 May 2022 19:56:10 GMT expires: - '-1' pragma: @@ -992,26 +1032,26 @@ interactions: ParameterSetName: - -g --policy-name -n --priority User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"724c9d2b-61a2-49ff-a601-a562ed5a8d30\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"ba40293d-8c44-43f5-942b-a52f47d02c4f\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '564' + - '525' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:29 GMT + - Wed, 11 May 2022 19:56:11 GMT etag: - - '"724c9d2b-61a2-49ff-a601-a562ed5a8d30"' + - '"ba40293d-8c44-43f5-942b-a52f47d02c4f"' expires: - '-1' pragma: @@ -1045,26 +1085,26 @@ interactions: --rule-name --description --destination-addresses --source-addresses --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"724c9d2b-61a2-49ff-a601-a562ed5a8d30\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"ba40293d-8c44-43f5-942b-a52f47d02c4f\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '564' + - '525' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:31 GMT + - Wed, 11 May 2022 19:56:15 GMT etag: - - '"724c9d2b-61a2-49ff-a601-a562ed5a8d30"' + - '"ba40293d-8c44-43f5-942b-a52f47d02c4f"' expires: - '-1' pragma: @@ -1089,8 +1129,8 @@ interactions: "priority": 10005, "action": {"type": "DNAT"}, "rules": [{"name": "network-rule", "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12000", "12001"], "translatedAddress": - "128.1.1.1", "translatedPort": "1234"}]}]}}' + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234"}]}]}}' headers: Accept: - application/json @@ -1101,7 +1141,7 @@ interactions: Connection: - keep-alive Content-Length: - - '791' + - '743' Content-Type: - application/json ParameterSetName: @@ -1109,38 +1149,38 @@ interactions: --rule-name --description --destination-addresses --source-addresses --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n }\r\n - \ ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"53b77717-559c-41be-b4e0-15af620977f7\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"bf5c505b-16a5-4c7e-bdb6-c401773ebe4e\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/604cbae1-dc46-4c80-b388-a5b19edab329?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/9cdf4763-24f6-4a88-8424-0d01955d1dcc?api-version=2021-08-01 cache-control: - no-cache content-length: - - '1411' + - '1384' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:33 GMT + - Wed, 11 May 2022 19:56:19 GMT expires: - '-1' pragma: @@ -1156,7 +1196,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -1176,9 +1216,9 @@ interactions: --rule-name --description --destination-addresses --source-addresses --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/604cbae1-dc46-4c80-b388-a5b19edab329?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/9cdf4763-24f6-4a88-8424-0d01955d1dcc?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1190,7 +1230,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:43 GMT + - Wed, 11 May 2022 19:56:30 GMT expires: - '-1' pragma: @@ -1224,38 +1264,38 @@ interactions: --rule-name --description --destination-addresses --source-addresses --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n }\r\n - \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"53b77717-559c-41be-b4e0-15af620977f7\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"bf5c505b-16a5-4c7e-bdb6-c401773ebe4e\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1412' + - '1385' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:44 GMT + - Wed, 11 May 2022 19:56:31 GMT etag: - - '"53b77717-559c-41be-b4e0-15af620977f7"' + - '"bf5c505b-16a5-4c7e-bdb6-c401773ebe4e"' expires: - '-1' pragma: @@ -1289,38 +1329,38 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-addresses --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n }\r\n - \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"53b77717-559c-41be-b4e0-15af620977f7\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"bf5c505b-16a5-4c7e-bdb6-c401773ebe4e\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1412' + - '1385' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:46 GMT + - Wed, 11 May 2022 19:56:35 GMT etag: - - '"53b77717-559c-41be-b4e0-15af620977f7"' + - '"bf5c505b-16a5-4c7e-bdb6-c401773ebe4e"' expires: - '-1' pragma: @@ -1343,10 +1383,10 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 12000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234", "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], @@ -1361,7 +1401,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1188' + - '1163' Content-Type: - application/json ParameterSetName: @@ -1369,28 +1409,28 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-addresses --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -1401,18 +1441,18 @@ interactions: \ \"priority\": 13000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"97560446-5425-4e30-9fa2-9bbe2b82a103\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"4a5ccd2c-0562-4f1d-8357-d38827b31607\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/516af3e2-8172-4cf9-b546-29cc1dd4ecb6?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/2fe13583-8ee2-4a04-a8df-0c70f32fc087?api-version=2021-08-01 cache-control: - no-cache content-length: - - '2259' + - '2268' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:48 GMT + - Wed, 11 May 2022 19:56:42 GMT expires: - '-1' pragma: @@ -1428,7 +1468,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -1448,9 +1488,9 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-addresses --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/516af3e2-8172-4cf9-b546-29cc1dd4ecb6?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/2fe13583-8ee2-4a04-a8df-0c70f32fc087?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1462,7 +1502,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:58 GMT + - Wed, 11 May 2022 19:56:53 GMT expires: - '-1' pragma: @@ -1496,28 +1536,28 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-addresses --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -1528,18 +1568,18 @@ interactions: \ \"priority\": 13000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"97560446-5425-4e30-9fa2-9bbe2b82a103\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"4a5ccd2c-0562-4f1d-8357-d38827b31607\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '2260' + - '2269' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:25:58 GMT + - Wed, 11 May 2022 19:56:53 GMT etag: - - '"97560446-5425-4e30-9fa2-9bbe2b82a103"' + - '"4a5ccd2c-0562-4f1d-8357-d38827b31607"' expires: - '-1' pragma: @@ -1573,28 +1613,28 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-addresses --protocols --fqdn-tags --target-urls --enable-tls-inspection User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -1605,18 +1645,18 @@ interactions: \ \"priority\": 13000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"97560446-5425-4e30-9fa2-9bbe2b82a103\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"4a5ccd2c-0562-4f1d-8357-d38827b31607\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '2260' + - '2269' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:01 GMT + - Wed, 11 May 2022 19:56:56 GMT etag: - - '"97560446-5425-4e30-9fa2-9bbe2b82a103"' + - '"4a5ccd2c-0562-4f1d-8357-d38827b31607"' expires: - '-1' pragma: @@ -1639,18 +1679,18 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 12000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234", "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, - "rules": [{"name": "network-rule", "ruleType": "NetworkRule", "ipProtocols": - ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - [], "destinationIpGroups": [], "destinationFqdns": []}]}, {"ruleCollectionType": - "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": - 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", "description": - "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", + "rules": [{"name": "network-rule", "description": "test", "ruleType": "NetworkRule", + "ipProtocols": ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12003", "12004"], + "sourceIpGroups": [], "destinationIpGroups": [], "destinationFqdns": []}]}, + {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", + "priority": 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetUrls": ["www.google.com", "www.bing.com"], "fqdnTags": @@ -1665,7 +1705,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1801' + - '1799' Content-Type: - application/json ParameterSetName: @@ -1673,28 +1713,28 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-addresses --protocols --fqdn-tags --target-urls --enable-tls-inspection User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -1705,34 +1745,34 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"8b2f0b92-0ed9-405c-b6ed-acd417389ff3\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"d2459b5c-715f-44e5-9034-4bfd4fa9ce5a\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/3067c842-b42e-4f51-8d9a-10b1b056ca15?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/f7fe28cb-f9db-4336-877b-e1580de9ea51?api-version=2021-08-01 cache-control: - no-cache content-length: - - '3449' + - '3494' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:04 GMT + - Wed, 11 May 2022 19:56:59 GMT expires: - '-1' pragma: @@ -1748,7 +1788,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1196' status: code: 200 message: OK @@ -1768,9 +1808,9 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-addresses --protocols --fqdn-tags --target-urls --enable-tls-inspection User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/3067c842-b42e-4f51-8d9a-10b1b056ca15?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/f7fe28cb-f9db-4336-877b-e1580de9ea51?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1782,7 +1822,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:14 GMT + - Wed, 11 May 2022 19:57:10 GMT expires: - '-1' pragma: @@ -1816,28 +1856,28 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-addresses --protocols --fqdn-tags --target-urls --enable-tls-inspection User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -1848,34 +1888,34 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"8b2f0b92-0ed9-405c-b6ed-acd417389ff3\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"d2459b5c-715f-44e5-9034-4bfd4fa9ce5a\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '3450' + - '3495' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:14 GMT + - Wed, 11 May 2022 19:57:11 GMT etag: - - '"8b2f0b92-0ed9-405c-b6ed-acd417389ff3"' + - '"d2459b5c-715f-44e5-9034-4bfd4fa9ce5a"' expires: - '-1' pragma: @@ -1909,28 +1949,28 @@ interactions: --rule-name --description --destination-addresses --source-addresses --translated-fqdn --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -1941,34 +1981,34 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"8b2f0b92-0ed9-405c-b6ed-acd417389ff3\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"d2459b5c-715f-44e5-9034-4bfd4fa9ce5a\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '3450' + - '3495' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:17 GMT + - Wed, 11 May 2022 19:57:13 GMT etag: - - '"8b2f0b92-0ed9-405c-b6ed-acd417389ff3"' + - '"d2459b5c-715f-44e5-9034-4bfd4fa9ce5a"' expires: - '-1' pragma: @@ -1991,28 +2031,28 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 12000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234", "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, - "rules": [{"name": "network-rule", "ruleType": "NetworkRule", "ipProtocols": - ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - [], "destinationIpGroups": [], "destinationFqdns": []}]}, {"ruleCollectionType": - "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": - 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", "ruleType": - "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": [], "targetUrls": - ["www.google.com", "www.bing.com"], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": [], "terminateTLS": true, "webCategories": []}]}, {"ruleCollectionType": - "FirewallPolicyNatRuleCollection", "name": "nat-collection-2", "priority": 1000, - "action": {"type": "DNAT"}, "rules": [{"name": "network-rule", "description": - "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": - ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], - "destinationPorts": ["12000", "12001"], "translatedPort": "1234", "translatedFqdn": - "www.google.com"}]}]}}' + "rules": [{"name": "network-rule", "description": "test", "ruleType": "NetworkRule", + "ipProtocols": ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12003", "12004"], + "sourceIpGroups": [], "destinationIpGroups": [], "destinationFqdns": []}]}, + {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", + "priority": 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", + "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": ["www.google.com", "www.bing.com"], + "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": [], "terminateTLS": + true, "webCategories": []}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", + "name": "nat-collection-2", "priority": 1000, "action": {"type": "DNAT"}, "rules": + [{"name": "network-rule", "description": "test", "ruleType": "NatRule", "ipProtocols": + ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedPort": "1234", + "translatedFqdn": "www.google.com"}]}]}}' headers: Accept: - application/json @@ -2023,7 +2063,7 @@ interactions: Connection: - keep-alive Content-Length: - - '2287' + - '2299' Content-Type: - application/json ParameterSetName: @@ -2031,28 +2071,28 @@ interactions: --rule-name --description --destination-addresses --source-addresses --translated-fqdn --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -2063,46 +2103,46 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"da7264a1-e123-4be9-a573-1dd1ca5e965b\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"e005c50f-a786-48c2-98aa-82000d6ae27f\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/b5674d2d-e023-470b-8c4a-cfec1cfddc0a?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/223a0223-174d-4d1f-ae76-8d25a5e71760?api-version=2021-08-01 cache-control: - no-cache content-length: - - '4295' + - '4352' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:19 GMT + - Wed, 11 May 2022 19:57:18 GMT expires: - '-1' pragma: @@ -2118,7 +2158,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -2138,9 +2178,9 @@ interactions: --rule-name --description --destination-addresses --source-addresses --translated-fqdn --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/b5674d2d-e023-470b-8c4a-cfec1cfddc0a?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/223a0223-174d-4d1f-ae76-8d25a5e71760?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2152,7 +2192,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:29 GMT + - Wed, 11 May 2022 19:57:27 GMT expires: - '-1' pragma: @@ -2186,28 +2226,28 @@ interactions: --rule-name --description --destination-addresses --source-addresses --translated-fqdn --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -2218,46 +2258,46 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"da7264a1-e123-4be9-a573-1dd1ca5e965b\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"e005c50f-a786-48c2-98aa-82000d6ae27f\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '4296' + - '4353' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:30 GMT + - Wed, 11 May 2022 19:57:29 GMT etag: - - '"da7264a1-e123-4be9-a573-1dd1ca5e965b"' + - '"e005c50f-a786-48c2-98aa-82000d6ae27f"' expires: - '-1' pragma: @@ -2289,28 +2329,28 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -2321,46 +2361,46 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"da7264a1-e123-4be9-a573-1dd1ca5e965b\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"e005c50f-a786-48c2-98aa-82000d6ae27f\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '4296' + - '4353' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:31 GMT + - Wed, 11 May 2022 19:57:31 GMT etag: - - '"da7264a1-e123-4be9-a573-1dd1ca5e965b"' + - '"e005c50f-a786-48c2-98aa-82000d6ae27f"' expires: - '-1' pragma: @@ -2393,28 +2433,28 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-addresses --destination-addresses --protocols --target-fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -2425,46 +2465,46 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n - \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n - \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"da7264a1-e123-4be9-a573-1dd1ca5e965b\",\r\n \"location\": \"centralus\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '4296' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 21 Apr 2021 04:26:33 GMT + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n + \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n + \ \"etag\": \"e005c50f-a786-48c2-98aa-82000d6ae27f\",\r\n \"location\": \"centralus\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '4353' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 11 May 2022 19:57:34 GMT etag: - - '"da7264a1-e123-4be9-a573-1dd1ca5e965b"' + - '"e005c50f-a786-48c2-98aa-82000d6ae27f"' expires: - '-1' pragma: @@ -2487,32 +2527,32 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 12000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234", "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, - "rules": [{"name": "network-rule", "ruleType": "NetworkRule", "ipProtocols": - ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - [], "destinationIpGroups": [], "destinationFqdns": []}]}, {"ruleCollectionType": - "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": - 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", "ruleType": - "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": [], "targetUrls": - ["www.google.com", "www.bing.com"], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": [], "terminateTLS": true, "webCategories": []}, {"name": "application-rule-2", + "rules": [{"name": "network-rule", "description": "test", "ruleType": "NetworkRule", + "ipProtocols": ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12003", "12004"], + "sourceIpGroups": [], "destinationIpGroups": [], "destinationFqdns": []}]}, + {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", + "priority": 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", - "port": 12801}], "targetFqdns": ["www.bing.com"], "terminateTLS": false}]}, - {"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection-2", - "priority": 1000, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedPort": "1234", "sourceIpGroups": [], "translatedFqdn": - "www.google.com"}]}]}}' + "port": 12801}], "targetFqdns": [], "targetUrls": ["www.google.com", "www.bing.com"], + "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": [], "terminateTLS": + true, "webCategories": []}, {"name": "application-rule-2", "description": "test", + "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + ["www.bing.com"], "terminateTLS": false}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", + "name": "nat-collection-2", "priority": 1000, "action": {"type": "Dnat"}, "rules": + [{"name": "network-rule", "description": "test", "ruleType": "NatRule", "ipProtocols": + ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedPort": "1234", + "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' headers: Accept: - application/json @@ -2523,35 +2563,35 @@ interactions: Connection: - keep-alive Content-Length: - - '2641' + - '2676' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-addresses --destination-addresses --protocols --target-fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -2562,20 +2602,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -2589,30 +2630,29 @@ interactions: \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedFqdn\": + \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n - \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection-2\",\r\n + \ \"priority\": 1000\r\n }\r\n ],\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"b1e28ac9-4165-4731-8c26-bc68de91f344\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"db21cd4f-0d20-494b-96f7-86a2ba58f832\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/ef11d38f-76ca-4f71-a131-165b459f2c05?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/6f97dd6f-172f-4592-8e95-dffb9ad2d280?api-version=2021-08-01 cache-control: - no-cache content-length: - - '5138' + - '5231' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:35 GMT + - Wed, 11 May 2022 19:57:37 GMT expires: - '-1' pragma: @@ -2628,7 +2668,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1196' status: code: 200 message: OK @@ -2647,9 +2687,9 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-addresses --destination-addresses --protocols --target-fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/ef11d38f-76ca-4f71-a131-165b459f2c05?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/6f97dd6f-172f-4592-8e95-dffb9ad2d280?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2661,7 +2701,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:46 GMT + - Wed, 11 May 2022 19:57:47 GMT expires: - '-1' pragma: @@ -2694,28 +2734,28 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-addresses --destination-addresses --protocols --target-fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -2726,20 +2766,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -2753,30 +2794,29 @@ interactions: \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedFqdn\": + \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n - \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection-2\",\r\n + \ \"priority\": 1000\r\n }\r\n ],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"b1e28ac9-4165-4731-8c26-bc68de91f344\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"db21cd4f-0d20-494b-96f7-86a2ba58f832\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '5139' + - '5232' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:46 GMT + - Wed, 11 May 2022 19:57:48 GMT etag: - - '"b1e28ac9-4165-4731-8c26-bc68de91f344"' + - '"db21cd4f-0d20-494b-96f7-86a2ba58f832"' expires: - '-1' pragma: @@ -2809,28 +2849,28 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-addresses --destination-addresses --target-urls User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -2841,20 +2881,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -2868,30 +2909,29 @@ interactions: \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedFqdn\": + \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n - \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection-2\",\r\n + \ \"priority\": 1000\r\n }\r\n ],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"b1e28ac9-4165-4731-8c26-bc68de91f344\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"db21cd4f-0d20-494b-96f7-86a2ba58f832\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '5139' + - '5232' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:49 GMT + - Wed, 11 May 2022 19:57:51 GMT etag: - - '"b1e28ac9-4165-4731-8c26-bc68de91f344"' + - '"db21cd4f-0d20-494b-96f7-86a2ba58f832"' expires: - '-1' pragma: @@ -2914,22 +2954,23 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 12000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234", "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, - "rules": [{"name": "network-rule", "ruleType": "NetworkRule", "ipProtocols": - ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - [], "destinationIpGroups": [], "destinationFqdns": []}]}, {"ruleCollectionType": - "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": - 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", "ruleType": - "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": [], "targetUrls": - ["www.google.com", "www.bing.com"], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": [], "terminateTLS": true, "webCategories": []}, {"name": "application-rule-2", + "rules": [{"name": "network-rule", "description": "test", "ruleType": "NetworkRule", + "ipProtocols": ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12003", "12004"], + "sourceIpGroups": [], "destinationIpGroups": [], "destinationFqdns": []}]}, + {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", + "priority": 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", + "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": ["www.google.com", "www.bing.com"], + "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": [], "terminateTLS": + true, "webCategories": []}, {"name": "application-rule-2", "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": @@ -2939,10 +2980,10 @@ interactions: "destinationAddresses": ["10.120.36.15", "10.120.36.16"], "protocols": [], "targetUrls": ["microsoft.com"], "terminateTLS": false}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection-2", "priority": 1000, "action": {"type": "Dnat"}, "rules": - [{"name": "network-rule", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], - "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12000", "12001"], "translatedPort": - "1234", "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' + [{"name": "network-rule", "description": "test", "ruleType": "NatRule", "ipProtocols": + ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedPort": "1234", + "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' headers: Accept: - application/json @@ -2953,35 +2994,35 @@ interactions: Connection: - keep-alive Content-Length: - - '2967' + - '3025' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-addresses --destination-addresses --target-urls User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -2992,20 +3033,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -3016,41 +3058,41 @@ interactions: [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n - \ \"protocols\": [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": - [],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n - \ \"microsoft.com\"\r\n ],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"10.120.36.15\",\r\n \"10.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n + \ \"10.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"369afab1-1dfd-4f28-9014-52e831411fff\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"940c9061-57b8-48f9-b090-52d7758e32fd\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/36758348-7a35-4aef-bd30-4057ef95a04f?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/93c99c28-4294-4637-8274-3a8ea281aa7f?api-version=2021-08-01 cache-control: - no-cache content-length: - - '5752' + - '5881' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:26:51 GMT + - Wed, 11 May 2022 19:57:54 GMT expires: - '-1' pragma: @@ -3066,7 +3108,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -3085,9 +3127,9 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-addresses --destination-addresses --target-urls User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/36758348-7a35-4aef-bd30-4057ef95a04f?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/93c99c28-4294-4637-8274-3a8ea281aa7f?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -3099,7 +3141,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:01 GMT + - Wed, 11 May 2022 19:58:04 GMT expires: - '-1' pragma: @@ -3132,28 +3174,28 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-addresses --destination-addresses --target-urls User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -3164,20 +3206,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -3188,41 +3231,41 @@ interactions: [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n - \ \"protocols\": [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": - [],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n - \ \"microsoft.com\"\r\n ],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"10.120.36.15\",\r\n \"10.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n + \ \"10.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"369afab1-1dfd-4f28-9014-52e831411fff\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"940c9061-57b8-48f9-b090-52d7758e32fd\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '5753' + - '5882' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:02 GMT + - Wed, 11 May 2022 19:58:05 GMT etag: - - '"369afab1-1dfd-4f28-9014-52e831411fff"' + - '"940c9061-57b8-48f9-b090-52d7758e32fd"' expires: - '-1' pragma: @@ -3256,28 +3299,28 @@ interactions: --description --destination-addresses --source-addresses --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -3288,20 +3331,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -3312,41 +3356,41 @@ interactions: [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n - \ \"protocols\": [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": - [],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n - \ \"microsoft.com\"\r\n ],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"10.120.36.15\",\r\n \"10.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n + \ \"10.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"369afab1-1dfd-4f28-9014-52e831411fff\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"940c9061-57b8-48f9-b090-52d7758e32fd\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '5753' + - '5882' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:04 GMT + - Wed, 11 May 2022 19:58:08 GMT etag: - - '"369afab1-1dfd-4f28-9014-52e831411fff"' + - '"940c9061-57b8-48f9-b090-52d7758e32fd"' expires: - '-1' pragma: @@ -3369,39 +3413,40 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 12000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234", "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, - "rules": [{"name": "network-rule", "ruleType": "NetworkRule", "ipProtocols": + "rules": [{"name": "network-rule", "description": "test", "ruleType": "NetworkRule", + "ipProtocols": ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12003", "12004"], + "sourceIpGroups": [], "destinationIpGroups": [], "destinationFqdns": []}, {"name": + "network-rule-2", "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - [], "destinationIpGroups": [], "destinationFqdns": []}, {"name": "network-rule-2", - "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], - "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12003", "12004"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": - 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", "ruleType": - "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": [], "targetUrls": - ["www.google.com", "www.bing.com"], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": [], "terminateTLS": true, "webCategories": []}, {"name": "application-rule-2", + 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", "description": + "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", + "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": ["www.google.com", "www.bing.com"], + "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": [], "terminateTLS": + true, "webCategories": []}, {"name": "application-rule-2", "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": ["www.bing.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": [], "terminateTLS": - false, "webCategories": []}, {"name": "application-rule-3", "ruleType": "ApplicationRule", - "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["10.120.36.15", "10.120.36.16"], "protocols": [], "targetFqdns": [], "targetUrls": - ["microsoft.com"], "fqdnTags": [], "sourceIpGroups": [], "terminateTLS": false, - "webCategories": []}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", + false, "webCategories": []}, {"name": "application-rule-3", "description": "test", + "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["10.120.36.15", "10.120.36.16"], "protocols": [], "targetFqdns": + [], "targetUrls": ["microsoft.com"], "fqdnTags": [], "sourceIpGroups": [], "terminateTLS": + false, "webCategories": []}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection-2", "priority": 1000, "action": {"type": "Dnat"}, "rules": - [{"name": "network-rule", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], - "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12000", "12001"], "translatedPort": - "1234", "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' + [{"name": "network-rule", "description": "test", "ruleType": "NatRule", "ipProtocols": + ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedPort": "1234", + "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' headers: Accept: - application/json @@ -3412,7 +3457,7 @@ interactions: Connection: - keep-alive Content-Length: - - '3270' + - '3351' Content-Type: - application/json ParameterSetName: @@ -3420,28 +3465,28 @@ interactions: --description --destination-addresses --source-addresses --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -3449,23 +3494,24 @@ interactions: [],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": - [],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n - \ \"12004\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"name\": \"network-rule-2\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationIpGroups\": + [],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": + [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n + \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n + \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": @@ -3473,20 +3519,21 @@ interactions: \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-2\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n + \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n + \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n + \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": - [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": - [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n - \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n - \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": - []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-3\",\r\n \"protocols\": - [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n - \ \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n @@ -3495,30 +3542,30 @@ interactions: \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"translatedFqdn\": - \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"fd0f04a3-f652-4c01-a20e-20ac953da612\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"ce127872-abec-4d34-8280-451dca216694\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/d4c83045-61d2-4e6e-bc97-e80a934c2ddb?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/1b96f558-78c3-44e2-95ed-5d410b58823c?api-version=2021-08-01 cache-control: - no-cache content-length: - - '6356' + - '6521' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:06 GMT + - Wed, 11 May 2022 19:58:10 GMT expires: - '-1' pragma: @@ -3534,7 +3581,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1194' + - '1196' status: code: 200 message: OK @@ -3554,9 +3601,9 @@ interactions: --description --destination-addresses --source-addresses --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/d4c83045-61d2-4e6e-bc97-e80a934c2ddb?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/1b96f558-78c3-44e2-95ed-5d410b58823c?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -3568,7 +3615,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:16 GMT + - Wed, 11 May 2022 19:58:22 GMT expires: - '-1' pragma: @@ -3602,28 +3649,28 @@ interactions: --description --destination-addresses --source-addresses --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -3631,23 +3678,24 @@ interactions: [],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": - [],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n - \ \"12004\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"name\": \"network-rule-2\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationIpGroups\": + [],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": + [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n + \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n + \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": @@ -3655,20 +3703,21 @@ interactions: \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-2\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n + \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n + \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n + \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": - [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": - [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n - \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n - \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": - []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-3\",\r\n \"protocols\": - [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n - \ \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n @@ -3677,30 +3726,30 @@ interactions: \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"translatedFqdn\": - \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"fd0f04a3-f652-4c01-a20e-20ac953da612\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"ce127872-abec-4d34-8280-451dca216694\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '6357' + - '6522' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:16 GMT + - Wed, 11 May 2022 19:58:23 GMT etag: - - '"fd0f04a3-f652-4c01-a20e-20ac953da612"' + - '"ce127872-abec-4d34-8280-451dca216694"' expires: - '-1' pragma: @@ -3732,28 +3781,28 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -3761,23 +3810,24 @@ interactions: [],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": - [],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n - \ \"12004\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"name\": \"network-rule-2\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationIpGroups\": + [],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": + [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n + \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n + \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": @@ -3785,20 +3835,21 @@ interactions: \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-2\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n + \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n + \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n + \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": - [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": - [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n - \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n - \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": - []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-3\",\r\n \"protocols\": - [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n - \ \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n @@ -3807,30 +3858,30 @@ interactions: \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"translatedFqdn\": - \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"fd0f04a3-f652-4c01-a20e-20ac953da612\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"ce127872-abec-4d34-8280-451dca216694\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '6357' + - '6522' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:19 GMT + - Wed, 11 May 2022 19:58:25 GMT etag: - - '"fd0f04a3-f652-4c01-a20e-20ac953da612"' + - '"ce127872-abec-4d34-8280-451dca216694"' expires: - '-1' pragma: @@ -3853,36 +3904,37 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 12000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234", "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, - "rules": [{"name": "network-rule", "ruleType": "NetworkRule", "ipProtocols": - ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - [], "destinationIpGroups": [], "destinationFqdns": []}]}, {"ruleCollectionType": - "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": - 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", "ruleType": - "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": [], "targetUrls": - ["www.google.com", "www.bing.com"], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": [], "terminateTLS": true, "webCategories": []}, {"name": "application-rule-2", + "rules": [{"name": "network-rule", "description": "test", "ruleType": "NetworkRule", + "ipProtocols": ["Any", "ICMP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12003", "12004"], + "sourceIpGroups": [], "destinationIpGroups": [], "destinationFqdns": []}]}, + {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", + "priority": 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", + "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": ["www.google.com", "www.bing.com"], + "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": [], "terminateTLS": + true, "webCategories": []}, {"name": "application-rule-2", "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": ["www.bing.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": [], "terminateTLS": - false, "webCategories": []}, {"name": "application-rule-3", "ruleType": "ApplicationRule", - "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["10.120.36.15", "10.120.36.16"], "protocols": [], "targetFqdns": [], "targetUrls": - ["microsoft.com"], "fqdnTags": [], "sourceIpGroups": [], "terminateTLS": false, - "webCategories": []}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", + false, "webCategories": []}, {"name": "application-rule-3", "description": "test", + "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], + "destinationAddresses": ["10.120.36.15", "10.120.36.16"], "protocols": [], "targetFqdns": + [], "targetUrls": ["microsoft.com"], "fqdnTags": [], "sourceIpGroups": [], "terminateTLS": + false, "webCategories": []}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection-2", "priority": 1000, "action": {"type": "Dnat"}, "rules": - [{"name": "network-rule", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], - "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12000", "12001"], "translatedPort": - "1234", "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' + [{"name": "network-rule", "description": "test", "ruleType": "NatRule", "ipProtocols": + ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedPort": "1234", + "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' headers: Accept: - application/json @@ -3893,34 +3945,34 @@ interactions: Connection: - keep-alive Content-Length: - - '3022' + - '3103' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -3931,20 +3983,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -3955,41 +4008,41 @@ interactions: [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n - \ \"protocols\": [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": - [],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n - \ \"microsoft.com\"\r\n ],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"10.120.36.15\",\r\n \"10.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n + \ \"10.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"a270b7d9-bad7-4971-a193-a0e8014f2453\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"d6d40164-b719-4a4a-98d8-8a4f92ac4f38\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/37d711c1-df65-408f-9bec-b02dbaf0ae52?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/1ba18d7f-940d-4204-b5a5-3deb8cd97a93?api-version=2021-08-01 cache-control: - no-cache content-length: - - '5752' + - '5881' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:21 GMT + - Wed, 11 May 2022 19:58:28 GMT expires: - '-1' pragma: @@ -4023,9 +4076,9 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/37d711c1-df65-408f-9bec-b02dbaf0ae52?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/1ba18d7f-940d-4204-b5a5-3deb8cd97a93?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -4037,7 +4090,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:32 GMT + - Wed, 11 May 2022 19:58:38 GMT expires: - '-1' pragma: @@ -4069,28 +4122,28 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -4101,20 +4154,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -4125,41 +4179,41 @@ interactions: [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n - \ \"protocols\": [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": - [],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n - \ \"microsoft.com\"\r\n ],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"10.120.36.15\",\r\n \"10.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n + \ \"10.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"a270b7d9-bad7-4971-a193-a0e8014f2453\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"d6d40164-b719-4a4a-98d8-8a4f92ac4f38\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '5753' + - '5882' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:32 GMT + - Wed, 11 May 2022 19:58:39 GMT etag: - - '"a270b7d9-bad7-4971-a193-a0e8014f2453"' + - '"d6d40164-b719-4a4a-98d8-8a4f92ac4f38"' expires: - '-1' pragma: @@ -4191,28 +4245,28 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": @@ -4223,20 +4277,21 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [],\r\n \"targetUrls\": [\r\n \"www.google.com\",\r\n - \ \"www.bing.com\"\r\n ],\r\n \"terminateTLS\": - true,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n - \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n + \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n + \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n @@ -4247,41 +4302,41 @@ interactions: [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n - \ \"protocols\": [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": - [],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n - \ \"microsoft.com\"\r\n ],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": - [\r\n \"10.120.36.15\",\r\n \"10.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": []\r\n }\r\n ],\r\n - \ \"name\": \"filter-collection-2\",\r\n \"priority\": 14000\r\n - \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n + \ \"10.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + []\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n + \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"a270b7d9-bad7-4971-a193-a0e8014f2453\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"d6d40164-b719-4a4a-98d8-8a4f92ac4f38\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '5753' + - '5882' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:35 GMT + - Wed, 11 May 2022 19:58:41 GMT etag: - - '"a270b7d9-bad7-4971-a193-a0e8014f2453"' + - '"d6d40164-b719-4a4a-98d8-8a4f92ac4f38"' expires: - '-1' pragma: @@ -4304,31 +4359,32 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 12000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "network-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", - "202.120.36.14"], "destinationAddresses": ["202.120.36.15"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", + "translatedPort": "1234", "sourceIpGroups": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, - "rules": [{"name": "application-rule", "ruleType": "ApplicationRule", "sourceAddresses": - ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["202.120.36.15", - "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": - "Https", "port": 12801}], "targetFqdns": [], "targetUrls": ["www.google.com", - "www.bing.com"], "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": - [], "terminateTLS": true, "webCategories": []}, {"name": "application-rule-2", - "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], - "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": - "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": - ["www.bing.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": [], "terminateTLS": - false, "webCategories": []}, {"name": "application-rule-3", "ruleType": "ApplicationRule", + "rules": [{"name": "application-rule", "description": "test", "ruleType": "ApplicationRule", + "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": + 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": [], "targetUrls": + ["www.google.com", "www.bing.com"], "fqdnTags": ["AzureBackup", "HDInsight"], + "sourceIpGroups": [], "terminateTLS": true, "webCategories": []}, {"name": "application-rule-2", + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", + "202.120.36.14"], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": ["www.bing.com"], "targetUrls": [], "fqdnTags": + [], "sourceIpGroups": [], "terminateTLS": false, "webCategories": []}, {"name": + "application-rule-3", "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": ["10.120.36.15", "10.120.36.16"], "protocols": [], "targetFqdns": [], "targetUrls": ["microsoft.com"], "fqdnTags": [], "sourceIpGroups": [], "terminateTLS": false, "webCategories": []}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection-2", "priority": 1000, "action": {"type": "Dnat"}, "rules": - [{"name": "network-rule", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], - "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12000", "12001"], "translatedPort": - "1234", "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' + [{"name": "network-rule", "description": "test", "ruleType": "NatRule", "ipProtocols": + ["TCP", "UDP"], "sourceAddresses": ["202.120.36.13", "202.120.36.14"], "destinationAddresses": + ["202.120.36.15"], "destinationPorts": ["12000"], "translatedPort": "1234", + "sourceIpGroups": [], "translatedFqdn": "www.google.com"}]}]}}' headers: Accept: - application/json @@ -4339,38 +4395,38 @@ interactions: Connection: - keep-alive Content-Length: - - '2574' + - '2632' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": @@ -4378,20 +4434,21 @@ interactions: \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-2\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n + \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n + \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n + \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": - [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": - [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n - \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n - \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": - []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-3\",\r\n \"protocols\": - [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n - \ \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n @@ -4400,30 +4457,30 @@ interactions: \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"translatedFqdn\": - \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"c0d45d41-e3f0-4e6c-a421-7ea7c82f44a7\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"8fc6640e-f38d-4e86-80a7-58fc58cc2c4a\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/da982baf-b8d9-4ae8-82fe-1c5417298584?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/0f3602fe-be4c-4f15-8c5e-63099e87af61?api-version=2021-08-01 cache-control: - no-cache content-length: - - '4904' + - '4997' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:37 GMT + - Wed, 11 May 2022 19:58:44 GMT expires: - '-1' pragma: @@ -4457,9 +4514,9 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/da982baf-b8d9-4ae8-82fe-1c5417298584?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/0f3602fe-be4c-4f15-8c5e-63099e87af61?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -4471,7 +4528,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:47 GMT + - Wed, 11 May 2022 19:58:54 GMT expires: - '-1' pragma: @@ -4503,32 +4560,32 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": @@ -4536,20 +4593,21 @@ interactions: \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-2\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n + \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n + \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n + \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": - [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": - [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n - \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n - \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": - []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-3\",\r\n \"protocols\": - [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n - \ \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n @@ -4558,30 +4616,30 @@ interactions: \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"translatedFqdn\": - \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"c0d45d41-e3f0-4e6c-a421-7ea7c82f44a7\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"8fc6640e-f38d-4e86-80a7-58fc58cc2c4a\",\r\n \"location\": \"centralus\"\r\n}" headers: cache-control: - no-cache content-length: - - '4905' + - '4998' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:47 GMT + - Wed, 11 May 2022 19:58:55 GMT etag: - - '"c0d45d41-e3f0-4e6c-a421-7ea7c82f44a7"' + - '"8fc6640e-f38d-4e86-80a7-58fc58cc2c4a"' expires: - '-1' pragma: @@ -4615,32 +4673,32 @@ interactions: ParameterSetName: - -g --policy-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 12000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"network-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n - \ \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"network-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [],\r\n \"targetFqdns\": [],\r\n \ \"targetUrls\": [\r\n \"www.google.com\",\r\n \"www.bing.com\"\r\n \ ],\r\n \"terminateTLS\": true,\r\n \"sourceAddresses\": @@ -4648,20 +4706,21 @@ interactions: \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-2\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"name\": \"application-rule-2\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n + \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n + \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n + \ \"202.120.36.14\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": []\r\n },\r\n {\r\n + \ \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-3\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [],\r\n \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": - [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": - [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": - [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n - \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n - \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": - []\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n - \ \"name\": \"application-rule-3\",\r\n \"protocols\": - [],\r\n \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n - \ \"targetFqdns\": [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n + [],\r\n \"targetUrls\": [\r\n \"microsoft.com\"\r\n \ ],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"10.120.36.15\",\r\n @@ -4670,34 +4729,34 @@ interactions: \ \"priority\": 14000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"translatedFqdn\": - \"www.google.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": - [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n - \ \"sourceAddresses\": [\r\n \"202.120.36.13\",\r\n - \ \"202.120.36.14\"\r\n ],\r\n \"sourceIpGroups\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n + \"NatRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.google.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"202.120.36.13\",\r\n \"202.120.36.14\"\r\n + \ ],\r\n \"sourceIpGroups\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"12000\"\r\n ]\r\n }\r\n ],\r\n \ \"name\": \"nat-collection-2\",\r\n \"priority\": 1000\r\n \ }\r\n ],\r\n \"provisioningState\": \"Deleting\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"c14a14f3-1d87-4409-8467-e1ba0187f637\",\r\n \"location\": \"centralus\"\r\n}" + \ \"etag\": \"75960c12-bcf6-4f7b-80fe-ad684d5fbf21\",\r\n \"location\": \"centralus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/47cc6740-e0c5-4539-812c-1dfb38f435e6?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/a29f22bb-f4da-416d-8ba3-e7d9d1b64f19?api-version=2021-08-01 cache-control: - no-cache content-length: - - '4904' + - '4997' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:27:50 GMT + - Wed, 11 May 2022 19:59:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperationResults/47cc6740-e0c5-4539-812c-1dfb38f435e6?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperationResults/a29f22bb-f4da-416d-8ba3-e7d9d1b64f19?api-version=2021-08-01 pragma: - no-cache server: @@ -4725,9 +4784,9 @@ interactions: ParameterSetName: - -g --policy-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/47cc6740-e0c5-4539-812c-1dfb38f435e6?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centralus/nfvOperations/a29f22bb-f4da-416d-8ba3-e7d9d1b64f19?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -4739,7 +4798,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:28:01 GMT + - Wed, 11 May 2022 19:59:10 GMT expires: - '-1' pragma: @@ -4771,9 +4830,9 @@ interactions: ParameterSetName: - -g --policy-name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups?api-version=2021-08-01 response: body: string: "{\r\n \"value\": []\r\n}" @@ -4785,7 +4844,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 04:28:03 GMT + - Wed, 11 May 2022 19:59:14 GMT expires: - '-1' pragma: @@ -4819,9 +4878,9 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: '' @@ -4831,7 +4890,7 @@ interactions: content-length: - '0' date: - - Wed, 21 Apr 2021 04:28:12 GMT + - Wed, 11 May 2022 19:59:22 GMT expires: - '-1' pragma: @@ -4843,7 +4902,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_intrusion_detection.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_intrusion_detection.yaml index eea968834fc..3d8ed088b1b 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_intrusion_detection.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_intrusion_detection.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n --sku --idps-mode User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_policy_intrusion_detection000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001","name":"test_azure_firewall_policy_intrusion_detection000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:38:34Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001","name":"test_azure_firewall_policy_intrusion_detection000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:27.8869008Z","CreationDate":"2022-05-11T19:54:27.8868316Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '564' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:38:41 GMT + - Wed, 11 May 2022 19:54:29 GMT expires: - '-1' pragma: @@ -60,9 +60,9 @@ interactions: ParameterSetName: - -g -n --sku --idps-mode User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -72,18 +72,18 @@ interactions: [],\r\n \"bypassTrafficSettings\": []\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"66675ff5-e136-4617-864d-94c9a6c6d2f7\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"58511935-8e33-4af5-bdbc-7bedbd39a1f5\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/f59a4285-7016-4723-ad05-d107cfb8b068?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/1072817f-56da-4e3c-ab11-c41db2f57149?api-version=2021-08-01 cache-control: - no-cache content-length: - - '765' + - '742' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:38:49 GMT + - Wed, 11 May 2022 19:54:42 GMT expires: - '-1' pragma: @@ -113,9 +113,9 @@ interactions: ParameterSetName: - -g -n --sku --idps-mode User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/f59a4285-7016-4723-ad05-d107cfb8b068?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/1072817f-56da-4e3c-ab11-c41db2f57149?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -127,7 +127,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:00 GMT + - Wed, 11 May 2022 19:54:52 GMT expires: - '-1' pragma: @@ -159,9 +159,9 @@ interactions: ParameterSetName: - -g -n --sku --idps-mode User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -171,18 +171,18 @@ interactions: [],\r\n \"bypassTrafficSettings\": []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"66675ff5-e136-4617-864d-94c9a6c6d2f7\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"58511935-8e33-4af5-bdbc-7bedbd39a1f5\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '766' + - '743' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:00 GMT + - Wed, 11 May 2022 19:54:53 GMT etag: - - '"66675ff5-e136-4617-864d-94c9a6c6d2f7"' + - '"58511935-8e33-4af5-bdbc-7bedbd39a1f5"' expires: - '-1' pragma: @@ -214,9 +214,9 @@ interactions: ParameterSetName: - -g -n --idps-mode User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -226,18 +226,18 @@ interactions: [],\r\n \"bypassTrafficSettings\": []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"66675ff5-e136-4617-864d-94c9a6c6d2f7\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"58511935-8e33-4af5-bdbc-7bedbd39a1f5\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '766' + - '743' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:03 GMT + - Wed, 11 May 2022 19:54:56 GMT etag: - - '"66675ff5-e136-4617-864d-94c9a6c6d2f7"' + - '"58511935-8e33-4af5-bdbc-7bedbd39a1f5"' expires: - '-1' pragma: @@ -270,15 +270,15 @@ interactions: Connection: - keep-alive Content-Length: - - '453' + - '430' Content-Type: - application/json ParameterSetName: - -g -n --idps-mode User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -288,19 +288,19 @@ interactions: [],\r\n \"bypassTrafficSettings\": []\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"e917a502-fe89-4675-80a7-4db381644466\",\r\n \"location\": \"westus\",\r\n + \ \"etag\": \"1c9a9e3e-3724-4511-9732-f9f0311c11f1\",\r\n \"location\": \"westus\",\r\n \ \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/9bcfad81-0c3f-4e24-94b4-f95d420f69a8?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/e2d4dbea-b76c-4478-9fa0-81b209089ee9?api-version=2021-08-01 cache-control: - no-cache content-length: - - '810' + - '787' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:07 GMT + - Wed, 11 May 2022 19:55:05 GMT expires: - '-1' pragma: @@ -316,7 +316,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -334,9 +334,9 @@ interactions: ParameterSetName: - -g -n --idps-mode User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/9bcfad81-0c3f-4e24-94b4-f95d420f69a8?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/e2d4dbea-b76c-4478-9fa0-81b209089ee9?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -348,7 +348,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:18 GMT + - Wed, 11 May 2022 19:55:16 GMT expires: - '-1' pragma: @@ -380,9 +380,9 @@ interactions: ParameterSetName: - -g -n --idps-mode User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -392,18 +392,18 @@ interactions: [],\r\n \"bypassTrafficSettings\": []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"e917a502-fe89-4675-80a7-4db381644466\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"1c9a9e3e-3724-4511-9732-f9f0311c11f1\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '768' + - '745' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:18 GMT + - Wed, 11 May 2022 19:55:16 GMT etag: - - '"e917a502-fe89-4675-80a7-4db381644466"' + - '"1c9a9e3e-3724-4511-9732-f9f0311c11f1"' expires: - '-1' pragma: @@ -433,11 +433,11 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --policy-name --mode --signature-id + - -g --policy-name --mode --signature-id --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -447,18 +447,18 @@ interactions: [],\r\n \"bypassTrafficSettings\": []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"e917a502-fe89-4675-80a7-4db381644466\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"1c9a9e3e-3724-4511-9732-f9f0311c11f1\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '768' + - '745' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:20 GMT + - Wed, 11 May 2022 19:55:19 GMT etag: - - '"e917a502-fe89-4675-80a7-4db381644466"' + - '"1c9a9e3e-3724-4511-9732-f9f0311c11f1"' expires: - '-1' pragma: @@ -480,7 +480,8 @@ interactions: body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy", "location": "westus", "properties": {"threatIntelMode": "Alert", "intrusionDetection": {"mode": "Alert", "configuration": {"signatureOverrides": [{"id": "10001", "mode": - "Deny"}], "bypassTrafficSettings": []}}, "sku": {"tier": "Premium"}}}' + "Deny"}], "bypassTrafficSettings": [], "privateRanges": ["167.220.204.0/24", + "167.221.205.101/32"]}}, "sku": {"tier": "Premium"}}}' headers: Accept: - application/json @@ -491,15 +492,15 @@ interactions: Connection: - keep-alive Content-Length: - - '454' + - '492' Content-Type: - application/json ParameterSetName: - - -g --policy-name --mode --signature-id + - -g --policy-name --mode --signature-id --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -508,21 +509,22 @@ interactions: {\r\n \"mode\": \"Alert\",\r\n \"configuration\": {\r\n \"signatureOverrides\": [\r\n {\r\n \"id\": \"10001\",\r\n \"mode\": \"Deny\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.204.0/24\",\r\n + \ \"167.221.205.101/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"662ea361-f458-4977-89db-c120ccd016a0\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"6fb3a3cf-63ad-4c02-9b74-da574a81985e\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/8aa848f6-dec4-4544-8b00-ce720a540373?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/f2be3e84-533d-4a73-9c98-3333b9ed7546?api-version=2021-08-01 cache-control: - no-cache content-length: - - '859' + - '939' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:21 GMT + - Wed, 11 May 2022 19:55:21 GMT expires: - '-1' pragma: @@ -554,11 +556,11 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --policy-name --mode --signature-id + - -g --policy-name --mode --signature-id --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/8aa848f6-dec4-4544-8b00-ce720a540373?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/f2be3e84-533d-4a73-9c98-3333b9ed7546?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -570,7 +572,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:31 GMT + - Wed, 11 May 2022 19:55:31 GMT expires: - '-1' pragma: @@ -600,11 +602,11 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --policy-name --mode --signature-id + - -g --policy-name --mode --signature-id --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -613,21 +615,22 @@ interactions: {\r\n \"mode\": \"Alert\",\r\n \"configuration\": {\r\n \"signatureOverrides\": [\r\n {\r\n \"id\": \"10001\",\r\n \"mode\": \"Deny\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.204.0/24\",\r\n + \ \"167.221.205.101/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"662ea361-f458-4977-89db-c120ccd016a0\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"6fb3a3cf-63ad-4c02-9b74-da574a81985e\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '860' + - '940' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:32 GMT + - Wed, 11 May 2022 19:55:32 GMT etag: - - '"662ea361-f458-4977-89db-c120ccd016a0"' + - '"6fb3a3cf-63ad-4c02-9b74-da574a81985e"' expires: - '-1' pragma: @@ -657,11 +660,11 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --policy-name --mode --signature-id + - -g --policy-name --mode --signature-id --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -670,21 +673,22 @@ interactions: {\r\n \"mode\": \"Alert\",\r\n \"configuration\": {\r\n \"signatureOverrides\": [\r\n {\r\n \"id\": \"10001\",\r\n \"mode\": \"Deny\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.204.0/24\",\r\n + \ \"167.221.205.101/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"662ea361-f458-4977-89db-c120ccd016a0\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"6fb3a3cf-63ad-4c02-9b74-da574a81985e\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '860' + - '940' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:34 GMT + - Wed, 11 May 2022 19:55:36 GMT etag: - - '"662ea361-f458-4977-89db-c120ccd016a0"' + - '"6fb3a3cf-63ad-4c02-9b74-da574a81985e"' expires: - '-1' pragma: @@ -706,8 +710,8 @@ interactions: body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy", "location": "westus", "properties": {"threatIntelMode": "Alert", "intrusionDetection": {"mode": "Alert", "configuration": {"signatureOverrides": [{"id": "10001", "mode": - "Deny"}, {"id": "20001", "mode": "Alert"}], "bypassTrafficSettings": []}}, "sku": - {"tier": "Premium"}}}' + "Deny"}, {"id": "20001", "mode": "Alert"}], "bypassTrafficSettings": [], "privateRanges": + ["167.220.208.0/24", "167.221.205.102/32"]}}, "sku": {"tier": "Premium"}}}' headers: Accept: - application/json @@ -718,15 +722,15 @@ interactions: Connection: - keep-alive Content-Length: - - '488' + - '526' Content-Type: - application/json ParameterSetName: - - -g --policy-name --mode --signature-id + - -g --policy-name --mode --signature-id --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -736,21 +740,22 @@ interactions: [\r\n {\r\n \"id\": \"10001\",\r\n \"mode\": \"Deny\"\r\n },\r\n {\r\n \"id\": \"20001\",\r\n \ \"mode\": \"Alert\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"ee9c24d5-b404-4cd2-875e-922db3f08a64\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"fc1ebcb5-2a18-4fd3-b86c-af61f1ded8d6\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/34d4c331-1cc7-4aa4-bbe2-138736eb2b76?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/b63447bc-6aa2-4873-b391-0fa61950d7ee?api-version=2021-08-01 cache-control: - no-cache content-length: - - '943' + - '1023' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:35 GMT + - Wed, 11 May 2022 19:55:38 GMT expires: - '-1' pragma: @@ -766,7 +771,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -782,11 +787,11 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --policy-name --mode --signature-id + - -g --policy-name --mode --signature-id --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/34d4c331-1cc7-4aa4-bbe2-138736eb2b76?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/b63447bc-6aa2-4873-b391-0fa61950d7ee?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -798,7 +803,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:45 GMT + - Wed, 11 May 2022 19:55:47 GMT expires: - '-1' pragma: @@ -828,11 +833,11 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g --policy-name --mode --signature-id + - -g --policy-name --mode --signature-id --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -842,21 +847,22 @@ interactions: [\r\n {\r\n \"id\": \"10001\",\r\n \"mode\": \"Deny\"\r\n },\r\n {\r\n \"id\": \"20001\",\r\n \ \"mode\": \"Alert\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"ee9c24d5-b404-4cd2-875e-922db3f08a64\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"fc1ebcb5-2a18-4fd3-b86c-af61f1ded8d6\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '944' + - '1024' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:45 GMT + - Wed, 11 May 2022 19:55:48 GMT etag: - - '"ee9c24d5-b404-4cd2-875e-922db3f08a64"' + - '"fc1ebcb5-2a18-4fd3-b86c-af61f1ded8d6"' expires: - '-1' pragma: @@ -889,9 +895,9 @@ interactions: - -g --policy-name --rule-name --rule-protocol --rule-src-addresses --rule-dest-addresses --rule-dest-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -901,21 +907,22 @@ interactions: [\r\n {\r\n \"id\": \"10001\",\r\n \"mode\": \"Deny\"\r\n },\r\n {\r\n \"id\": \"20001\",\r\n \ \"mode\": \"Alert\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"ee9c24d5-b404-4cd2-875e-922db3f08a64\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"fc1ebcb5-2a18-4fd3-b86c-af61f1ded8d6\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '944' + - '1024' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:48 GMT + - Wed, 11 May 2022 19:55:52 GMT etag: - - '"ee9c24d5-b404-4cd2-875e-922db3f08a64"' + - '"fc1ebcb5-2a18-4fd3-b86c-af61f1ded8d6"' expires: - '-1' pragma: @@ -940,7 +947,8 @@ interactions: "Deny"}, {"id": "20001", "mode": "Alert"}], "bypassTrafficSettings": [{"name": "bypass-rule-1", "protocol": "TCP", "sourceAddresses": ["10.0.0.12", "10.0.0.15"], "destinationAddresses": ["192.168.0.103", "192.168.0.104"], "destinationPorts": - ["8080", "9090", "5432"]}]}}, "sku": {"tier": "Premium"}}}' + ["8080", "9090", "5432"]}], "privateRanges": ["167.220.208.0/24", "167.221.205.102/32"]}}, + "sku": {"tier": "Premium"}}}' headers: Accept: - application/json @@ -951,16 +959,16 @@ interactions: Connection: - keep-alive Content-Length: - - '685' + - '723' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-name --rule-protocol --rule-src-addresses --rule-dest-addresses --rule-dest-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -976,21 +984,22 @@ interactions: [\r\n \"192.168.0.103\",\r\n \"192.168.0.104\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"8080\",\r\n \ \"9090\",\r\n \"5432\"\r\n ]\r\n }\r\n - \ ]\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + \ ],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"661f9f90-bd9d-4526-8d37-81085ad30b99\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"a8bde084-a000-4dcd-81a9-7224f6c2c8b4\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/9c790310-8e37-4da1-a909-f1fec0d1a863?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/4e29a83e-677c-4dad-ac0c-764bcd5dae15?api-version=2021-08-01 cache-control: - no-cache content-length: - - '1390' + - '1470' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:49 GMT + - Wed, 11 May 2022 19:55:53 GMT expires: - '-1' pragma: @@ -1006,7 +1015,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 200 message: OK @@ -1025,9 +1034,9 @@ interactions: - -g --policy-name --rule-name --rule-protocol --rule-src-addresses --rule-dest-addresses --rule-dest-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/9c790310-8e37-4da1-a909-f1fec0d1a863?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/4e29a83e-677c-4dad-ac0c-764bcd5dae15?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1039,7 +1048,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:59 GMT + - Wed, 11 May 2022 19:56:03 GMT expires: - '-1' pragma: @@ -1072,9 +1081,9 @@ interactions: - -g --policy-name --rule-name --rule-protocol --rule-src-addresses --rule-dest-addresses --rule-dest-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -1090,21 +1099,22 @@ interactions: [\r\n \"192.168.0.103\",\r\n \"192.168.0.104\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"8080\",\r\n \ \"9090\",\r\n \"5432\"\r\n ]\r\n }\r\n - \ ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + \ ],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"661f9f90-bd9d-4526-8d37-81085ad30b99\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"a8bde084-a000-4dcd-81a9-7224f6c2c8b4\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1391' + - '1471' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:59 GMT + - Wed, 11 May 2022 19:56:03 GMT etag: - - '"661f9f90-bd9d-4526-8d37-81085ad30b99"' + - '"a8bde084-a000-4dcd-81a9-7224f6c2c8b4"' expires: - '-1' pragma: @@ -1136,9 +1146,9 @@ interactions: ParameterSetName: - -g --policy-name User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -1154,21 +1164,22 @@ interactions: [\r\n \"192.168.0.103\",\r\n \"192.168.0.104\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"8080\",\r\n \ \"9090\",\r\n \"5432\"\r\n ]\r\n }\r\n - \ ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + \ ],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"661f9f90-bd9d-4526-8d37-81085ad30b99\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"a8bde084-a000-4dcd-81a9-7224f6c2c8b4\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1391' + - '1471' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:00 GMT + - Wed, 11 May 2022 19:56:05 GMT etag: - - '"661f9f90-bd9d-4526-8d37-81085ad30b99"' + - '"a8bde084-a000-4dcd-81a9-7224f6c2c8b4"' expires: - '-1' pragma: @@ -1200,9 +1211,9 @@ interactions: ParameterSetName: - -g --policy-name --rule-name --signature-id User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -1218,21 +1229,22 @@ interactions: [\r\n \"192.168.0.103\",\r\n \"192.168.0.104\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"8080\",\r\n \ \"9090\",\r\n \"5432\"\r\n ]\r\n }\r\n - \ ]\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + \ ],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"661f9f90-bd9d-4526-8d37-81085ad30b99\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"a8bde084-a000-4dcd-81a9-7224f6c2c8b4\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '1391' + - '1471' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:03 GMT + - Wed, 11 May 2022 19:56:07 GMT etag: - - '"661f9f90-bd9d-4526-8d37-81085ad30b99"' + - '"a8bde084-a000-4dcd-81a9-7224f6c2c8b4"' expires: - '-1' pragma: @@ -1254,7 +1266,8 @@ interactions: body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy", "location": "westus", "properties": {"threatIntelMode": "Alert", "intrusionDetection": {"mode": "Alert", "configuration": {"signatureOverrides": [{"id": "20001", "mode": - "Alert"}], "bypassTrafficSettings": []}}, "sku": {"tier": "Premium"}}}' + "Alert"}], "bypassTrafficSettings": [], "privateRanges": ["167.220.208.0/24", + "167.221.205.102/32"]}}, "sku": {"tier": "Premium"}}}' headers: Accept: - application/json @@ -1265,15 +1278,15 @@ interactions: Connection: - keep-alive Content-Length: - - '455' + - '493' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-name --signature-id User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -1282,21 +1295,22 @@ interactions: {\r\n \"mode\": \"Alert\",\r\n \"configuration\": {\r\n \"signatureOverrides\": [\r\n {\r\n \"id\": \"20001\",\r\n \"mode\": \"Alert\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Updating\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"71a01c9e-0ec7-4150-b292-cfb46952ac27\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"3eb25e6e-2985-4682-b5e2-22f653dda179\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/c9c91cc8-2bba-4ddc-b027-a5ec4d841cfe?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/feff5b02-88b7-4caf-9deb-c8380b15fb6a?api-version=2021-08-01 cache-control: - no-cache content-length: - - '860' + - '940' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:04 GMT + - Wed, 11 May 2022 19:56:09 GMT expires: - '-1' pragma: @@ -1330,9 +1344,9 @@ interactions: ParameterSetName: - -g --policy-name --rule-name --signature-id User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/c9c91cc8-2bba-4ddc-b027-a5ec4d841cfe?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/feff5b02-88b7-4caf-9deb-c8380b15fb6a?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1344,7 +1358,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:14 GMT + - Wed, 11 May 2022 19:56:20 GMT expires: - '-1' pragma: @@ -1376,9 +1390,9 @@ interactions: ParameterSetName: - -g --policy-name --rule-name --signature-id User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -1387,21 +1401,22 @@ interactions: {\r\n \"mode\": \"Alert\",\r\n \"configuration\": {\r\n \"signatureOverrides\": [\r\n {\r\n \"id\": \"20001\",\r\n \"mode\": \"Alert\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"71a01c9e-0ec7-4150-b292-cfb46952ac27\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"3eb25e6e-2985-4682-b5e2-22f653dda179\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '861' + - '941' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:14 GMT + - Wed, 11 May 2022 19:56:21 GMT etag: - - '"71a01c9e-0ec7-4150-b292-cfb46952ac27"' + - '"3eb25e6e-2985-4682-b5e2-22f653dda179"' expires: - '-1' pragma: @@ -1433,9 +1448,9 @@ interactions: ParameterSetName: - -g --policy-name User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -1444,21 +1459,22 @@ interactions: {\r\n \"mode\": \"Alert\",\r\n \"configuration\": {\r\n \"signatureOverrides\": [\r\n {\r\n \"id\": \"20001\",\r\n \"mode\": \"Alert\"\r\n }\r\n ],\r\n \"bypassTrafficSettings\": - []\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + [],\r\n \"privateRanges\": [\r\n \"167.220.208.0/24\",\r\n + \ \"167.221.205.102/32\"\r\n ]\r\n }\r\n },\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_intrusion_detection000001/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"71a01c9e-0ec7-4150-b292-cfb46952ac27\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"3eb25e6e-2985-4682-b5e2-22f653dda179\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '861' + - '941' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:17 GMT + - Wed, 11 May 2022 19:56:24 GMT etag: - - '"71a01c9e-0ec7-4150-b292-cfb46952ac27"' + - '"3eb25e6e-2985-4682-b5e2-22f653dda179"' expires: - '-1' pragma: diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_rules_with_fqdns.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_rules_with_fqdns.yaml index 54e7de590fa..a00a78e1366 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_rules_with_fqdns.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_rules_with_fqdns.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_policy000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001","name":"cli_test_azure_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:39:37Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001","name":"cli_test_azure_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:54:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:54:29.0648143Z","CreationDate":"2022-05-11T19:54:29.0646350Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '472' + - '533' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:40 GMT + - Wed, 11 May 2022 19:54:32 GMT expires: - '-1' pragma: @@ -42,7 +42,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus2", "properties": {"ipAddresses": ["10.0.0.0", "10.0.0.1"]}}' + body: '{"location": "westus2", "properties": {"ipAddresses": ["10.0.0.0", "10.0.0.1"]}}' headers: Accept: - application/json @@ -59,8 +59,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 accept-language: - en-US method: PUT @@ -71,18 +71,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.0\",\r\n \"10.0.0.1\"\r\n \ ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\",\r\n \ \"name\": \"sourceipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"903f13b5-6529-4b7d-9a29-70d8e468a36f\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"5388f321-c57e-479a-80f7-1ca9b39f81e9\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/297c43cf-996e-45a4-9dbb-88a825f1819b?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/8a5793a6-d914-4658-b60c-639467546570?api-version=2019-09-01 cache-control: - no-cache content-length: - - '535' + - '496' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:39:53 GMT + - Wed, 11 May 2022 19:54:41 GMT expires: - '-1' pragma: @@ -94,7 +94,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 201 message: Created @@ -112,10 +112,10 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/297c43cf-996e-45a4-9dbb-88a825f1819b?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/8a5793a6-d914-4658-b60c-639467546570?api-version=2019-09-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -127,7 +127,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:05 GMT + - Wed, 11 May 2022 19:54:52 GMT expires: - '-1' pragma: @@ -159,8 +159,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup?api-version=2019-09-01 response: @@ -169,18 +169,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.0\",\r\n \"10.0.0.1\"\r\n \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\",\r\n \ \"name\": \"sourceipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"903f13b5-6529-4b7d-9a29-70d8e468a36f\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"5388f321-c57e-479a-80f7-1ca9b39f81e9\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '536' + - '497' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:06 GMT + - Wed, 11 May 2022 19:54:53 GMT etag: - - '"903f13b5-6529-4b7d-9a29-70d8e468a36f"' + - '"5388f321-c57e-479a-80f7-1ca9b39f81e9"' expires: - '-1' pragma: @@ -199,7 +199,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus2", "properties": {"dnsSettings": {"servers": ["10.0.0.2", + body: '{"location": "westus2", "properties": {"dnsSettings": {"servers": ["10.0.0.2", "10.0.0.3"], "enableProxy": true}}}' headers: Accept: @@ -217,9 +217,9 @@ interactions: ParameterSetName: - --resource-group --location --name --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -229,18 +229,18 @@ interactions: [],\r\n \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"833b8f91-9338-4d43-a7ce-76b87a0ca139\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"bd873d9f-79b4-403d-8ce4-c2858ba6cd4c\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/5e8d8f46-3df3-4b32-8bbc-d6f9da5fd817?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/2f32e821-6de4-4822-8025-17869f05383c?api-version=2021-08-01 cache-control: - no-cache content-length: - - '719' + - '680' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:17 GMT + - Wed, 11 May 2022 19:55:02 GMT expires: - '-1' pragma: @@ -270,9 +270,9 @@ interactions: ParameterSetName: - --resource-group --location --name --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/5e8d8f46-3df3-4b32-8bbc-d6f9da5fd817?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/2f32e821-6de4-4822-8025-17869f05383c?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -284,7 +284,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:27 GMT + - Wed, 11 May 2022 19:55:12 GMT expires: - '-1' pragma: @@ -316,9 +316,9 @@ interactions: ParameterSetName: - --resource-group --location --name --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -328,18 +328,18 @@ interactions: [],\r\n \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"833b8f91-9338-4d43-a7ce-76b87a0ca139\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"bd873d9f-79b4-403d-8ce4-c2858ba6cd4c\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '720' + - '681' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:28 GMT + - Wed, 11 May 2022 19:55:12 GMT etag: - - '"833b8f91-9338-4d43-a7ce-76b87a0ca139"' + - '"bd873d9f-79b4-403d-8ce4-c2858ba6cd4c"' expires: - '-1' pragma: @@ -375,26 +375,26 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"3c903702-15a9-42d1-9594-a8fe8d6dc223\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"42ecb489-e42f-47fb-bc06-392ee4005752\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/5f47f779-0749-4d54-a451-1b56d61efab1?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/08f20332-fc15-48d2-81c1-0df964d34d1e?api-version=2021-08-01 cache-control: - no-cache content-length: - - '561' + - '522' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:33 GMT + - Wed, 11 May 2022 19:55:16 GMT expires: - '-1' pragma: @@ -406,7 +406,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -424,9 +424,9 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/5f47f779-0749-4d54-a451-1b56d61efab1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/08f20332-fc15-48d2-81c1-0df964d34d1e?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -438,7 +438,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:43 GMT + - Wed, 11 May 2022 19:55:26 GMT expires: - '-1' pragma: @@ -470,26 +470,26 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"3c903702-15a9-42d1-9594-a8fe8d6dc223\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"42ecb489-e42f-47fb-bc06-392ee4005752\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '562' + - '523' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:43 GMT + - Wed, 11 May 2022 19:55:27 GMT etag: - - '"3c903702-15a9-42d1-9594-a8fe8d6dc223"' + - '"42ecb489-e42f-47fb-bc06-392ee4005752"' expires: - '-1' pragma: @@ -523,26 +523,26 @@ interactions: --rule-name --rule-type --description --destination-fqdns --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"3c903702-15a9-42d1-9594-a8fe8d6dc223\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"42ecb489-e42f-47fb-bc06-392ee4005752\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '562' + - '523' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:46 GMT + - Wed, 11 May 2022 19:55:31 GMT etag: - - '"3c903702-15a9-42d1-9594-a8fe8d6dc223"' + - '"42ecb489-e42f-47fb-bc06-392ee4005752"' expires: - '-1' pragma: @@ -578,7 +578,7 @@ interactions: Connection: - keep-alive Content-Length: - - '902' + - '824' Content-Type: - application/json ParameterSetName: @@ -586,18 +586,19 @@ interactions: --rule-name --rule-type --description --destination-fqdns --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -606,18 +607,18 @@ interactions: \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"2c77b197-8f5d-4b3e-8df5-85a415c224bc\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"97497a8e-b791-458a-b9df-ac1bae668da2\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/0e459a9a-d897-4dd2-80bd-f55a8934e946?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/c493f2f1-d79b-4657-b4ca-b86865548dfb?api-version=2021-08-01 cache-control: - no-cache content-length: - - '1561' + - '1519' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:50 GMT + - Wed, 11 May 2022 19:55:33 GMT expires: - '-1' pragma: @@ -633,7 +634,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -653,9 +654,9 @@ interactions: --rule-name --rule-type --description --destination-fqdns --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/0e459a9a-d897-4dd2-80bd-f55a8934e946?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/c493f2f1-d79b-4657-b4ca-b86865548dfb?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -667,7 +668,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:01 GMT + - Wed, 11 May 2022 19:55:43 GMT expires: - '-1' pragma: @@ -701,18 +702,19 @@ interactions: --rule-name --rule-type --description --destination-fqdns --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -721,18 +723,18 @@ interactions: \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"2c77b197-8f5d-4b3e-8df5-85a415c224bc\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"97497a8e-b791-458a-b9df-ac1bae668da2\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '1562' + - '1520' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:01 GMT + - Wed, 11 May 2022 19:55:43 GMT etag: - - '"2c77b197-8f5d-4b3e-8df5-85a415c224bc"' + - '"97497a8e-b791-458a-b9df-ac1bae668da2"' expires: - '-1' pragma: @@ -765,18 +767,19 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --destination-fqdns --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -785,18 +788,18 @@ interactions: \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"2c77b197-8f5d-4b3e-8df5-85a415c224bc\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"97497a8e-b791-458a-b9df-ac1bae668da2\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '1562' + - '1520' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:04 GMT + - Wed, 11 May 2022 19:55:47 GMT etag: - - '"2c77b197-8f5d-4b3e-8df5-85a415c224bc"' + - '"97497a8e-b791-458a-b9df-ac1bae668da2"' expires: - '-1' pragma: @@ -819,9 +822,9 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 15000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003", + "12004"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": [], "destinationFqdns": ["www.bing.com"]}, {"name": "network-rule-2", "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "destinationPorts": ["12003", "12004"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], @@ -836,33 +839,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1364' + - '1270' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --destination-fqdns --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \ \"12004\"\r\n ]\r\n },\r\n {\r\n \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n - \ \"ipProtocols\": [\r\n \"Any\",\r\n \"ICMP\"\r\n - \ ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.google.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -871,18 +875,18 @@ interactions: \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"b7899360-25f0-4353-8c55-55ea71c0cfa4\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"c82044ef-c9a5-4f04-a2b2-8c8021fa5fe3\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/07788412-9d1f-44b6-ad55-160cb6c37255?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/d85a260a-749e-47bd-a094-9c9749ea08f3?api-version=2021-08-01 cache-control: - no-cache content-length: - - '2314' + - '2269' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:07 GMT + - Wed, 11 May 2022 19:55:49 GMT expires: - '-1' pragma: @@ -898,7 +902,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -917,9 +921,9 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --destination-fqdns --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/07788412-9d1f-44b6-ad55-160cb6c37255?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/d85a260a-749e-47bd-a094-9c9749ea08f3?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -931,7 +935,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:18 GMT + - Wed, 11 May 2022 19:56:00 GMT expires: - '-1' pragma: @@ -964,26 +968,27 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --destination-fqdns --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \ \"12004\"\r\n ]\r\n },\r\n {\r\n \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n - \ \"ipProtocols\": [\r\n \"Any\",\r\n \"ICMP\"\r\n - \ ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.google.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -992,18 +997,18 @@ interactions: \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"b7899360-25f0-4353-8c55-55ea71c0cfa4\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"c82044ef-c9a5-4f04-a2b2-8c8021fa5fe3\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '2315' + - '2270' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:18 GMT + - Wed, 11 May 2022 19:56:00 GMT etag: - - '"b7899360-25f0-4353-8c55-55ea71c0cfa4"' + - '"c82044ef-c9a5-4f04-a2b2-8c8021fa5fe3"' expires: - '-1' pragma: @@ -1037,26 +1042,27 @@ interactions: --rule-name --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \ \"12004\"\r\n ]\r\n },\r\n {\r\n \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n - \ \"ipProtocols\": [\r\n \"Any\",\r\n \"ICMP\"\r\n - \ ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.google.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -1065,18 +1071,18 @@ interactions: \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"b7899360-25f0-4353-8c55-55ea71c0cfa4\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"c82044ef-c9a5-4f04-a2b2-8c8021fa5fe3\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '2315' + - '2270' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:21 GMT + - Wed, 11 May 2022 19:56:02 GMT etag: - - '"b7899360-25f0-4353-8c55-55ea71c0cfa4"' + - '"c82044ef-c9a5-4f04-a2b2-8c8021fa5fe3"' expires: - '-1' pragma: @@ -1099,13 +1105,13 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 15000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003", + "12004"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": [], "destinationFqdns": ["www.bing.com"]}, {"name": "network-rule-2", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003", + "12004"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": [], "destinationFqdns": ["www.google.com"]}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "DNAT"}, "rules": [{"name": "nat-rule", "description": "test", @@ -1122,7 +1128,7 @@ interactions: Connection: - keep-alive Content-Length: - - '2012' + - '1902' Content-Type: - application/json ParameterSetName: @@ -1130,26 +1136,27 @@ interactions: --rule-name --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \ \"12004\"\r\n ]\r\n },\r\n {\r\n \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n - \ \"ipProtocols\": [\r\n \"Any\",\r\n \"ICMP\"\r\n - \ ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.google.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -1158,28 +1165,29 @@ interactions: \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12001\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"58f62cce-23e4-4f27-9e8e-191533589954\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"b1fefb1b-a528-406f-9532-ffe6f6d5d5f0\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/51d75a2a-1f1a-4420-90ed-baf2d470f18f?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/d4251a38-02a8-45e9-9452-b5b67a5e15ea?api-version=2021-08-01 cache-control: - no-cache content-length: - - '3277' + - '3229' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:25 GMT + - Wed, 11 May 2022 19:56:04 GMT expires: - '-1' pragma: @@ -1195,7 +1203,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' status: code: 200 message: OK @@ -1215,9 +1223,9 @@ interactions: --rule-name --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/51d75a2a-1f1a-4420-90ed-baf2d470f18f?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/d4251a38-02a8-45e9-9452-b5b67a5e15ea?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1229,7 +1237,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:36 GMT + - Wed, 11 May 2022 19:56:15 GMT expires: - '-1' pragma: @@ -1263,26 +1271,27 @@ interactions: --rule-name --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \ \"12004\"\r\n ]\r\n },\r\n {\r\n \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n - \ \"ipProtocols\": [\r\n \"Any\",\r\n \"ICMP\"\r\n - \ ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.google.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -1291,28 +1300,29 @@ interactions: \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12001\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"58f62cce-23e4-4f27-9e8e-191533589954\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"b1fefb1b-a528-406f-9532-ffe6f6d5d5f0\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '3278' + - '3230' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:36 GMT + - Wed, 11 May 2022 19:56:16 GMT etag: - - '"58f62cce-23e4-4f27-9e8e-191533589954"' + - '"b1fefb1b-a528-406f-9532-ffe6f6d5d5f0"' expires: - '-1' pragma: @@ -1346,26 +1356,27 @@ interactions: --description --destination-addresses --source-ip-groups --translated-fqdn --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \ \"12004\"\r\n ]\r\n },\r\n {\r\n \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n - \ \"ipProtocols\": [\r\n \"Any\",\r\n \"ICMP\"\r\n - \ ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.google.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -1374,28 +1385,29 @@ interactions: \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12001\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"58f62cce-23e4-4f27-9e8e-191533589954\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"b1fefb1b-a528-406f-9532-ffe6f6d5d5f0\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '3278' + - '3230' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:38 GMT + - Wed, 11 May 2022 19:56:18 GMT etag: - - '"58f62cce-23e4-4f27-9e8e-191533589954"' + - '"b1fefb1b-a528-406f-9532-ffe6f6d5d5f0"' expires: - '-1' pragma: @@ -1418,19 +1430,19 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 15000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003", + "12004"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": [], "destinationFqdns": ["www.bing.com"]}, {"name": "network-rule-2", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003", + "12004"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": [], "destinationFqdns": ["www.google.com"]}]}, {"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, - "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", "ruleType": "NatRule", - "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15"], "destinationPorts": ["12001"], "translatedAddress": "128.1.1.1", - "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}, + "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", "description": "test", + "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12001"], "translatedAddress": + "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}, {"name": "nat-rule-2", "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "destinationAddresses": ["202.120.36.16"], "destinationPorts": ["12000"], "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], @@ -1445,7 +1457,7 @@ interactions: Connection: - keep-alive Content-Length: - - '2465' + - '2339' Content-Type: - application/json ParameterSetName: @@ -1453,26 +1465,27 @@ interactions: --description --destination-addresses --source-ip-groups --translated-fqdn --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \ \"12004\"\r\n ]\r\n },\r\n {\r\n \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n - \ \"ipProtocols\": [\r\n \"Any\",\r\n \"ICMP\"\r\n - \ ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.google.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -1481,36 +1494,37 @@ interactions: \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n - \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12001\"\r\n - \ ]\r\n },\r\n {\r\n \"ruleType\": - \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"translatedFqdn\": - \"www.bing2.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12001\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.bing2.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.16\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"f6886454-6c4e-4ed3-abd6-b526f58d00a6\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"7a99adfa-02e4-4475-ab04-3d5103b76e83\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/ba715eb9-efb9-4045-8bad-90db62b7cad0?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/ab743084-ee4f-44e6-ae3f-2ab2445f4728?api-version=2021-08-01 cache-control: - no-cache content-length: - - '4006' + - '3955' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:41 GMT + - Wed, 11 May 2022 19:56:19 GMT expires: - '-1' pragma: @@ -1526,7 +1540,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 200 message: OK @@ -1546,9 +1560,9 @@ interactions: --description --destination-addresses --source-ip-groups --translated-fqdn --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/ba715eb9-efb9-4045-8bad-90db62b7cad0?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/ab743084-ee4f-44e6-ae3f-2ab2445f4728?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1560,7 +1574,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:51 GMT + - Wed, 11 May 2022 19:56:30 GMT expires: - '-1' pragma: @@ -1594,26 +1608,27 @@ interactions: --description --destination-addresses --source-ip-groups --translated-fqdn --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n - \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"network-rule\",\r\n \"description\": \"test\",\r\n \"ipProtocols\": + [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.bing.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n \ \"12004\"\r\n ]\r\n },\r\n {\r\n \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n - \ \"ipProtocols\": [\r\n \"Any\",\r\n \"ICMP\"\r\n - \ ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [],\r\n \"destinationFqdns\": [\r\n \"www.google.com\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12003\",\r\n @@ -1622,36 +1637,37 @@ interactions: \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n - \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12001\"\r\n - \ ]\r\n },\r\n {\r\n \"ruleType\": - \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"translatedFqdn\": - \"www.bing2.com\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12001\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"description\": + \"test\",\r\n \"translatedFqdn\": \"www.bing2.com\",\r\n \"translatedPort\": + \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n + \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.16\"\r\n \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"f6886454-6c4e-4ed3-abd6-b526f58d00a6\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"7a99adfa-02e4-4475-ab04-3d5103b76e83\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '4007' + - '3956' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:52 GMT + - Wed, 11 May 2022 19:56:30 GMT etag: - - '"f6886454-6c4e-4ed3-abd6-b526f58d00a6"' + - '"7a99adfa-02e4-4475-ab04-3d5103b76e83"' expires: - '-1' pragma: diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_rules_with_ip_groups.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_rules_with_ip_groups.yaml index 502ccdd587b..e385811e44a 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_rules_with_ip_groups.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_rules_with_ip_groups.yaml @@ -13,24 +13,21 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-resource/12.1.0 Azure-SDK-For-Python AZURECLI/2.22.1 - accept-language: - - en-US + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_policy000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001","name":"cli_test_azure_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-04-21T05:17:04Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001","name":"cli_test_azure_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:55:36Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:55:37.3675601Z","CreationDate":"2022-05-11T19:55:37.3675193Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '429' + - '533' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:10 GMT + - Wed, 11 May 2022 19:55:39 GMT expires: - '-1' pragma: @@ -45,7 +42,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus2", "properties": {"ipAddresses": ["10.0.0.0", "10.0.0.1"]}}' + body: '{"location": "westus2", "properties": {"ipAddresses": ["10.0.0.0", "10.0.0.1"]}}' headers: Accept: - application/json @@ -62,8 +59,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.22.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 accept-language: - en-US method: PUT @@ -74,18 +71,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.0\",\r\n \"10.0.0.1\"\r\n \ ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\",\r\n \ \"name\": \"sourceipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"e4971df8-e166-4eb4-b74f-3b4f3e564eb0\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"573f1f30-a94f-4a7f-aaf7-d13dfe953d87\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/28d91e46-758d-4d20-93d2-3cabc29634bd?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/e12db164-74b4-4c2c-b2a8-ab2de4d1f688?api-version=2019-09-01 cache-control: - no-cache content-length: - - '535' + - '496' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:21 GMT + - Wed, 11 May 2022 19:55:47 GMT expires: - '-1' pragma: @@ -115,10 +112,10 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.22.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/28d91e46-758d-4d20-93d2-3cabc29634bd?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/e12db164-74b4-4c2c-b2a8-ab2de4d1f688?api-version=2019-09-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -130,7 +127,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:32 GMT + - Wed, 11 May 2022 19:55:58 GMT expires: - '-1' pragma: @@ -162,8 +159,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.22.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup?api-version=2019-09-01 response: @@ -172,18 +169,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.0\",\r\n \"10.0.0.1\"\r\n \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\",\r\n \ \"name\": \"sourceipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"e4971df8-e166-4eb4-b74f-3b4f3e564eb0\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"573f1f30-a94f-4a7f-aaf7-d13dfe953d87\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '536' + - '497' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:33 GMT + - Wed, 11 May 2022 19:55:59 GMT etag: - - '"e4971df8-e166-4eb4-b74f-3b4f3e564eb0"' + - '"573f1f30-a94f-4a7f-aaf7-d13dfe953d87"' expires: - '-1' pragma: @@ -215,24 +212,21 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-resource/12.1.0 Azure-SDK-For-Python AZURECLI/2.22.1 - accept-language: - - en-US + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_policy000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001","name":"cli_test_azure_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-04-21T05:17:04Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001","name":"cli_test_azure_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:55:36Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:55:37.3675601Z","CreationDate":"2022-05-11T19:55:37.3675193Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '429' + - '533' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:35 GMT + - Wed, 11 May 2022 19:56:00 GMT expires: - '-1' pragma: @@ -247,7 +241,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus2", "properties": {"ipAddresses": ["10.0.0.2", "10.0.0.3"]}}' + body: '{"location": "westus2", "properties": {"ipAddresses": ["10.0.0.2", "10.0.0.3"]}}' headers: Accept: - application/json @@ -264,8 +258,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.22.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 accept-language: - en-US method: PUT @@ -276,18 +270,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.2\",\r\n \"10.0.0.3\"\r\n \ ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\",\r\n \ \"name\": \"destinationipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"3fd35152-ad26-472a-9489-391a3943dda6\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"235d624a-62db-46ab-976a-dee3fbde928d\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/0bc08e1f-3ce8-4369-9486-d489ad7ff45c?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/4243ffb7-e420-49de-af6a-a736136c8ba1?api-version=2019-09-01 cache-control: - no-cache content-length: - - '545' + - '506' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:46 GMT + - Wed, 11 May 2022 19:56:08 GMT expires: - '-1' pragma: @@ -299,7 +293,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1197' status: code: 201 message: Created @@ -317,10 +311,10 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.22.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/0bc08e1f-3ce8-4369-9486-d489ad7ff45c?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/4243ffb7-e420-49de-af6a-a736136c8ba1?api-version=2019-09-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -332,7 +326,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:58 GMT + - Wed, 11 May 2022 19:56:19 GMT expires: - '-1' pragma: @@ -364,8 +358,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.22.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup?api-version=2019-09-01 response: @@ -374,18 +368,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.2\",\r\n \"10.0.0.3\"\r\n \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\",\r\n \ \"name\": \"destinationipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"3fd35152-ad26-472a-9489-391a3943dda6\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"235d624a-62db-46ab-976a-dee3fbde928d\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '546' + - '507' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:58 GMT + - Wed, 11 May 2022 19:56:22 GMT etag: - - '"3fd35152-ad26-472a-9489-391a3943dda6"' + - '"235d624a-62db-46ab-976a-dee3fbde928d"' expires: - '-1' pragma: @@ -404,7 +398,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus2"}' + body: '{"location": "westus2"}' headers: Accept: - application/json @@ -421,9 +415,9 @@ interactions: ParameterSetName: - -g -n -l User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -431,18 +425,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"89ab42c2-1aed-47a7-b6d1-915eec62fc90\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"77ac9b62-ecc8-45d1-a462-00360e04b1b0\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/920d4c92-7236-46e1-9535-a1ce4c868e2a?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/bd63dff7-8d7d-44ef-ba4b-115d154dce6a?api-version=2021-08-01 cache-control: - no-cache content-length: - - '591' + - '552' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:09 GMT + - Wed, 11 May 2022 19:56:29 GMT expires: - '-1' pragma: @@ -454,7 +448,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1197' status: code: 201 message: Created @@ -472,9 +466,9 @@ interactions: ParameterSetName: - -g -n -l User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/920d4c92-7236-46e1-9535-a1ce4c868e2a?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/bd63dff7-8d7d-44ef-ba4b-115d154dce6a?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -486,7 +480,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:19 GMT + - Wed, 11 May 2022 19:56:40 GMT expires: - '-1' pragma: @@ -518,9 +512,9 @@ interactions: ParameterSetName: - -g -n -l User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -528,18 +522,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"89ab42c2-1aed-47a7-b6d1-915eec62fc90\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"77ac9b62-ecc8-45d1-a462-00360e04b1b0\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '592' + - '553' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:19 GMT + - Wed, 11 May 2022 19:56:41 GMT etag: - - '"89ab42c2-1aed-47a7-b6d1-915eec62fc90"' + - '"77ac9b62-ecc8-45d1-a462-00360e04b1b0"' expires: - '-1' pragma: @@ -575,26 +569,26 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"54a774b4-caa3-4fa9-935e-05d297db5a6c\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"450a0332-1010-4213-893c-11835d672195\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/0ab970ef-6f9c-4610-94b4-ee93384665ee?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/212a1c9c-17f8-45db-a53c-0de07e4558b9?api-version=2021-08-01 cache-control: - no-cache content-length: - - '561' + - '522' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:25 GMT + - Wed, 11 May 2022 19:56:47 GMT expires: - '-1' pragma: @@ -606,7 +600,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 201 message: Created @@ -624,9 +618,9 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/0ab970ef-6f9c-4610-94b4-ee93384665ee?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/212a1c9c-17f8-45db-a53c-0de07e4558b9?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -638,7 +632,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:35 GMT + - Wed, 11 May 2022 19:56:57 GMT expires: - '-1' pragma: @@ -670,26 +664,26 @@ interactions: ParameterSetName: - -g --priority --policy-name -n User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"54a774b4-caa3-4fa9-935e-05d297db5a6c\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"450a0332-1010-4213-893c-11835d672195\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '562' + - '523' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:35 GMT + - Wed, 11 May 2022 19:56:58 GMT etag: - - '"54a774b4-caa3-4fa9-935e-05d297db5a6c"' + - '"450a0332-1010-4213-893c-11835d672195"' expires: - '-1' pragma: @@ -723,26 +717,26 @@ interactions: --rule-name --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"54a774b4-caa3-4fa9-935e-05d297db5a6c\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"450a0332-1010-4213-893c-11835d672195\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '562' + - '523' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:37 GMT + - Wed, 11 May 2022 19:57:01 GMT etag: - - '"54a774b4-caa3-4fa9-935e-05d297db5a6c"' + - '"450a0332-1010-4213-893c-11835d672195"' expires: - '-1' pragma: @@ -766,9 +760,8 @@ interactions: [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "DNAT"}, "rules": [{"name": "nat-rule", "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}]}}' + "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000"], "translatedAddress": + "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}]}}' headers: Accept: - application/json @@ -779,7 +772,7 @@ interactions: Connection: - keep-alive Content-Length: - - '949' + - '862' Content-Type: - application/json ParameterSetName: @@ -787,37 +780,38 @@ interactions: --rule-name --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n }\r\n - \ ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"f7f3494b-13b5-4f86-bd57-4edbc5dbd775\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"e03fd36b-06ec-4ff3-a7ea-4b734c3fa419\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/96f9e56f-bb0f-4357-be1b-aabd550983e2?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/fbbc082c-c8e4-4322-9642-5ddcc1ef89db?api-version=2021-08-01 cache-control: - no-cache content-length: - - '1553' + - '1487' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:40 GMT + - Wed, 11 May 2022 19:57:03 GMT expires: - '-1' pragma: @@ -833,7 +827,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1194' + - '1198' status: code: 200 message: OK @@ -853,9 +847,9 @@ interactions: --rule-name --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/96f9e56f-bb0f-4357-be1b-aabd550983e2?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/fbbc082c-c8e4-4322-9642-5ddcc1ef89db?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -867,7 +861,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:50 GMT + - Wed, 11 May 2022 19:57:13 GMT expires: - '-1' pragma: @@ -901,37 +895,38 @@ interactions: --rule-name --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n }\r\n - \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"f7f3494b-13b5-4f86-bd57-4edbc5dbd775\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"e03fd36b-06ec-4ff3-a7ea-4b734c3fa419\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '1554' + - '1488' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:50 GMT + - Wed, 11 May 2022 19:57:13 GMT etag: - - '"f7f3494b-13b5-4f86-bd57-4edbc5dbd775"' + - '"e03fd36b-06ec-4ff3-a7ea-4b734c3fa419"' expires: - '-1' pragma: @@ -965,37 +960,38 @@ interactions: --rule-name --rule-type --description --destination-ip-groups --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n }\r\n - \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n }\r\n ],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"f7f3494b-13b5-4f86-bd57-4edbc5dbd775\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"e03fd36b-06ec-4ff3-a7ea-4b734c3fa419\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '1554' + - '1488' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:53 GMT + - Wed, 11 May 2022 19:57:17 GMT etag: - - '"f7f3494b-13b5-4f86-bd57-4edbc5dbd775"' + - '"e03fd36b-06ec-4ff3-a7ea-4b734c3fa419"' expires: - '-1' pragma: @@ -1018,14 +1014,14 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], - "destinationPorts": ["12003", "12004"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "destinationPorts": ["12003"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"]}]}]}}' headers: Accept: @@ -1037,7 +1033,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1693' + - '1542' Content-Type: - application/json ParameterSetName: @@ -1045,49 +1041,50 @@ interactions: --rule-name --rule-type --description --destination-ip-groups --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n }\r\n ],\r\n \"provisioningState\": - \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"e13d53a5-10a2-47af-9c82-0a5188e6f48f\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"5ff7e561-6eb6-4e47-9174-4e3a34f0c13d\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/1013f83b-ed86-4170-9b91-db9b7d7b2fcc?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/4e403133-2611-4438-9fe0-3ea0ca9a1a08?api-version=2021-08-01 cache-control: - no-cache content-length: - - '2734' + - '2602' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:18:55 GMT + - Wed, 11 May 2022 19:57:19 GMT expires: - '-1' pragma: @@ -1103,7 +1100,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1194' + - '1198' status: code: 200 message: OK @@ -1123,9 +1120,9 @@ interactions: --rule-name --rule-type --description --destination-ip-groups --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/1013f83b-ed86-4170-9b91-db9b7d7b2fcc?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/4e403133-2611-4438-9fe0-3ea0ca9a1a08?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1137,7 +1134,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:05 GMT + - Wed, 11 May 2022 19:57:29 GMT expires: - '-1' pragma: @@ -1171,49 +1168,50 @@ interactions: --rule-name --rule-type --description --destination-ip-groups --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n }\r\n ],\r\n \"provisioningState\": - \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"e13d53a5-10a2-47af-9c82-0a5188e6f48f\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"5ff7e561-6eb6-4e47-9174-4e3a34f0c13d\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '2735' + - '2603' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:05 GMT + - Wed, 11 May 2022 19:57:30 GMT etag: - - '"e13d53a5-10a2-47af-9c82-0a5188e6f48f"' + - '"5ff7e561-6eb6-4e47-9174-4e3a34f0c13d"' expires: - '-1' pragma: @@ -1247,49 +1245,50 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-ip-groups --protocols --fqdn-tags --web-categories User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n }\r\n ],\r\n \"provisioningState\": - \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"e13d53a5-10a2-47af-9c82-0a5188e6f48f\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"5ff7e561-6eb6-4e47-9174-4e3a34f0c13d\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '2735' + - '2603' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:08 GMT + - Wed, 11 May 2022 19:57:32 GMT etag: - - '"e13d53a5-10a2-47af-9c82-0a5188e6f48f"' + - '"5ff7e561-6eb6-4e47-9174-4e3a34f0c13d"' expires: - '-1' pragma: @@ -1312,15 +1311,15 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003"], + "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"], "destinationFqdns": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, @@ -1339,7 +1338,7 @@ interactions: Connection: - keep-alive Content-Length: - - '2451' + - '2284' Content-Type: - application/json ParameterSetName: @@ -1347,38 +1346,39 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-ip-groups --protocols --fqdn-tags --web-categories User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -1393,18 +1393,18 @@ interactions: \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"de2d55d4-ff69-4ba6-b5bf-7760b52f1e66\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"dfa76f7f-2402-4406-8853-de322ee34db9\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/e0bc2de3-f657-4c17-aa27-462d06bb89e3?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/b6e2acae-2cad-4c64-8fcd-2fadc220b492?api-version=2021-08-01 cache-control: - no-cache content-length: - - '4035' + - '3900' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:10 GMT + - Wed, 11 May 2022 19:57:33 GMT expires: - '-1' pragma: @@ -1420,7 +1420,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1196' status: code: 200 message: OK @@ -1440,9 +1440,9 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-ip-groups --protocols --fqdn-tags --web-categories User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/e0bc2de3-f657-4c17-aa27-462d06bb89e3?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/b6e2acae-2cad-4c64-8fcd-2fadc220b492?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1454,7 +1454,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:20 GMT + - Wed, 11 May 2022 19:57:43 GMT expires: - '-1' pragma: @@ -1488,38 +1488,39 @@ interactions: --rule-name --rule-type --description --destination-addresses --source-ip-groups --protocols --fqdn-tags --web-categories User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -1534,18 +1535,18 @@ interactions: \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"de2d55d4-ff69-4ba6-b5bf-7760b52f1e66\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"dfa76f7f-2402-4406-8853-de322ee34db9\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '4036' + - '3901' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:21 GMT + - Wed, 11 May 2022 19:57:44 GMT etag: - - '"de2d55d4-ff69-4ba6-b5bf-7760b52f1e66"' + - '"dfa76f7f-2402-4406-8853-de322ee34db9"' expires: - '-1' pragma: @@ -1577,38 +1578,39 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -1623,18 +1625,18 @@ interactions: \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"de2d55d4-ff69-4ba6-b5bf-7760b52f1e66\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"dfa76f7f-2402-4406-8853-de322ee34db9\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '4036' + - '3901' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:22 GMT + - Wed, 11 May 2022 19:57:46 GMT etag: - - '"de2d55d4-ff69-4ba6-b5bf-7760b52f1e66"' + - '"dfa76f7f-2402-4406-8853-de322ee34db9"' expires: - '-1' pragma: @@ -1667,38 +1669,39 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-ip-groups --destination-addresses --protocols --target-fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -1713,18 +1716,18 @@ interactions: \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"de2d55d4-ff69-4ba6-b5bf-7760b52f1e66\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"dfa76f7f-2402-4406-8853-de322ee34db9\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '4036' + - '3901' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:24 GMT + - Wed, 11 May 2022 19:57:47 GMT etag: - - '"de2d55d4-ff69-4ba6-b5bf-7760b52f1e66"' + - '"dfa76f7f-2402-4406-8853-de322ee34db9"' expires: - '-1' pragma: @@ -1747,23 +1750,23 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003"], + "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"], "destinationFqdns": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, - "rules": [{"name": "application-rule", "ruleType": "ApplicationRule", "sourceAddresses": - [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": - [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": - 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "rules": [{"name": "application-rule", "description": "test", "ruleType": "ApplicationRule", + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", + "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", "description": "test", "ruleType": "ApplicationRule", "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": @@ -1780,45 +1783,46 @@ interactions: Connection: - keep-alive Content-Length: - - '3005' + - '2822' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-ip-groups --destination-addresses --protocols --target-fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -1831,31 +1835,32 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"be9a60c4-f542-4299-9e87-aa65585cbe22\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"d56e3d4c-a7af-41d9-9f35-472a22d11de3\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/44b0e9b0-eb53-447e-a1f9-241f76872493?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/53e26099-f520-406f-b0e5-5729e575b4ce?api-version=2021-08-01 cache-control: - no-cache content-length: - - '5026' + - '4888' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:26 GMT + - Wed, 11 May 2022 19:57:49 GMT expires: - '-1' pragma: @@ -1890,9 +1895,9 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-ip-groups --destination-addresses --protocols --target-fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/44b0e9b0-eb53-447e-a1f9-241f76872493?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/53e26099-f520-406f-b0e5-5729e575b4ce?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1904,7 +1909,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:36 GMT + - Wed, 11 May 2022 19:58:00 GMT expires: - '-1' pragma: @@ -1937,38 +1942,39 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --rule-type --description --source-ip-groups --destination-addresses --protocols --target-fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -1981,31 +1987,32 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"be9a60c4-f542-4299-9e87-aa65585cbe22\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"d56e3d4c-a7af-41d9-9f35-472a22d11de3\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '5027' + - '4889' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:36 GMT + - Wed, 11 May 2022 19:58:00 GMT etag: - - '"be9a60c4-f542-4299-9e87-aa65585cbe22"' + - '"d56e3d4c-a7af-41d9-9f35-472a22d11de3"' expires: - '-1' pragma: @@ -2038,38 +2045,39 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --target-fqdns --web-categories User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -2082,31 +2090,32 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [],\r\n \"targetFqdns\": [\r\n \"www.bing.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [],\r\n \"targetFqdns\": + [\r\n \"www.bing.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"be9a60c4-f542-4299-9e87-aa65585cbe22\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"d56e3d4c-a7af-41d9-9f35-472a22d11de3\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '5027' + - '4889' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:40 GMT + - Wed, 11 May 2022 19:58:02 GMT etag: - - '"be9a60c4-f542-4299-9e87-aa65585cbe22"' + - '"d56e3d4c-a7af-41d9-9f35-472a22d11de3"' expires: - '-1' pragma: @@ -2129,29 +2138,29 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003"], + "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"], "destinationFqdns": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, - "rules": [{"name": "application-rule", "ruleType": "ApplicationRule", "sourceAddresses": - [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": - [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": - 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "rules": [{"name": "application-rule", "description": "test", "ruleType": "ApplicationRule", + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", + "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", - "ruleType": "ApplicationRule", "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": ["www.google0.com", - "www.google1.com", "www.google2.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + ["www.google0.com", "www.google1.com", "www.google2.com"], "targetUrls": [], + "fqdnTags": [], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking", "Hacking"]}]}]}}' headers: Accept: @@ -2163,45 +2172,46 @@ interactions: Connection: - keep-alive Content-Length: - - '3121' + - '2961' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name --target-fqdns --web-categories User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -2214,33 +2224,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"6361c409-b7e6-43ca-82d6-49ef12b11846\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"579ceb16-d4a6-4736-ba07-f06fee8ea006\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/3f9916f4-ddb5-4385-8907-692a7753b4a0?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/072f035a-b0e3-42ae-9135-1887b16f5800?api-version=2021-08-01 cache-control: - no-cache content-length: - - '5162' + - '5024' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:43 GMT + - Wed, 11 May 2022 19:58:04 GMT expires: - '-1' pragma: @@ -2256,7 +2267,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1192' + - '1197' status: code: 200 message: OK @@ -2275,9 +2286,9 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --target-fqdns --web-categories User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/3f9916f4-ddb5-4385-8907-692a7753b4a0?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/072f035a-b0e3-42ae-9135-1887b16f5800?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2289,7 +2300,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:53 GMT + - Wed, 11 May 2022 19:58:14 GMT expires: - '-1' pragma: @@ -2322,38 +2333,39 @@ interactions: - -g --policy-name --rule-collection-group-name --collection-name --name --target-fqdns --web-categories User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -2366,33 +2378,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"6361c409-b7e6-43ca-82d6-49ef12b11846\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"579ceb16-d4a6-4736-ba07-f06fee8ea006\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '5163' + - '5025' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:54 GMT + - Wed, 11 May 2022 19:58:14 GMT etag: - - '"6361c409-b7e6-43ca-82d6-49ef12b11846"' + - '"579ceb16-d4a6-4736-ba07-f06fee8ea006"' expires: - '-1' pragma: @@ -2426,38 +2439,39 @@ interactions: --description --destination-ip-groups --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -2470,33 +2484,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"6361c409-b7e6-43ca-82d6-49ef12b11846\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"579ceb16-d4a6-4736-ba07-f06fee8ea006\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '5163' + - '5025' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:56 GMT + - Wed, 11 May 2022 19:58:16 GMT etag: - - '"6361c409-b7e6-43ca-82d6-49ef12b11846"' + - '"579ceb16-d4a6-4736-ba07-f06fee8ea006"' expires: - '-1' pragma: @@ -2519,15 +2534,15 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003"], + "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"], "destinationFqdns": []}, {"name": "network-rule-2", "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "destinationPorts": ["12003", @@ -2535,16 +2550,17 @@ interactions: "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", - "ruleType": "ApplicationRule", "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": [], "targetUrls": - [], "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], - "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", - "ruleType": "ApplicationRule", "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": ["www.google0.com", - "www.google1.com", "www.google2.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + [], "targetUrls": [], "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + ["www.google0.com", "www.google1.com", "www.google2.com"], "targetUrls": [], + "fqdnTags": [], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking", "Hacking"]}]}]}}' headers: Accept: @@ -2556,7 +2572,7 @@ interactions: Connection: - keep-alive Content-Length: - - '3715' + - '3477' Content-Type: - application/json ParameterSetName: @@ -2564,38 +2580,38 @@ interactions: --description --destination-ip-groups --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + [\r\n \"12003\"\r\n ]\r\n },\r\n {\r\n + \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": @@ -2604,46 +2620,47 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n + \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n - \ ]\r\n },\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"9bf49941-39bf-4da4-b016-fbe537ae2f0a\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"00f8c8b9-473d-4ae3-9423-fc915e2805ce\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/33018b5e-1f37-4e91-875e-a1ad5d04ea7b?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/4617652b-7c76-4dbc-9d2a-8695694842ab?api-version=2021-08-01 cache-control: - no-cache content-length: - - '6099' + - '5919' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:19:58 GMT + - Wed, 11 May 2022 19:58:17 GMT expires: - '-1' pragma: @@ -2659,7 +2676,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -2679,9 +2696,9 @@ interactions: --description --destination-ip-groups --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/33018b5e-1f37-4e91-875e-a1ad5d04ea7b?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/4617652b-7c76-4dbc-9d2a-8695694842ab?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2693,7 +2710,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:08 GMT + - Wed, 11 May 2022 19:58:27 GMT expires: - '-1' pragma: @@ -2727,38 +2744,38 @@ interactions: --description --destination-ip-groups --source-ip-groups --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + [\r\n \"12003\"\r\n ]\r\n },\r\n {\r\n + \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": @@ -2767,46 +2784,47 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n + \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n - \ ]\r\n },\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"9bf49941-39bf-4da4-b016-fbe537ae2f0a\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"00f8c8b9-473d-4ae3-9423-fc915e2805ce\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '6100' + - '5920' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:09 GMT + - Wed, 11 May 2022 19:58:28 GMT etag: - - '"9bf49941-39bf-4da4-b016-fbe537ae2f0a"' + - '"00f8c8b9-473d-4ae3-9423-fc915e2805ce"' expires: - '-1' pragma: @@ -2840,38 +2858,38 @@ interactions: --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + [\r\n \"12003\"\r\n ]\r\n },\r\n {\r\n + \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": @@ -2880,46 +2898,47 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n + \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n - \ ]\r\n },\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"9bf49941-39bf-4da4-b016-fbe537ae2f0a\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"00f8c8b9-473d-4ae3-9423-fc915e2805ce\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '6100' + - '5920' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:11 GMT + - Wed, 11 May 2022 19:58:29 GMT etag: - - '"9bf49941-39bf-4da4-b016-fbe537ae2f0a"' + - '"00f8c8b9-473d-4ae3-9423-fc915e2805ce"' expires: - '-1' pragma: @@ -2942,37 +2961,37 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}, {"name": "nat-rule-2", "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "destinationAddresses": ["202.120.36.16"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003"], + "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"], - "destinationFqdns": []}, {"name": "network-rule-2", "ruleType": "NetworkRule", - "ipProtocols": ["Any", "ICMP"], "sourceAddresses": [], "destinationAddresses": + "destinationFqdns": []}, {"name": "network-rule-2", "description": "test", "ruleType": + "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"], "destinationFqdns": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, - "rules": [{"name": "application-rule", "ruleType": "ApplicationRule", "sourceAddresses": - [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": - [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": - 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "rules": [{"name": "application-rule", "description": "test", "ruleType": "ApplicationRule", + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", + "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", - "ruleType": "ApplicationRule", "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": ["www.google0.com", - "www.google1.com", "www.google2.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + ["www.google0.com", "www.google1.com", "www.google2.com"], "targetUrls": [], + "fqdnTags": [], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking", "Hacking"]}]}]}}' headers: Accept: @@ -2984,7 +3003,7 @@ interactions: Connection: - keep-alive Content-Length: - - '4228' + - '3965' Content-Type: - application/json ParameterSetName: @@ -2992,46 +3011,46 @@ interactions: --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n },\r\n {\r\n - \ \"ruleType\": \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n - \ \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"description\": + \"test\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + [\r\n \"12003\"\r\n ]\r\n },\r\n {\r\n + \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": @@ -3040,46 +3059,47 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n + \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n - \ ]\r\n },\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"d908e084-c74a-4676-ad05-532d23f3e926\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"17b1f534-018c-4e05-a6fa-7bd76ccea796\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/52e29986-0e8c-49aa-9d9a-3faa52055fbf?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/2e9b8cb7-b5a5-4f58-aae8-e733f18c6463?api-version=2021-08-01 cache-control: - no-cache content-length: - - '6851' + - '6644' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:13 GMT + - Wed, 11 May 2022 19:58:30 GMT expires: - '-1' pragma: @@ -3095,7 +3115,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1197' status: code: 200 message: OK @@ -3115,9 +3135,9 @@ interactions: --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/52e29986-0e8c-49aa-9d9a-3faa52055fbf?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/2e9b8cb7-b5a5-4f58-aae8-e733f18c6463?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -3129,7 +3149,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:23 GMT + - Wed, 11 May 2022 19:58:41 GMT expires: - '-1' pragma: @@ -3163,46 +3183,46 @@ interactions: --description --destination-addresses --source-ip-groups --translated-address --translated-port --destination-ports --ip-protocols User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n },\r\n {\r\n - \ \"ruleType\": \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n - \ \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"description\": + \"test\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + [\r\n \"12003\"\r\n ]\r\n },\r\n {\r\n + \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": @@ -3211,46 +3231,47 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n + \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": + [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n + \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n - \ ]\r\n },\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"d908e084-c74a-4676-ad05-532d23f3e926\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"17b1f534-018c-4e05-a6fa-7bd76ccea796\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '6852' + - '6645' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:24 GMT + - Wed, 11 May 2022 19:58:42 GMT etag: - - '"d908e084-c74a-4676-ad05-532d23f3e926"' + - '"17b1f534-018c-4e05-a6fa-7bd76ccea796"' expires: - '-1' pragma: @@ -3282,46 +3303,46 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n },\r\n {\r\n - \ \"ruleType\": \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n - \ \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"description\": + \"test\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ },\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n - \ \"name\": \"network-rule-2\",\r\n \"ipProtocols\": - [\r\n \"Any\",\r\n \"ICMP\"\r\n ],\r\n - \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + [\r\n \"12003\"\r\n ]\r\n },\r\n {\r\n + \ \"ruleType\": \"NetworkRule\",\r\n \"name\": \"network-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"ipProtocols\": [\r\n + \ \"Any\",\r\n \"ICMP\"\r\n ],\r\n \"sourceAddresses\": + [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": @@ -3330,46 +3351,47 @@ interactions: \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": - [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": - 12800\r\n },\r\n {\r\n \"protocolType\": - \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n - \ \"fqdnTags\": [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n - \ ],\r\n \"webCategories\": [\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [],\r\n \"targetUrls\": - [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": - [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n - \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": - [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n - \ ]\r\n },\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n + \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"d908e084-c74a-4676-ad05-532d23f3e926\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"17b1f534-018c-4e05-a6fa-7bd76ccea796\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '6852' + - '6645' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:26 GMT + - Wed, 11 May 2022 19:58:46 GMT etag: - - '"d908e084-c74a-4676-ad05-532d23f3e926"' + - '"17b1f534-018c-4e05-a6fa-7bd76ccea796"' expires: - '-1' pragma: @@ -3392,33 +3414,33 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}, - {"name": "nat-rule-2", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], - "sourceAddresses": [], "destinationAddresses": ["202.120.36.16"], "destinationPorts": - ["12000", "12001"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", - "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, + {"name": "nat-rule-2", "description": "test", "ruleType": "NatRule", "ipProtocols": + ["TCP", "UDP"], "sourceAddresses": [], "destinationAddresses": ["202.120.36.16"], + "destinationPorts": ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": + "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003"], + "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"], "destinationFqdns": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, - "rules": [{"name": "application-rule", "ruleType": "ApplicationRule", "sourceAddresses": - [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": - [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": - 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "rules": [{"name": "application-rule", "description": "test", "ruleType": "ApplicationRule", + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", + "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", - "ruleType": "ApplicationRule", "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": ["www.google0.com", - "www.google1.com", "www.google2.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + ["www.google0.com", "www.google1.com", "www.google2.com"], "targetUrls": [], + "fqdnTags": [], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking", "Hacking"]}]}]}}' headers: Accept: @@ -3430,52 +3452,53 @@ interactions: Connection: - keep-alive Content-Length: - - '3582' + - '3397' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n },\r\n {\r\n - \ \"ruleType\": \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n - \ \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"description\": + \"test\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -3488,33 +3511,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"c38f82ce-bdf8-4bf8-9c54-0a5c55a84719\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"dd8c2d21-a57c-465a-94e0-70371e202f29\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/d6e49af5-acdd-4ac9-a178-af830ad7b2a8?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/e32c7b9d-fefe-4fd8-ae51-32d0b0a731a8?api-version=2021-08-01 cache-control: - no-cache content-length: - - '5914' + - '5749' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:28 GMT + - Wed, 11 May 2022 19:58:48 GMT expires: - '-1' pragma: @@ -3530,7 +3554,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1191' + - '1199' status: code: 200 message: OK @@ -3548,9 +3572,9 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/d6e49af5-acdd-4ac9-a178-af830ad7b2a8?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/e32c7b9d-fefe-4fd8-ae51-32d0b0a731a8?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -3562,7 +3586,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:39 GMT + - Wed, 11 May 2022 19:58:59 GMT expires: - '-1' pragma: @@ -3594,46 +3618,47 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n },\r\n {\r\n - \ \"ruleType\": \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n - \ \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"description\": + \"test\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -3646,33 +3671,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"c38f82ce-bdf8-4bf8-9c54-0a5c55a84719\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"dd8c2d21-a57c-465a-94e0-70371e202f29\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '5915' + - '5750' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:39 GMT + - Wed, 11 May 2022 19:58:59 GMT etag: - - '"c38f82ce-bdf8-4bf8-9c54-0a5c55a84719"' + - '"dd8c2d21-a57c-465a-94e0-70371e202f29"' expires: - '-1' pragma: @@ -3704,46 +3730,47 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n },\r\n {\r\n - \ \"ruleType\": \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n - \ \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n },\r\n {\r\n \"ruleType\": + \"NatRule\",\r\n \"name\": \"nat-rule-2\",\r\n \"description\": + \"test\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -3756,33 +3783,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"c38f82ce-bdf8-4bf8-9c54-0a5c55a84719\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"dd8c2d21-a57c-465a-94e0-70371e202f29\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '5915' + - '5750' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:41 GMT + - Wed, 11 May 2022 19:59:04 GMT etag: - - '"c38f82ce-bdf8-4bf8-9c54-0a5c55a84719"' + - '"dd8c2d21-a57c-465a-94e0-70371e202f29"' expires: - '-1' pragma: @@ -3805,29 +3833,29 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-1", "priority": 13000, "action": {"type": "Allow"}, "rules": [{"name": "network-rule", - "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], "sourceAddresses": - [], "destinationAddresses": [], "destinationPorts": ["12003", "12004"], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "NetworkRule", "ipProtocols": ["Any", "ICMP"], + "sourceAddresses": [], "destinationAddresses": [], "destinationPorts": ["12003"], + "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "destinationIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup"], "destinationFqdns": []}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, - "rules": [{"name": "application-rule", "ruleType": "ApplicationRule", "sourceAddresses": - [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": - [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", "port": - 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", "HDInsight"], - "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "rules": [{"name": "application-rule", "description": "test", "ruleType": "ApplicationRule", + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15", "202.120.36.16"], + "protocols": [{"protocolType": "Http", "port": 12800}, {"protocolType": "Https", + "port": 12801}], "targetFqdns": [], "targetUrls": [], "fqdnTags": ["AzureBackup", + "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", - "ruleType": "ApplicationRule", "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": ["www.google0.com", - "www.google1.com", "www.google2.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": - ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + ["www.google0.com", "www.google1.com", "www.google2.com"], "targetUrls": [], + "fqdnTags": [], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking", "Hacking"]}]}]}}' headers: Accept: @@ -3839,44 +3867,45 @@ interactions: Connection: - keep-alive Content-Length: - - '3121' + - '2961' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -3889,33 +3918,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"247dce0f-068d-4450-a213-c1fb524c1581\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"8d84c959-d0ca-4f27-936e-7269b377c8ed\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/0a8301e1-7aac-4cb9-bd9c-71a61c54ae23?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/64907115-5e31-4ea8-a9bd-ea7fa6b62a62?api-version=2021-08-01 cache-control: - no-cache content-length: - - '5162' + - '5024' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:42 GMT + - Wed, 11 May 2022 19:59:05 GMT expires: - '-1' pragma: @@ -3931,7 +3961,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1190' + - '1199' status: code: 200 message: OK @@ -3949,9 +3979,9 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/0a8301e1-7aac-4cb9-bd9c-71a61c54ae23?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/64907115-5e31-4ea8-a9bd-ea7fa6b62a62?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -3963,7 +3993,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:53 GMT + - Wed, 11 May 2022 19:59:15 GMT expires: - '-1' pragma: @@ -3995,38 +4025,39 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --collection-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -4039,33 +4070,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"247dce0f-068d-4450-a213-c1fb524c1581\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"8d84c959-d0ca-4f27-936e-7269b377c8ed\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '5163' + - '5025' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:53 GMT + - Wed, 11 May 2022 19:59:16 GMT etag: - - '"247dce0f-068d-4450-a213-c1fb524c1581"' + - '"8d84c959-d0ca-4f27-936e-7269b377c8ed"' expires: - '-1' pragma: @@ -4097,38 +4129,39 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"NetworkRule\",\r\n \"name\": - \"network-rule\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"NetworkRule\",\r\n \"name\": \"network-rule\",\r\n \"description\": + \"test\",\r\n \"ipProtocols\": [\r\n \"Any\",\r\n \ \"ICMP\"\r\n ],\r\n \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [],\r\n \"destinationIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/destinationipgroup\"\r\n \ ],\r\n \"destinationFqdns\": [],\r\n \"destinationPorts\": - [\r\n \"12003\",\r\n \"12004\"\r\n ]\r\n - \ }\r\n ],\r\n \"name\": \"filter-collection-1\",\r\n - \ \"priority\": 13000\r\n },\r\n {\r\n \"ruleCollectionType\": - \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": - \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": - \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"protocols\": + [\r\n \"12003\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"filter-collection-1\",\r\n \"priority\": 13000\r\n + \ },\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n + \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": + \"application-rule\",\r\n \"description\": \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n \"protocolType\": \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n @@ -4141,33 +4174,34 @@ interactions: [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"247dce0f-068d-4450-a213-c1fb524c1581\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"8d84c959-d0ca-4f27-936e-7269b377c8ed\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '5163' + - '5025' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:56 GMT + - Wed, 11 May 2022 19:59:18 GMT etag: - - '"247dce0f-068d-4450-a213-c1fb524c1581"' + - '"8d84c959-d0ca-4f27-936e-7269b377c8ed"' expires: - '-1' pragma: @@ -4190,22 +4224,23 @@ interactions: "name": "myclirulecollectiongroup", "properties": {"priority": 10000, "ruleCollections": [{"ruleCollectionType": "FirewallPolicyNatRuleCollection", "name": "nat-collection", "priority": 10005, "action": {"type": "Dnat"}, "rules": [{"name": "nat-rule", - "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], "sourceAddresses": [], - "destinationAddresses": ["202.120.36.15"], "destinationPorts": ["12000", "12001"], - "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": + "description": "test", "ruleType": "NatRule", "ipProtocols": ["TCP", "UDP"], + "sourceAddresses": [], "destinationAddresses": ["202.120.36.15"], "destinationPorts": + ["12000"], "translatedAddress": "128.1.1.1", "translatedPort": "1234", "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"]}]}, {"ruleCollectionType": "FirewallPolicyFilterRuleCollection", "name": "filter-collection-2", "priority": 14000, "action": {"type": "Allow"}, "rules": [{"name": "application-rule", - "ruleType": "ApplicationRule", "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": [], "targetUrls": - [], "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], - "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", - "ruleType": "ApplicationRule", "sourceAddresses": [], "destinationAddresses": - ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": "Http", "port": - 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": ["www.google0.com", - "www.google1.com", "www.google2.com"], "targetUrls": [], "fqdnTags": [], "sourceIpGroups": + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + [], "targetUrls": [], "fqdnTags": ["AzureBackup", "HDInsight"], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], + "terminateTLS": false, "webCategories": ["Hacking"]}, {"name": "application-rule-2", + "description": "test", "ruleType": "ApplicationRule", "sourceAddresses": [], + "destinationAddresses": ["202.120.36.15", "202.120.36.16"], "protocols": [{"protocolType": + "Http", "port": 12800}, {"protocolType": "Https", "port": 12801}], "targetFqdns": + ["www.google0.com", "www.google1.com", "www.google2.com"], "targetUrls": [], + "fqdnTags": [], "sourceIpGroups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup"], "terminateTLS": false, "webCategories": ["Hacking", "Hacking"]}]}]}}' headers: Accept: @@ -4217,37 +4252,38 @@ interactions: Connection: - keep-alive Content-Length: - - '2325' + - '2229' Content-Type: - application/json ParameterSetName: - -g --policy-name --rule-collection-group-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": @@ -4255,33 +4291,34 @@ interactions: \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"79a5eb87-18f2-4ee1-b3f5-6d4096f15a15\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"c60fd204-bde4-4fb7-8ac8-0344bed920f5\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/e28a5166-49d5-41fa-aa63-4816f5338f8d?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/ef3670a7-e3a9-4153-bf97-1441404d3802?api-version=2021-08-01 cache-control: - no-cache content-length: - - '3981' + - '3909' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:20:58 GMT + - Wed, 11 May 2022 19:59:20 GMT expires: - '-1' pragma: @@ -4315,9 +4352,9 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/e28a5166-49d5-41fa-aa63-4816f5338f8d?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/ef3670a7-e3a9-4153-bf97-1441404d3802?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -4329,7 +4366,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:21:08 GMT + - Wed, 11 May 2022 19:59:30 GMT expires: - '-1' pragma: @@ -4361,31 +4398,32 @@ interactions: ParameterSetName: - -g --policy-name --rule-collection-group-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": @@ -4393,33 +4431,34 @@ interactions: \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"79a5eb87-18f2-4ee1-b3f5-6d4096f15a15\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"c60fd204-bde4-4fb7-8ac8-0344bed920f5\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '3982' + - '3910' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:21:08 GMT + - Wed, 11 May 2022 19:59:30 GMT etag: - - '"79a5eb87-18f2-4ee1-b3f5-6d4096f15a15"' + - '"c60fd204-bde4-4fb7-8ac8-0344bed920f5"' expires: - '-1' pragma: @@ -4453,31 +4492,32 @@ interactions: ParameterSetName: - -g --policy-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"priority\": 10000,\r\n \"ruleCollections\": [\r\n {\r\n \"ruleCollectionType\": \"FirewallPolicyNatRuleCollection\",\r\n \ \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": \"NatRule\",\r\n \"name\": - \"nat-rule\",\r\n \"translatedAddress\": \"128.1.1.1\",\r\n \"translatedPort\": - \"1234\",\r\n \"ipProtocols\": [\r\n \"TCP\",\r\n - \ \"UDP\"\r\n ],\r\n \"sourceAddresses\": - [],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \"nat-rule\",\r\n \"description\": \"test\",\r\n \"translatedAddress\": + \"128.1.1.1\",\r\n \"translatedPort\": \"1234\",\r\n \"ipProtocols\": + [\r\n \"TCP\",\r\n \"UDP\"\r\n ],\r\n + \ \"sourceAddresses\": [],\r\n \"sourceIpGroups\": [\r\n + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\"\r\n - \ ],\r\n \"destinationPorts\": [\r\n \"12000\",\r\n - \ \"12001\"\r\n ]\r\n }\r\n ],\r\n - \ \"name\": \"nat-collection\",\r\n \"priority\": 10005\r\n },\r\n - \ {\r\n \"ruleCollectionType\": \"FirewallPolicyFilterRuleCollection\",\r\n - \ \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": - [\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": - \"application-rule\",\r\n \"protocols\": [\r\n {\r\n - \ \"protocolType\": \"Http\",\r\n \"port\": 12800\r\n - \ },\r\n {\r\n \"protocolType\": \"Https\",\r\n - \ \"port\": 12801\r\n }\r\n ],\r\n \"fqdnTags\": - [\r\n \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n + \ ],\r\n \"destinationPorts\": [\r\n \"12000\"\r\n + \ ]\r\n }\r\n ],\r\n \"name\": \"nat-collection\",\r\n + \ \"priority\": 10005\r\n },\r\n {\r\n \"ruleCollectionType\": + \"FirewallPolicyFilterRuleCollection\",\r\n \"action\": {\r\n \"type\": + \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"ruleType\": + \"ApplicationRule\",\r\n \"name\": \"application-rule\",\r\n \"description\": + \"test\",\r\n \"protocols\": [\r\n {\r\n \"protocolType\": + \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n + \ \"protocolType\": \"Https\",\r\n \"port\": + 12801\r\n }\r\n ],\r\n \"fqdnTags\": [\r\n + \ \"AzureBackup\",\r\n \"HDInsight\"\r\n ],\r\n \ \"webCategories\": [\r\n \"Hacking\"\r\n ],\r\n \ \"targetFqdns\": [],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": @@ -4485,37 +4525,38 @@ interactions: \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n },\r\n {\r\n \"ruleType\": \"ApplicationRule\",\r\n \"name\": \"application-rule-2\",\r\n - \ \"protocols\": [\r\n {\r\n \"protocolType\": - \"Http\",\r\n \"port\": 12800\r\n },\r\n {\r\n - \ \"protocolType\": \"Https\",\r\n \"port\": - 12801\r\n }\r\n ],\r\n \"fqdnTags\": [],\r\n - \ \"webCategories\": [\r\n \"Hacking\",\r\n \"Hacking\"\r\n - \ ],\r\n \"targetFqdns\": [\r\n \"www.google0.com\",\r\n - \ \"www.google1.com\",\r\n \"www.google2.com\"\r\n - \ ],\r\n \"targetUrls\": [],\r\n \"terminateTLS\": - false,\r\n \"sourceAddresses\": [],\r\n \"destinationAddresses\": - [\r\n \"202.120.36.15\",\r\n \"202.120.36.16\"\r\n - \ ],\r\n \"sourceIpGroups\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n + \ \"description\": \"test\",\r\n \"protocols\": [\r\n + \ {\r\n \"protocolType\": \"Http\",\r\n \"port\": + 12800\r\n },\r\n {\r\n \"protocolType\": + \"Https\",\r\n \"port\": 12801\r\n }\r\n ],\r\n + \ \"fqdnTags\": [],\r\n \"webCategories\": [\r\n \"Hacking\",\r\n + \ \"Hacking\"\r\n ],\r\n \"targetFqdns\": + [\r\n \"www.google0.com\",\r\n \"www.google1.com\",\r\n + \ \"www.google2.com\"\r\n ],\r\n \"targetUrls\": + [],\r\n \"terminateTLS\": false,\r\n \"sourceAddresses\": + [],\r\n \"destinationAddresses\": [\r\n \"202.120.36.15\",\r\n + \ \"202.120.36.16\"\r\n ],\r\n \"sourceIpGroups\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/ipGroups/sourceipgroup\"\r\n \ ]\r\n }\r\n ],\r\n \"name\": \"filter-collection-2\",\r\n \ \"priority\": 14000\r\n }\r\n ],\r\n \"provisioningState\": \"Deleting\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups/myclirulecollectiongroup\",\r\n \ \"name\": \"myclirulecollectiongroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleCollectionGroups\",\r\n - \ \"etag\": \"4a3333e3-fddb-4998-8502-8c3f9c6e34ab\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"30149e26-b5fa-4d08-9185-a4fdc9b99500\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/f59356ad-30a3-4cc3-9b62-8950b3514109?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/9910a215-07e7-4ab3-b4e4-570b4463734d?api-version=2021-08-01 cache-control: - no-cache content-length: - - '3981' + - '3909' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:21:11 GMT + - Wed, 11 May 2022 19:59:34 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperationResults/f59356ad-30a3-4cc3-9b62-8950b3514109?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperationResults/9910a215-07e7-4ab3-b4e4-570b4463734d?api-version=2021-08-01 pragma: - no-cache server: @@ -4525,7 +4566,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14996' status: code: 202 message: Accepted @@ -4543,9 +4584,9 @@ interactions: ParameterSetName: - -g --policy-name --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/f59356ad-30a3-4cc3-9b62-8950b3514109?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/9910a215-07e7-4ab3-b4e4-570b4463734d?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -4557,7 +4598,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:21:23 GMT + - Wed, 11 May 2022 19:59:45 GMT expires: - '-1' pragma: @@ -4589,9 +4630,9 @@ interactions: ParameterSetName: - -g --policy-name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy/ruleCollectionGroups?api-version=2021-08-01 response: body: string: "{\r\n \"value\": []\r\n}" @@ -4603,7 +4644,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:21:24 GMT + - Wed, 11 May 2022 19:59:49 GMT expires: - '-1' pragma: @@ -4637,9 +4678,9 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: '' @@ -4649,7 +4690,7 @@ interactions: content-length: - '0' date: - - Wed, 21 Apr 2021 05:21:32 GMT + - Wed, 11 May 2022 19:59:57 GMT expires: - '-1' pragma: diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_update_premiumonlyproperty_issue.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_update_premiumonlyproperty_issue.yaml index 5b906be24fa..0444472469c 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_update_premiumonlyproperty_issue.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_update_premiumonlyproperty_issue.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n --sku --threat-intel-mode User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001","name":"test_azure_firewall_policy_update_premiumonlyproperty_issue000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T02:41:30Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001","name":"test_azure_firewall_policy_update_premiumonlyproperty_issue000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:56:39Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:56:40.6761478Z","CreationDate":"2022-05-11T19:56:40.6761080Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '433' + - '591' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 02:41:37 GMT + - Wed, 11 May 2022 19:56:42 GMT expires: - '-1' pragma: @@ -42,8 +42,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "eastus2euap", "properties": {"threatIntelMode": "Alert", - "sku": {"tier": "Standard"}}}' + body: '{"location": "westus2", "properties": {"threatIntelMode": "Alert", "sku": + {"tier": "Standard"}}}' headers: Accept: - application/json @@ -54,15 +54,15 @@ interactions: Connection: - keep-alive Content-Length: - - '100' + - '96' Content-Type: - application/json ParameterSetName: - -g -n --sku --threat-intel-mode User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -70,18 +70,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy\",\r\n \ \"name\": \"testpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"7b0e1fe4-19fb-406c-93d7-5be4d7d89aa8\",\r\n \"location\": \"eastus2euap\"\r\n}" + \ \"etag\": \"893e35d2-353f-4c96-9abf-28802b77c020\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/nfvOperations/9c5620e0-cbc2-42de-b097-3ac246c64960?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/a7423a1d-0ab6-42aa-b8b0-e3e7ca343fbf?api-version=2021-08-01 cache-control: - no-cache content-length: - - '593' + - '579' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 02:41:44 GMT + - Wed, 11 May 2022 19:56:52 GMT expires: - '-1' pragma: @@ -111,9 +111,9 @@ interactions: ParameterSetName: - -g -n --sku --threat-intel-mode User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/nfvOperations/9c5620e0-cbc2-42de-b097-3ac246c64960?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/a7423a1d-0ab6-42aa-b8b0-e3e7ca343fbf?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -125,7 +125,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 02:41:54 GMT + - Wed, 11 May 2022 19:57:02 GMT expires: - '-1' pragma: @@ -157,9 +157,9 @@ interactions: ParameterSetName: - -g -n --sku --threat-intel-mode User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -167,18 +167,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy\",\r\n \ \"name\": \"testpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"7b0e1fe4-19fb-406c-93d7-5be4d7d89aa8\",\r\n \"location\": \"eastus2euap\"\r\n}" + \ \"etag\": \"893e35d2-353f-4c96-9abf-28802b77c020\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '594' + - '580' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 02:41:55 GMT + - Wed, 11 May 2022 19:57:02 GMT etag: - - '"7b0e1fe4-19fb-406c-93d7-5be4d7d89aa8"' + - '"893e35d2-353f-4c96-9abf-28802b77c020"' expires: - '-1' pragma: @@ -210,9 +210,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -220,18 +220,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy\",\r\n \ \"name\": \"testpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"7b0e1fe4-19fb-406c-93d7-5be4d7d89aa8\",\r\n \"location\": \"eastus2euap\"\r\n}" + \ \"etag\": \"893e35d2-353f-4c96-9abf-28802b77c020\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '594' + - '580' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 02:41:58 GMT + - Wed, 11 May 2022 19:57:04 GMT etag: - - '"7b0e1fe4-19fb-406c-93d7-5be4d7d89aa8"' + - '"893e35d2-353f-4c96-9abf-28802b77c020"' expires: - '-1' pragma: @@ -251,8 +251,8 @@ interactions: message: OK - request: body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy", - "location": "eastus2euap", "properties": {"threatIntelMode": "Deny", "sku": - {"tier": "Standard"}}}' + "location": "westus2", "properties": {"threatIntelMode": "Deny", "sku": {"tier": + "Standard"}}}' headers: Accept: - application/json @@ -263,15 +263,15 @@ interactions: Connection: - keep-alive Content-Length: - - '307' + - '293' Content-Type: - application/json ParameterSetName: - -g -n --threat-intel-mode User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -279,18 +279,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy\",\r\n \ \"name\": \"testpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"6778a7ed-84da-45b8-ab7c-cb84b2ec965d\",\r\n \"location\": \"eastus2euap\"\r\n}" + \ \"etag\": \"8657516d-504b-4c47-b520-785100275f18\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/nfvOperations/2a527da0-a0af-4ab4-b2f9-a8eefc67e901?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/a77e5328-e674-44d9-95e9-bf06de32bf4a?api-version=2021-08-01 cache-control: - no-cache content-length: - - '592' + - '578' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 02:41:59 GMT + - Wed, 11 May 2022 19:57:05 GMT expires: - '-1' pragma: @@ -306,7 +306,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -324,9 +324,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/nfvOperations/2a527da0-a0af-4ab4-b2f9-a8eefc67e901?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/a77e5328-e674-44d9-95e9-bf06de32bf4a?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -338,7 +338,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 02:42:10 GMT + - Wed, 11 May 2022 19:57:15 GMT expires: - '-1' pragma: @@ -370,9 +370,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -380,18 +380,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_policy_update_premiumonlyproperty_issue000001/providers/Microsoft.Network/firewallPolicies/testpolicy\",\r\n \ \"name\": \"testpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"6778a7ed-84da-45b8-ab7c-cb84b2ec965d\",\r\n \"location\": \"eastus2euap\"\r\n}" + \ \"etag\": \"8657516d-504b-4c47-b520-785100275f18\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '593' + - '579' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 02:42:10 GMT + - Wed, 11 May 2022 19:57:17 GMT etag: - - '"6778a7ed-84da-45b8-ab7c-cb84b2ec965d"' + - '"8657516d-504b-4c47-b520-785100275f18"' expires: - '-1' pragma: diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_with_threat_intel_allowlist.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_with_threat_intel_allowlist.yaml index 3a94e8a749b..ad00b0fdd38 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_with_threat_intel_allowlist.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_policy_with_threat_intel_allowlist.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"location": "eastus2"}' + body: '{"location": "westus2"}' headers: Accept: - application/json @@ -15,11 +15,11 @@ interactions: Content-Type: - application/json ParameterSetName: - - -g -n -l + - -g -n --l User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -27,18 +27,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"09a4ace8-9513-40c1-8fea-fb6b7d04846f\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"3041123a-a010-4316-a3ff-91d1365439d1\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/5f71002e-e0a3-4c06-8c06-907266a75db2?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/836a2f2d-d4f9-4a15-a80e-d63384894e3a?api-version=2021-08-01 cache-control: - no-cache content-length: - - '591' + - '580' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:21 GMT + - Wed, 11 May 2022 19:57:02 GMT expires: - '-1' pragma: @@ -50,7 +50,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1198' status: code: 201 message: Created @@ -66,11 +66,11 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g -n -l + - -g -n --l User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/5f71002e-e0a3-4c06-8c06-907266a75db2?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/836a2f2d-d4f9-4a15-a80e-d63384894e3a?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -82,7 +82,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:31 GMT + - Wed, 11 May 2022 19:57:13 GMT expires: - '-1' pragma: @@ -112,11 +112,11 @@ interactions: Connection: - keep-alive ParameterSetName: - - -g -n -l + - -g -n --l User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -124,18 +124,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"09a4ace8-9513-40c1-8fea-fb6b7d04846f\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"3041123a-a010-4316-a3ff-91d1365439d1\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '592' + - '581' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:31 GMT + - Wed, 11 May 2022 19:57:13 GMT etag: - - '"09a4ace8-9513-40c1-8fea-fb6b7d04846f"' + - '"3041123a-a010-4316-a3ff-91d1365439d1"' expires: - '-1' pragma: @@ -167,9 +167,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --ip-addresses --fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -177,18 +177,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"09a4ace8-9513-40c1-8fea-fb6b7d04846f\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"3041123a-a010-4316-a3ff-91d1365439d1\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '592' + - '581' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:34 GMT + - Wed, 11 May 2022 19:57:18 GMT etag: - - '"09a4ace8-9513-40c1-8fea-fb6b7d04846f"' + - '"3041123a-a010-4316-a3ff-91d1365439d1"' expires: - '-1' pragma: @@ -208,7 +208,7 @@ interactions: message: OK - request: body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy", - "location": "eastus2", "properties": {"threatIntelMode": "Deny", "threatIntelWhitelist": + "location": "westus2", "properties": {"threatIntelMode": "Deny", "threatIntelWhitelist": {"ipAddresses": ["102.0.0.0", "102.0.0.1"], "fqdns": ["*.google.com"]}, "sku": {"tier": "Standard"}}}' headers: @@ -221,15 +221,15 @@ interactions: Connection: - keep-alive Content-Length: - - '400' + - '389' Content-Type: - application/json ParameterSetName: - -g -n --threat-intel-mode --ip-addresses --fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -239,18 +239,18 @@ interactions: \ \"childPolicies\": [],\r\n \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"781081ad-b081-4a01-bb27-2612d9cf2642\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"790f7af0-8885-44fc-8630-34e2ee08a891\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/b5ff114a-465e-441b-b99b-d2345f620599?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/b14e6319-1346-4204-9fbf-0b81ef2399f5?api-version=2021-08-01 cache-control: - no-cache content-length: - - '757' + - '746' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:37 GMT + - Wed, 11 May 2022 19:57:19 GMT expires: - '-1' pragma: @@ -284,9 +284,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --ip-addresses --fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/nfvOperations/b5ff114a-465e-441b-b99b-d2345f620599?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/b14e6319-1346-4204-9fbf-0b81ef2399f5?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -298,7 +298,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:47 GMT + - Wed, 11 May 2022 19:57:30 GMT expires: - '-1' pragma: @@ -330,9 +330,9 @@ interactions: ParameterSetName: - -g -n --threat-intel-mode --ip-addresses --fqdns User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -342,18 +342,18 @@ interactions: \ \"childPolicies\": [],\r\n \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_policy_with_threat_intel_allowlist000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"781081ad-b081-4a01-bb27-2612d9cf2642\",\r\n \"location\": \"eastus2\"\r\n}" + \ \"etag\": \"790f7af0-8885-44fc-8630-34e2ee08a891\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '758' + - '747' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:17:47 GMT + - Wed, 11 May 2022 19:57:33 GMT etag: - - '"781081ad-b081-4a01-bb27-2612d9cf2642"' + - '"790f7af0-8885-44fc-8630-34e2ee08a891"' expires: - '-1' pragma: diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_rules.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_rules.yaml index 1b6042f0d3f..cb62b991f8f 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_rules.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_rules.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_rules000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001","name":"cli_test_azure_firewall_rules000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:50:46Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001","name":"cli_test_azure_firewall_rules000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:59:26Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:59:27.2127460Z","CreationDate":"2022-05-11T19:59:27.2126159Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '530' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:50:50 GMT + - Wed, 11 May 2022 19:59:29 GMT expires: - '-1' pragma: @@ -59,13 +59,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"7a516b6a-6e54-4005-ad60-9dd84a0d99a5\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"72e4f4e7-a814-41c9-981d-6cfd9abb278e\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -76,15 +76,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61be992f-e4c4-4c2e-a448-6143054fe496?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d31c8f44-7ea9-4656-bbee-8ff13e65fd78?api-version=2021-08-01 cache-control: - no-cache content-length: - - '690' + - '650' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:50:59 GMT + - Wed, 11 May 2022 19:59:34 GMT expires: - '-1' pragma: @@ -97,9 +97,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e187712c-4f50-497b-9094-3210f8ae95d0 + - 6bbd674e-b0cd-4655-a4d3-1be778741670 x-ms-ratelimit-remaining-subscription-writes: - - '1193' + - '1195' status: code: 201 message: Created @@ -117,9 +117,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61be992f-e4c4-4c2e-a448-6143054fe496?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d31c8f44-7ea9-4656-bbee-8ff13e65fd78?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -131,7 +131,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:09 GMT + - Wed, 11 May 2022 19:59:44 GMT expires: - '-1' pragma: @@ -148,7 +148,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c7dc8516-0851-486e-a880-5d5dd381477e + - ffe40f53-1d28-49ce-8816-e443f8b4a82f status: code: 200 message: OK @@ -166,13 +166,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"8cfd22ce-3116-4a0d-9c08-46af861fe214\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"19a75cfe-0452-4cd4-8d77-206beed24619\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -183,13 +183,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '651' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:09 GMT + - Wed, 11 May 2022 19:59:45 GMT etag: - - W/"8cfd22ce-3116-4a0d-9c08-46af861fe214" + - W/"19a75cfe-0452-4cd4-8d77-206beed24619" expires: - '-1' pragma: @@ -206,7 +206,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 715f3247-026b-49e9-b2c1-3ff7d9a28dbf + - 5d586c1b-a646-415c-a5dc-beb9f29f53d2 status: code: 200 message: OK @@ -225,13 +225,13 @@ interactions: - -g -n -c --priority --action -f --source-addresses --protocols --destination-fqdns --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"8cfd22ce-3116-4a0d-9c08-46af861fe214\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"19a75cfe-0452-4cd4-8d77-206beed24619\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -242,13 +242,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '651' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:11 GMT + - Wed, 11 May 2022 19:59:45 GMT etag: - - W/"8cfd22ce-3116-4a0d-9c08-46af861fe214" + - W/"19a75cfe-0452-4cd4-8d77-206beed24619" expires: - '-1' pragma: @@ -265,7 +265,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d56778f5-7455-483f-994f-cf9558c7993b + - 74440dcc-c8fc-44e3-b6ea-5b7c3eae01be status: code: 200 message: OK @@ -288,27 +288,27 @@ interactions: Connection: - keep-alive Content-Length: - - '726' + - '686' Content-Type: - application/json ParameterSetName: - -g -n -c --priority --action -f --source-addresses --protocols --destination-fqdns --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"34a0556e-f636-4c41-8c1c-0c5df7f2e5ad\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"0d1fcb6e-9cd7-4656-9a12-5a3ff5206f0f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"34a0556e-f636-4c41-8c1c-0c5df7f2e5ad\\\"\",\r\n + \ \"etag\": \"W/\\\"0d1fcb6e-9cd7-4656-9a12-5a3ff5206f0f\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -327,15 +327,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f4bc7a4c-2ddf-40ab-98a3-b997804120f7?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/72fdc097-fcd0-4e80-a575-249edd3626e5?api-version=2021-08-01 cache-control: - no-cache content-length: - - '1913' + - '1833' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:12 GMT + - Wed, 11 May 2022 19:59:47 GMT expires: - '-1' pragma: @@ -352,9 +352,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6187e7d5-8d21-4cbd-b018-568cd21ce47f + - e3094ecb-8ca0-4920-9776-983307da4912 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' status: code: 200 message: OK @@ -373,9 +373,9 @@ interactions: - -g -n -c --priority --action -f --source-addresses --protocols --destination-fqdns --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f4bc7a4c-2ddf-40ab-98a3-b997804120f7?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/72fdc097-fcd0-4e80-a575-249edd3626e5?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -387,7 +387,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:22 GMT + - Wed, 11 May 2022 19:59:56 GMT expires: - '-1' pragma: @@ -404,7 +404,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d170ada0-57e7-4f1f-8fae-93037ac79aae + - 140cd5e4-8a0a-46da-97e2-6c10823b988b status: code: 200 message: OK @@ -423,20 +423,20 @@ interactions: - -g -n -c --priority --action -f --source-addresses --protocols --destination-fqdns --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"8240c945-7d11-4c98-b9c8-5f38a6a6d1fc\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"6e5072c3-52ca-49e3-a0d2-2fef476b443b\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"8240c945-7d11-4c98-b9c8-5f38a6a6d1fc\\\"\",\r\n + \ \"etag\": \"W/\\\"6e5072c3-52ca-49e3-a0d2-2fef476b443b\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -455,13 +455,13 @@ interactions: cache-control: - no-cache content-length: - - '1915' + - '1835' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:22 GMT + - Wed, 11 May 2022 19:59:58 GMT etag: - - W/"8240c945-7d11-4c98-b9c8-5f38a6a6d1fc" + - W/"6e5072c3-52ca-49e3-a0d2-2fef476b443b" expires: - '-1' pragma: @@ -478,7 +478,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 25256913-d948-44e3-a310-270a5ce97c89 + - fd14ee02-71e8-4304-8b22-6a0035c35c2f status: code: 200 message: OK @@ -497,20 +497,20 @@ interactions: - -g -n -c --priority --action -f --source-addresses --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"8240c945-7d11-4c98-b9c8-5f38a6a6d1fc\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"6e5072c3-52ca-49e3-a0d2-2fef476b443b\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"8240c945-7d11-4c98-b9c8-5f38a6a6d1fc\\\"\",\r\n + \ \"etag\": \"W/\\\"6e5072c3-52ca-49e3-a0d2-2fef476b443b\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -529,13 +529,13 @@ interactions: cache-control: - no-cache content-length: - - '1915' + - '1835' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:24 GMT + - Wed, 11 May 2022 20:00:01 GMT etag: - - W/"8240c945-7d11-4c98-b9c8-5f38a6a6d1fc" + - W/"6e5072c3-52ca-49e3-a0d2-2fef476b443b" expires: - '-1' pragma: @@ -552,7 +552,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 042dee1d-fd9b-460c-9fa0-b71667d74e9a + - a2d26224-4197-4363-abc1-fb0026893af9 status: code: 200 message: OK @@ -580,27 +580,27 @@ interactions: Connection: - keep-alive Content-Length: - - '1358' + - '1278' Content-Type: - application/json ParameterSetName: - -g -n -c --priority --action -f --source-addresses --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"626c7ff4-975f-41d3-b8c6-0657dc1d3c30\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"02cae13b-6c37-48a5-a94b-2a29a55221d5\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"626c7ff4-975f-41d3-b8c6-0657dc1d3c30\\\"\",\r\n + \ \"etag\": \"W/\\\"02cae13b-6c37-48a5-a94b-2a29a55221d5\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -615,7 +615,7 @@ interactions: \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n }\r\n \ ],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"626c7ff4-975f-41d3-b8c6-0657dc1d3c30\\\"\",\r\n + \ \"etag\": \"W/\\\"02cae13b-6c37-48a5-a94b-2a29a55221d5\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -633,15 +633,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9addfe40-887c-487a-9dfa-e9d09966defa?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a63bbbba-e8d0-4318-b1bd-4f4ec0988885?api-version=2021-08-01 cache-control: - no-cache content-length: - - '3116' + - '2996' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:24 GMT + - Wed, 11 May 2022 20:00:02 GMT expires: - '-1' pragma: @@ -658,9 +658,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 98a853f3-a0f3-430b-a22d-3295b7b87b3f + - 18a496b6-53e1-4ac7-932d-ba887a4e8f06 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -679,9 +679,9 @@ interactions: - -g -n -c --priority --action -f --source-addresses --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9addfe40-887c-487a-9dfa-e9d09966defa?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a63bbbba-e8d0-4318-b1bd-4f4ec0988885?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -693,7 +693,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:35 GMT + - Wed, 11 May 2022 20:00:13 GMT expires: - '-1' pragma: @@ -710,7 +710,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1d15dc76-e27a-4738-83fa-7a79fc8dd4af + - 92284560-52ad-4849-aecb-4e1b7ae85e99 status: code: 200 message: OK @@ -729,20 +729,20 @@ interactions: - -g -n -c --priority --action -f --source-addresses --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"7b676c85-f529-427a-96f8-06293c9c2bf7\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"11e7d303-8d99-4264-b5f8-344140d875f5\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"7b676c85-f529-427a-96f8-06293c9c2bf7\\\"\",\r\n + \ \"etag\": \"W/\\\"11e7d303-8d99-4264-b5f8-344140d875f5\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -757,7 +757,7 @@ interactions: \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n }\r\n \ ],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"7b676c85-f529-427a-96f8-06293c9c2bf7\\\"\",\r\n + \ \"etag\": \"W/\\\"11e7d303-8d99-4264-b5f8-344140d875f5\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -775,13 +775,13 @@ interactions: cache-control: - no-cache content-length: - - '3119' + - '2999' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:35 GMT + - Wed, 11 May 2022 20:00:14 GMT etag: - - W/"7b676c85-f529-427a-96f8-06293c9c2bf7" + - W/"11e7d303-8d99-4264-b5f8-344140d875f5" expires: - '-1' pragma: @@ -798,7 +798,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 168e50de-1e19-4936-9d74-fc599434a8da + - 1e481129-6332-45d4-a89f-5a4da28d2fa8 status: code: 200 message: OK @@ -818,9 +818,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: '' @@ -828,17 +828,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/524470b2-f47e-4e01-b072-48776195ec1c?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/6092d908-acc6-45f0-b1e3-b122e41d29ed?api-version=2021-08-01 cache-control: - no-cache content-length: - '0' date: - - Mon, 02 Aug 2021 02:51:38 GMT + - Wed, 11 May 2022 20:00:16 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/524470b2-f47e-4e01-b072-48776195ec1c?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/6092d908-acc6-45f0-b1e3-b122e41d29ed?api-version=2021-08-01 pragma: - no-cache server: @@ -849,9 +849,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e97db567-f3e4-4396-9e4a-0f571fced0f6 + - 643109bb-f7d1-4ed9-bc63-67f5a4d7448c x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14997' status: code: 202 message: Accepted @@ -869,9 +869,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/524470b2-f47e-4e01-b072-48776195ec1c?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/6092d908-acc6-45f0-b1e3-b122e41d29ed?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -883,7 +883,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:51:48 GMT + - Wed, 11 May 2022 20:00:27 GMT expires: - '-1' pragma: @@ -900,7 +900,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - effea24c-1b69-49e4-b02e-e9fa7472d5c8 + - 6abccf25-5d1a-44b2-99cf-8bf88b3b6c3c status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_rules_with_ipgroups.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_rules_with_ipgroups.yaml index 6f87a69dad6..b8d127a8999 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_rules_with_ipgroups.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_rules_with_ipgroups.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_rules_with_ipgroups000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001","name":"cli_test_azure_firewall_rules_with_ipgroups000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:40:22Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001","name":"cli_test_azure_firewall_rules_with_ipgroups000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:56:31Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:56:31.4629777Z","CreationDate":"2022-05-11T19:56:31.4629509Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '558' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:25 GMT + - Wed, 11 May 2022 19:56:34 GMT expires: - '-1' pragma: @@ -59,8 +59,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 accept-language: - en-US method: PUT @@ -71,18 +71,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.0\",\r\n \"10.0.0.1\"\r\n \ ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/ipGroups/sourceipgroup\",\r\n \ \"name\": \"sourceipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"9d967411-0573-4deb-adf7-e157e68cf950\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"36bba638-5a0c-43bf-9a6e-4b4b23922941\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/9f123a65-9b20-4e72-9dff-3a51a9fa01d6?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/66e94ee5-2028-4b9f-ba2a-379b823b29af?api-version=2019-09-01 cache-control: - no-cache content-length: - - '534' + - '508' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:35 GMT + - Wed, 11 May 2022 19:56:43 GMT expires: - '-1' pragma: @@ -94,7 +94,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1196' status: code: 201 message: Created @@ -112,10 +112,10 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/9f123a65-9b20-4e72-9dff-3a51a9fa01d6?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/66e94ee5-2028-4b9f-ba2a-379b823b29af?api-version=2019-09-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -127,7 +127,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:47 GMT + - Wed, 11 May 2022 19:56:55 GMT expires: - '-1' pragma: @@ -159,8 +159,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/ipGroups/sourceipgroup?api-version=2019-09-01 response: @@ -169,18 +169,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.0\",\r\n \"10.0.0.1\"\r\n \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/ipGroups/sourceipgroup\",\r\n \ \"name\": \"sourceipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"9d967411-0573-4deb-adf7-e157e68cf950\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"36bba638-5a0c-43bf-9a6e-4b4b23922941\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '535' + - '509' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:48 GMT + - Wed, 11 May 2022 19:56:58 GMT etag: - - '"9d967411-0573-4deb-adf7-e157e68cf950"' + - '"36bba638-5a0c-43bf-9a6e-4b4b23922941"' expires: - '-1' pragma: @@ -212,21 +212,21 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_rules_with_ipgroups000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001","name":"cli_test_azure_firewall_rules_with_ipgroups000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:40:22Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001","name":"cli_test_azure_firewall_rules_with_ipgroups000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:56:31Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:56:31.4629777Z","CreationDate":"2022-05-11T19:56:31.4629509Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '558' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:50 GMT + - Wed, 11 May 2022 19:56:58 GMT expires: - '-1' pragma: @@ -258,8 +258,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 accept-language: - en-US method: PUT @@ -270,18 +270,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.2\",\r\n \"10.0.0.3\"\r\n \ ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/ipGroups/destinationipgroup\",\r\n \ \"name\": \"destinationipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"7bfc77e7-b439-412d-93b9-b100b47758a2\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"5017f981-a6f9-4498-8936-88149233b1c7\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/de5974d3-28b7-4f4b-ba3d-707c369345d7?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/98f04c21-817f-42d0-ad2b-4e2532cfce84?api-version=2019-09-01 cache-control: - no-cache content-length: - - '544' + - '518' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:40:58 GMT + - Wed, 11 May 2022 19:57:06 GMT expires: - '-1' pragma: @@ -311,10 +311,10 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/de5974d3-28b7-4f4b-ba3d-707c369345d7?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/98f04c21-817f-42d0-ad2b-4e2532cfce84?api-version=2019-09-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -326,7 +326,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:11 GMT + - Wed, 11 May 2022 19:57:17 GMT expires: - '-1' pragma: @@ -358,8 +358,8 @@ interactions: ParameterSetName: - -n -g --ip-addresses User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.26.1 + - python/3.10.4 (Windows-10-10.0.22000-SP0) msrest/0.6.21 msrest_azure/0.6.4 + azure-mgmt-network/7.0.0 Azure-SDK-For-Python AZURECLI/2.35.0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/ipGroups/destinationipgroup?api-version=2019-09-01 response: @@ -368,18 +368,18 @@ interactions: [],\r\n \"ipAddresses\": [\r\n \"10.0.0.2\",\r\n \"10.0.0.3\"\r\n \ ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/ipGroups/destinationipgroup\",\r\n \ \"name\": \"destinationipgroup\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n - \ \"etag\": \"7bfc77e7-b439-412d-93b9-b100b47758a2\",\r\n \"location\": \"westus\"\r\n}" + \ \"etag\": \"5017f981-a6f9-4498-8936-88149233b1c7\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache content-length: - - '545' + - '519' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:13 GMT + - Wed, 11 May 2022 19:57:19 GMT etag: - - '"7bfc77e7-b439-412d-93b9-b100b47758a2"' + - '"5017f981-a6f9-4498-8936-88149233b1c7"' expires: - '-1' pragma: @@ -411,21 +411,21 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_rules_with_ipgroups000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001","name":"cli_test_azure_firewall_rules_with_ipgroups000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:40:22Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001","name":"cli_test_azure_firewall_rules_with_ipgroups000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:56:31Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:56:31.4629777Z","CreationDate":"2022-05-11T19:56:31.4629509Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '558' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:13 GMT + - Wed, 11 May 2022 19:57:20 GMT expires: - '-1' pragma: @@ -457,13 +457,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"14e87664-0f87-434d-8a64-a0bc6e88c87e\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"ca65bb90-dce0-42a6-ac55-dc09b5db39bb\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -474,15 +474,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/649659d8-d9c5-46e5-9f3f-d74e5180d7ff?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1bb29212-ca56-4c8e-964f-f15fe5895f68?api-version=2021-08-01 cache-control: - no-cache content-length: - - '690' + - '664' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:21 GMT + - Wed, 11 May 2022 19:57:30 GMT expires: - '-1' pragma: @@ -495,7 +495,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 07ac5c0c-0d3e-44e6-9a47-455b69c4fdac + - a2613c1e-a58f-4c04-9a94-f6f701e24bd8 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -515,9 +515,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/649659d8-d9c5-46e5-9f3f-d74e5180d7ff?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1bb29212-ca56-4c8e-964f-f15fe5895f68?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -529,7 +529,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:32 GMT + - Wed, 11 May 2022 19:57:40 GMT expires: - '-1' pragma: @@ -546,7 +546,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b6f0d1b6-fa2d-41f8-9d97-c6c33b068df9 + - 72f0707c-2173-46b2-83e6-d733dcacf69c status: code: 200 message: OK @@ -564,13 +564,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"a5ba9c31-639c-4fac-804a-72044c30270c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"db25eed1-49ba-4a35-b78d-a704f0e6865c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -581,13 +581,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '665' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:32 GMT + - Wed, 11 May 2022 19:57:41 GMT etag: - - W/"a5ba9c31-639c-4fac-804a-72044c30270c" + - W/"db25eed1-49ba-4a35-b78d-a704f0e6865c" expires: - '-1' pragma: @@ -604,7 +604,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1d901874-3f8e-4816-a9ee-1dbc65a49da3 + - d804cab6-288c-41e4-a43a-5fc256f899f7 status: code: 200 message: OK @@ -623,13 +623,13 @@ interactions: - -g -n -c --priority --action -f --source-ip-group --protocols --destination-ip-groups --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"a5ba9c31-639c-4fac-804a-72044c30270c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"db25eed1-49ba-4a35-b78d-a704f0e6865c\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -640,13 +640,13 @@ interactions: cache-control: - no-cache content-length: - - '691' + - '665' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:34 GMT + - Wed, 11 May 2022 19:57:42 GMT etag: - - W/"a5ba9c31-639c-4fac-804a-72044c30270c" + - W/"db25eed1-49ba-4a35-b78d-a704f0e6865c" expires: - '-1' pragma: @@ -663,7 +663,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - aa3720ba-4106-414b-aa5a-9f9be17668da + - c2431def-1526-4313-a6ce-6bb0372770b1 status: code: 200 message: OK @@ -686,27 +686,27 @@ interactions: Connection: - keep-alive Content-Length: - - '1083' + - '1005' Content-Type: - application/json ParameterSetName: - -g -n -c --priority --action -f --source-ip-group --protocols --destination-ip-groups --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"40a795d3-2aae-4d43-a609-36682fd48011\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"0490fbae-138c-4821-bf46-19b47d26dec3\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"40a795d3-2aae-4d43-a609-36682fd48011\\\"\",\r\n + \ \"etag\": \"W/\\\"0490fbae-138c-4821-bf46-19b47d26dec3\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -724,15 +724,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d3445524-7a72-4c9d-b61f-ab990f0e863b?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/00e79441-feed-4378-b914-43bb3fa79ee8?api-version=2021-08-01 cache-control: - no-cache content-length: - - '2251' + - '2147' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:36 GMT + - Wed, 11 May 2022 19:57:44 GMT expires: - '-1' pragma: @@ -749,9 +749,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4241621d-f8ea-43bb-b2a6-2e304e903546 + - 9bd487b9-1765-4669-84e2-4bf07896d2f3 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -770,9 +770,9 @@ interactions: - -g -n -c --priority --action -f --source-ip-group --protocols --destination-ip-groups --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d3445524-7a72-4c9d-b61f-ab990f0e863b?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/00e79441-feed-4378-b914-43bb3fa79ee8?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -784,7 +784,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:46 GMT + - Wed, 11 May 2022 19:57:54 GMT expires: - '-1' pragma: @@ -801,7 +801,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 95d5eecb-20c2-42c3-862f-a2c975185a78 + - 7f3bd54c-e6fb-4dcf-a155-c5e8f43a4035 status: code: 200 message: OK @@ -820,20 +820,20 @@ interactions: - -g -n -c --priority --action -f --source-ip-group --protocols --destination-ip-groups --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"11d42b1c-19bc-4652-842d-99e4893b2769\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"2e3f0a38-d994-486a-a733-ca04be653e00\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"11d42b1c-19bc-4652-842d-99e4893b2769\\\"\",\r\n + \ \"etag\": \"W/\\\"2e3f0a38-d994-486a-a733-ca04be653e00\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -851,13 +851,13 @@ interactions: cache-control: - no-cache content-length: - - '2253' + - '2149' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:47 GMT + - Wed, 11 May 2022 19:57:55 GMT etag: - - W/"11d42b1c-19bc-4652-842d-99e4893b2769" + - W/"2e3f0a38-d994-486a-a733-ca04be653e00" expires: - '-1' pragma: @@ -874,7 +874,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d81aa5ce-686b-41d4-a22a-083a60c52820 + - ac598060-de8a-4ed0-8994-5f56a07c70d6 status: code: 200 message: OK @@ -892,20 +892,20 @@ interactions: ParameterSetName: - -g -n -c -f --source-addresses --protocols --destination-ip-groups --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"11d42b1c-19bc-4652-842d-99e4893b2769\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"2e3f0a38-d994-486a-a733-ca04be653e00\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"11d42b1c-19bc-4652-842d-99e4893b2769\\\"\",\r\n + \ \"etag\": \"W/\\\"2e3f0a38-d994-486a-a733-ca04be653e00\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -923,13 +923,13 @@ interactions: cache-control: - no-cache content-length: - - '2253' + - '2149' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:49 GMT + - Wed, 11 May 2022 19:57:58 GMT etag: - - W/"11d42b1c-19bc-4652-842d-99e4893b2769" + - W/"2e3f0a38-d994-486a-a733-ca04be653e00" expires: - '-1' pragma: @@ -946,7 +946,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 715a8426-b5e8-4a13-89bf-8b6b4585c228 + - a0081a94-bb28-47d3-90b1-687d5a24c9a8 status: code: 200 message: OK @@ -973,26 +973,26 @@ interactions: Connection: - keep-alive Content-Length: - - '1744' + - '1614' Content-Type: - application/json ParameterSetName: - -g -n -c -f --source-addresses --protocols --destination-ip-groups --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"82535311-fd10-42a1-927d-bb3f7bec17ef\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"4d4e18c8-7b7d-4fbc-be52-023d259b87c8\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"82535311-fd10-42a1-927d-bb3f7bec17ef\\\"\",\r\n + \ \"etag\": \"W/\\\"4d4e18c8-7b7d-4fbc-be52-023d259b87c8\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1018,15 +1018,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/475ba854-c5ee-43c2-8acb-2ab25756787c?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3337e50b-335a-4e63-a13f-47d761056106?api-version=2021-08-01 cache-control: - no-cache content-length: - - '3003' + - '2873' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:41:50 GMT + - Wed, 11 May 2022 19:57:59 GMT expires: - '-1' pragma: @@ -1043,9 +1043,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a1af3d91-8dfa-4f70-9a2a-08fed2b5c74f + - fcdd1a89-6435-480b-8ff9-0cf6464c2ef9 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 200 message: OK @@ -1063,9 +1063,9 @@ interactions: ParameterSetName: - -g -n -c -f --source-addresses --protocols --destination-ip-groups --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/475ba854-c5ee-43c2-8acb-2ab25756787c?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3337e50b-335a-4e63-a13f-47d761056106?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1077,7 +1077,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:00 GMT + - Wed, 11 May 2022 19:58:09 GMT expires: - '-1' pragma: @@ -1094,7 +1094,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7c6e0d11-b3b8-41e3-9b9c-c86356816dc8 + - 8dfad3f6-d4d0-42c0-a6f9-2d10c4a21079 status: code: 200 message: OK @@ -1112,20 +1112,20 @@ interactions: ParameterSetName: - -g -n -c -f --source-addresses --protocols --destination-ip-groups --destination-ports User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"ba247b9f-ab24-4fb9-9833-5fda62bdd207\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"23fb0a43-1697-4b05-b57c-5d9ad30b5ced\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"ba247b9f-ab24-4fb9-9833-5fda62bdd207\\\"\",\r\n + \ \"etag\": \"W/\\\"23fb0a43-1697-4b05-b57c-5d9ad30b5ced\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1151,13 +1151,13 @@ interactions: cache-control: - no-cache content-length: - - '3005' + - '2875' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:00 GMT + - Wed, 11 May 2022 19:58:10 GMT etag: - - W/"ba247b9f-ab24-4fb9-9833-5fda62bdd207" + - W/"23fb0a43-1697-4b05-b57c-5d9ad30b5ced" expires: - '-1' pragma: @@ -1174,7 +1174,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b97786ac-744f-4bbc-8d23-8d936eaba758 + - a4f0a934-1079-426d-b4fd-19cdf56a76ab status: code: 200 message: OK @@ -1193,20 +1193,20 @@ interactions: - -g -n -c --priority --action -f --source-ip-group --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port --source-ip-groups User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"ba247b9f-ab24-4fb9-9833-5fda62bdd207\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"23fb0a43-1697-4b05-b57c-5d9ad30b5ced\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"ba247b9f-ab24-4fb9-9833-5fda62bdd207\\\"\",\r\n + \ \"etag\": \"W/\\\"23fb0a43-1697-4b05-b57c-5d9ad30b5ced\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1232,13 +1232,13 @@ interactions: cache-control: - no-cache content-length: - - '3005' + - '2875' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:02 GMT + - Wed, 11 May 2022 19:58:14 GMT etag: - - W/"ba247b9f-ab24-4fb9-9833-5fda62bdd207" + - W/"23fb0a43-1697-4b05-b57c-5d9ad30b5ced" expires: - '-1' pragma: @@ -1255,7 +1255,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f6f26929-749a-47b7-bc99-ccd2cd4b5a4a + - b4ad9421-556a-45e1-ac35-05d26e26b5e5 status: code: 200 message: OK @@ -1287,27 +1287,27 @@ interactions: Connection: - keep-alive Content-Length: - - '2315' + - '2159' Content-Type: - application/json ParameterSetName: - -g -n -c --priority --action -f --source-ip-group --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port --source-ip-groups User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d13caab8-1fd7-4d65-95a4-5305d0c95f40\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"7059333b-1408-4cd1-9c84-a827b6850248\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"d13caab8-1fd7-4d65-95a4-5305d0c95f40\\\"\",\r\n + \ \"etag\": \"W/\\\"7059333b-1408-4cd1-9c84-a827b6850248\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1329,7 +1329,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"d13caab8-1fd7-4d65-95a4-5305d0c95f40\\\"\",\r\n + \ \"etag\": \"W/\\\"7059333b-1408-4cd1-9c84-a827b6850248\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1347,15 +1347,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1dec2326-b563-459c-9a26-c4ce7aac351e?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9e5895d5-1228-4a65-a53e-ce20fae93f3c?api-version=2021-08-01 cache-control: - no-cache content-length: - - '4358' + - '4176' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:02 GMT + - Wed, 11 May 2022 19:58:15 GMT expires: - '-1' pragma: @@ -1372,9 +1372,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f3a79637-d3c2-49b6-a4a2-86b388c3735e + - 69e0e9ff-48c2-432d-be72-92f79d29b0ab x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -1393,9 +1393,9 @@ interactions: - -g -n -c --priority --action -f --source-ip-group --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port --source-ip-groups User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1dec2326-b563-459c-9a26-c4ce7aac351e?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9e5895d5-1228-4a65-a53e-ce20fae93f3c?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1407,7 +1407,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:13 GMT + - Wed, 11 May 2022 19:58:25 GMT expires: - '-1' pragma: @@ -1424,7 +1424,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 72f52654-1bd3-444c-b5a3-d7e370498ce6 + - 0f6c2581-0b3b-46f0-ad4e-85a062a87e71 status: code: 200 message: OK @@ -1443,20 +1443,20 @@ interactions: - -g -n -c --priority --action -f --source-ip-group --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port --source-ip-groups User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"52020d10-f15e-4b88-9f35-410f0532447c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"7fe80a8d-449d-4761-9709-4e8e1a11fdf4\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"52020d10-f15e-4b88-9f35-410f0532447c\\\"\",\r\n + \ \"etag\": \"W/\\\"7fe80a8d-449d-4761-9709-4e8e1a11fdf4\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1478,7 +1478,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"52020d10-f15e-4b88-9f35-410f0532447c\\\"\",\r\n + \ \"etag\": \"W/\\\"7fe80a8d-449d-4761-9709-4e8e1a11fdf4\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1496,13 +1496,13 @@ interactions: cache-control: - no-cache content-length: - - '4361' + - '4179' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:13 GMT + - Wed, 11 May 2022 19:58:26 GMT etag: - - W/"52020d10-f15e-4b88-9f35-410f0532447c" + - W/"7fe80a8d-449d-4761-9709-4e8e1a11fdf4" expires: - '-1' pragma: @@ -1519,7 +1519,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 260745d0-e02f-4d5f-9614-ee08d27eaabd + - 77139d91-cf38-4b04-8d11-96ca01be0976 status: code: 200 message: OK @@ -1538,20 +1538,20 @@ interactions: - -g -n -c -f --source-addresses --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port --source-ip-groups User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"52020d10-f15e-4b88-9f35-410f0532447c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"7fe80a8d-449d-4761-9709-4e8e1a11fdf4\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"52020d10-f15e-4b88-9f35-410f0532447c\\\"\",\r\n + \ \"etag\": \"W/\\\"7fe80a8d-449d-4761-9709-4e8e1a11fdf4\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1573,7 +1573,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"52020d10-f15e-4b88-9f35-410f0532447c\\\"\",\r\n + \ \"etag\": \"W/\\\"7fe80a8d-449d-4761-9709-4e8e1a11fdf4\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1591,13 +1591,13 @@ interactions: cache-control: - no-cache content-length: - - '4361' + - '4179' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:14 GMT + - Wed, 11 May 2022 19:58:28 GMT etag: - - W/"52020d10-f15e-4b88-9f35-410f0532447c" + - W/"7fe80a8d-449d-4761-9709-4e8e1a11fdf4" expires: - '-1' pragma: @@ -1614,7 +1614,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3f3cfe21-6dc2-402d-9174-a3b081deea38 + - 6ec5ed4d-e167-4e79-a3cd-c962f011ec05 status: code: 200 message: OK @@ -1650,27 +1650,27 @@ interactions: Connection: - keep-alive Content-Length: - - '3017' + - '2809' Content-Type: - application/json ParameterSetName: - -g -n -c -f --source-addresses --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port --source-ip-groups User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"9316d0e9-8164-4cb4-b404-5afdd2338dcb\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"e6006f96-b586-4d01-b567-ff73cb614ab8\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"9316d0e9-8164-4cb4-b404-5afdd2338dcb\\\"\",\r\n + \ \"etag\": \"W/\\\"e6006f96-b586-4d01-b567-ff73cb614ab8\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1692,7 +1692,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"9316d0e9-8164-4cb4-b404-5afdd2338dcb\\\"\",\r\n + \ \"etag\": \"W/\\\"e6006f96-b586-4d01-b567-ff73cb614ab8\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1719,15 +1719,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/92c959de-9d1f-45f4-98aa-5adda6b1e219?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/144b0460-ff00-41f3-b904-cf073bc2d88c?api-version=2021-08-01 cache-control: - no-cache content-length: - - '5167' + - '4959' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:15 GMT + - Wed, 11 May 2022 19:58:29 GMT expires: - '-1' pragma: @@ -1744,9 +1744,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 40786f20-379a-4eee-adfe-18712cdda7d1 + - 37eda496-b5f3-48fc-86da-e23ca279c266 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1195' status: code: 200 message: OK @@ -1765,9 +1765,9 @@ interactions: - -g -n -c -f --source-addresses --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port --source-ip-groups User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/92c959de-9d1f-45f4-98aa-5adda6b1e219?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/144b0460-ff00-41f3-b904-cf073bc2d88c?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1779,7 +1779,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:25 GMT + - Wed, 11 May 2022 19:58:39 GMT expires: - '-1' pragma: @@ -1796,7 +1796,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c3158da9-fdb2-4a35-a324-28a55ed4c94f + - e5ba2474-1cd6-48a9-bdb2-19ac170f6636 status: code: 200 message: OK @@ -1815,20 +1815,20 @@ interactions: - -g -n -c -f --source-addresses --protocols --translated-fqdn --destination-ports --destination-addresses --translated-port --source-ip-groups User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"3c4b7766-d133-42df-8d88-1116e04f30f0\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"ecda9e1f-eff9-46c3-b396-366b238eb6ae\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"3c4b7766-d133-42df-8d88-1116e04f30f0\\\"\",\r\n + \ \"etag\": \"W/\\\"ecda9e1f-eff9-46c3-b396-366b238eb6ae\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1850,7 +1850,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"3c4b7766-d133-42df-8d88-1116e04f30f0\\\"\",\r\n + \ \"etag\": \"W/\\\"ecda9e1f-eff9-46c3-b396-366b238eb6ae\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1877,13 +1877,13 @@ interactions: cache-control: - no-cache content-length: - - '5170' + - '4962' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:26 GMT + - Wed, 11 May 2022 19:58:40 GMT etag: - - W/"3c4b7766-d133-42df-8d88-1116e04f30f0" + - W/"ecda9e1f-eff9-46c3-b396-366b238eb6ae" expires: - '-1' pragma: @@ -1900,7 +1900,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6989301a-5532-487c-b4de-d8e3f0dc4c56 + - fde16f2c-1d59-45ef-a5b3-94b5290533ec status: code: 200 message: OK @@ -1918,20 +1918,20 @@ interactions: ParameterSetName: - -f -n --protocols -g -c --priority --action --source-ip-groups --target-fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"3c4b7766-d133-42df-8d88-1116e04f30f0\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"ecda9e1f-eff9-46c3-b396-366b238eb6ae\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"3c4b7766-d133-42df-8d88-1116e04f30f0\\\"\",\r\n + \ \"etag\": \"W/\\\"ecda9e1f-eff9-46c3-b396-366b238eb6ae\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1953,7 +1953,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"3c4b7766-d133-42df-8d88-1116e04f30f0\\\"\",\r\n + \ \"etag\": \"W/\\\"ecda9e1f-eff9-46c3-b396-366b238eb6ae\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -1980,13 +1980,13 @@ interactions: cache-control: - no-cache content-length: - - '5170' + - '4962' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:28 GMT + - Wed, 11 May 2022 19:58:42 GMT etag: - - W/"3c4b7766-d133-42df-8d88-1116e04f30f0" + - W/"ecda9e1f-eff9-46c3-b396-366b238eb6ae" expires: - '-1' pragma: @@ -2003,7 +2003,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6dd5e1f9-1b92-479a-9106-04b2972a26a4 + - 12863c28-229c-42bc-aabf-db8da73e48d9 status: code: 200 message: OK @@ -2043,26 +2043,26 @@ interactions: Connection: - keep-alive Content-Length: - - '3474' + - '3240' Content-Type: - application/json ParameterSetName: - -f -n --protocols -g -c --priority --action --source-ip-groups --target-fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"f2fb9a37-9f43-4cbe-802a-d0a2a35f4e91\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"9ddce558-980b-496b-a30e-df6ed75343ea\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"f2fb9a37-9f43-4cbe-802a-d0a2a35f4e91\\\"\",\r\n + \ \"etag\": \"W/\\\"9ddce558-980b-496b-a30e-df6ed75343ea\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2084,7 +2084,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [\r\n {\r\n \ \"name\": \"rc3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/applicationRuleCollections/rc3\",\r\n - \ \"etag\": \"W/\\\"f2fb9a37-9f43-4cbe-802a-d0a2a35f4e91\\\"\",\r\n + \ \"etag\": \"W/\\\"9ddce558-980b-496b-a30e-df6ed75343ea\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2100,7 +2100,7 @@ interactions: \"Microsoft.Network/azureFirewalls/applicationRuleCollections\"\r\n }\r\n \ ],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"f2fb9a37-9f43-4cbe-802a-d0a2a35f4e91\\\"\",\r\n + \ \"etag\": \"W/\\\"9ddce558-980b-496b-a30e-df6ed75343ea\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2127,15 +2127,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/bbd719b1-57fc-4235-b4a0-8c6b224cbf7f?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/29635cc4-dc68-4695-95b6-bdd424f34f91?api-version=2021-08-01 cache-control: - no-cache content-length: - - '6663' + - '6403' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:29 GMT + - Wed, 11 May 2022 19:58:43 GMT expires: - '-1' pragma: @@ -2152,7 +2152,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 44218e76-d88a-4c62-b834-5b5c90645dc7 + - 9b749387-6d98-4a84-8e55-11f9444f642d x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -2172,9 +2172,9 @@ interactions: ParameterSetName: - -f -n --protocols -g -c --priority --action --source-ip-groups --target-fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/bbd719b1-57fc-4235-b4a0-8c6b224cbf7f?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/29635cc4-dc68-4695-95b6-bdd424f34f91?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2186,7 +2186,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:39 GMT + - Wed, 11 May 2022 19:58:54 GMT expires: - '-1' pragma: @@ -2203,7 +2203,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 43853d64-5be0-4919-a7b3-1a547d81ebdf + - 21d9836e-f926-4940-9316-03f0dd51842c status: code: 200 message: OK @@ -2221,20 +2221,20 @@ interactions: ParameterSetName: - -f -n --protocols -g -c --priority --action --source-ip-groups --target-fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"beb69f7e-1b35-44fd-b458-c6460bfea14b\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"27edea78-97c7-4466-8b75-93d6b57ad5d1\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"beb69f7e-1b35-44fd-b458-c6460bfea14b\\\"\",\r\n + \ \"etag\": \"W/\\\"27edea78-97c7-4466-8b75-93d6b57ad5d1\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2256,7 +2256,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [\r\n {\r\n \ \"name\": \"rc3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/applicationRuleCollections/rc3\",\r\n - \ \"etag\": \"W/\\\"beb69f7e-1b35-44fd-b458-c6460bfea14b\\\"\",\r\n + \ \"etag\": \"W/\\\"27edea78-97c7-4466-8b75-93d6b57ad5d1\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2272,7 +2272,7 @@ interactions: \"Microsoft.Network/azureFirewalls/applicationRuleCollections\"\r\n }\r\n \ ],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"beb69f7e-1b35-44fd-b458-c6460bfea14b\\\"\",\r\n + \ \"etag\": \"W/\\\"27edea78-97c7-4466-8b75-93d6b57ad5d1\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2299,13 +2299,13 @@ interactions: cache-control: - no-cache content-length: - - '6667' + - '6407' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:39 GMT + - Wed, 11 May 2022 19:58:56 GMT etag: - - W/"beb69f7e-1b35-44fd-b458-c6460bfea14b" + - W/"27edea78-97c7-4466-8b75-93d6b57ad5d1" expires: - '-1' pragma: @@ -2322,7 +2322,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9fbf1daa-ecbc-402f-a967-dbf13775f724 + - 86df7323-0cc1-45cd-bb73-7cf1ca5b20b1 status: code: 200 message: OK @@ -2340,20 +2340,20 @@ interactions: ParameterSetName: - -f -n --protocols -g -c --source-ip-groups --target-fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"beb69f7e-1b35-44fd-b458-c6460bfea14b\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"27edea78-97c7-4466-8b75-93d6b57ad5d1\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"beb69f7e-1b35-44fd-b458-c6460bfea14b\\\"\",\r\n + \ \"etag\": \"W/\\\"27edea78-97c7-4466-8b75-93d6b57ad5d1\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2375,7 +2375,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [\r\n {\r\n \ \"name\": \"rc3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/applicationRuleCollections/rc3\",\r\n - \ \"etag\": \"W/\\\"beb69f7e-1b35-44fd-b458-c6460bfea14b\\\"\",\r\n + \ \"etag\": \"W/\\\"27edea78-97c7-4466-8b75-93d6b57ad5d1\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2391,7 +2391,7 @@ interactions: \"Microsoft.Network/azureFirewalls/applicationRuleCollections\"\r\n }\r\n \ ],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"beb69f7e-1b35-44fd-b458-c6460bfea14b\\\"\",\r\n + \ \"etag\": \"W/\\\"27edea78-97c7-4466-8b75-93d6b57ad5d1\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2418,13 +2418,13 @@ interactions: cache-control: - no-cache content-length: - - '6667' + - '6407' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:41 GMT + - Wed, 11 May 2022 19:59:00 GMT etag: - - W/"beb69f7e-1b35-44fd-b458-c6460bfea14b" + - W/"27edea78-97c7-4466-8b75-93d6b57ad5d1" expires: - '-1' pragma: @@ -2441,7 +2441,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e0fe2758-f76a-4cb3-a1bd-011bba13e6ae + - 12aa68f8-7eab-46ea-8d63-a702335835fc status: code: 200 message: OK @@ -2484,26 +2484,26 @@ interactions: Connection: - keep-alive Content-Length: - - '4115' + - '3829' Content-Type: - application/json ParameterSetName: - -f -n --protocols -g -c --source-ip-groups --target-fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"c625c1c6-e4b9-4f9e-8108-573ae242e0c7\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"3929a508-b9b3-4e52-8f18-fd4310a77020\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"c625c1c6-e4b9-4f9e-8108-573ae242e0c7\\\"\",\r\n + \ \"etag\": \"W/\\\"3929a508-b9b3-4e52-8f18-fd4310a77020\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2525,7 +2525,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [\r\n {\r\n \ \"name\": \"rc3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/applicationRuleCollections/rc3\",\r\n - \ \"etag\": \"W/\\\"c625c1c6-e4b9-4f9e-8108-573ae242e0c7\\\"\",\r\n + \ \"etag\": \"W/\\\"3929a508-b9b3-4e52-8f18-fd4310a77020\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2550,7 +2550,7 @@ interactions: \"Microsoft.Network/azureFirewalls/applicationRuleCollections\"\r\n }\r\n \ ],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"c625c1c6-e4b9-4f9e-8108-573ae242e0c7\\\"\",\r\n + \ \"etag\": \"W/\\\"3929a508-b9b3-4e52-8f18-fd4310a77020\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2577,15 +2577,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a80d8a74-09dd-4562-a1f6-ec10e67020be?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8884e369-03dd-4966-a21a-47ba883c19cd?api-version=2021-08-01 cache-control: - no-cache content-length: - - '7524' + - '7238' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:42 GMT + - Wed, 11 May 2022 19:59:01 GMT expires: - '-1' pragma: @@ -2602,9 +2602,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 16b6d26b-7ab4-4a31-9287-dff8e27ede5e + - 186b784d-93ae-40b1-907b-1d61feff0f59 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 200 message: OK @@ -2622,9 +2622,9 @@ interactions: ParameterSetName: - -f -n --protocols -g -c --source-ip-groups --target-fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a80d8a74-09dd-4562-a1f6-ec10e67020be?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8884e369-03dd-4966-a21a-47ba883c19cd?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2636,7 +2636,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:53 GMT + - Wed, 11 May 2022 19:59:11 GMT expires: - '-1' pragma: @@ -2653,7 +2653,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 185c6d16-21f8-43c0-b83c-9c5378d62393 + - 4c9cba98-c746-451c-b893-c1fd79fab4f6 status: code: 200 message: OK @@ -2671,20 +2671,20 @@ interactions: ParameterSetName: - -f -n --protocols -g -c --source-ip-groups --target-fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"19287653-d152-41e5-af4c-9eb093123952\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"e187f03a-6d4c-4f1b-9b72-15af370048ba\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [\r\n {\r\n \"name\": \"rc1\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/networkRuleCollections/rc1\",\r\n - \ \"etag\": \"W/\\\"19287653-d152-41e5-af4c-9eb093123952\\\"\",\r\n + \ \"etag\": \"W/\\\"e187f03a-6d4c-4f1b-9b72-15af370048ba\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2706,7 +2706,7 @@ interactions: \ },\r\n \"type\": \"Microsoft.Network/azureFirewalls/networkRuleCollections\"\r\n \ }\r\n ],\r\n \"applicationRuleCollections\": [\r\n {\r\n \ \"name\": \"rc3\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/applicationRuleCollections/rc3\",\r\n - \ \"etag\": \"W/\\\"19287653-d152-41e5-af4c-9eb093123952\\\"\",\r\n + \ \"etag\": \"W/\\\"e187f03a-6d4c-4f1b-9b72-15af370048ba\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10000,\r\n \"action\": {\r\n \"type\": \"Allow\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2731,7 +2731,7 @@ interactions: \"Microsoft.Network/azureFirewalls/applicationRuleCollections\"\r\n }\r\n \ ],\r\n \"natRuleCollections\": [\r\n {\r\n \"name\": \"rc2\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1/natRuleCollections/rc2\",\r\n - \ \"etag\": \"W/\\\"19287653-d152-41e5-af4c-9eb093123952\\\"\",\r\n + \ \"etag\": \"W/\\\"e187f03a-6d4c-4f1b-9b72-15af370048ba\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"priority\": 10001,\r\n \"action\": {\r\n \"type\": \"Dnat\"\r\n },\r\n \"rules\": [\r\n {\r\n \"name\": @@ -2758,13 +2758,13 @@ interactions: cache-control: - no-cache content-length: - - '7528' + - '7242' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:53 GMT + - Wed, 11 May 2022 19:59:11 GMT etag: - - W/"19287653-d152-41e5-af4c-9eb093123952" + - W/"e187f03a-6d4c-4f1b-9b72-15af370048ba" expires: - '-1' pragma: @@ -2781,7 +2781,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 96d7dd6f-3d77-42e5-b3a8-699f1293363c + - 1fb9a0f6-aee6-475b-a37b-3eb533d7ebf8 status: code: 200 message: OK @@ -2801,9 +2801,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_rules_with_ipgroups000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: '' @@ -2811,17 +2811,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/dd36d765-77c6-41c4-8370-14c522eee1d6?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/302f3390-4e45-4c01-874e-2a5c79d770a1?api-version=2021-08-01 cache-control: - no-cache content-length: - '0' date: - - Mon, 02 Aug 2021 02:42:55 GMT + - Wed, 11 May 2022 19:59:12 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/dd36d765-77c6-41c4-8370-14c522eee1d6?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/302f3390-4e45-4c01-874e-2a5c79d770a1?api-version=2021-08-01 pragma: - no-cache server: @@ -2832,7 +2832,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2d9f9097-f4bc-4691-9e10-16043c59210c + - 50d8cb77-ff34-4561-a71e-87c2feea4d8f x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -2852,9 +2852,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/dd36d765-77c6-41c4-8370-14c522eee1d6?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/302f3390-4e45-4c01-874e-2a5c79d770a1?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2866,7 +2866,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:05 GMT + - Wed, 11 May 2022 19:59:23 GMT expires: - '-1' pragma: @@ -2883,7 +2883,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - fc75466c-3068-4f23-8aa3-9a3ea62d2717 + - df994d10-e622-4ae1-acdb-98ed33c22d08 status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_threat_intel_allowlist.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_threat_intel_allowlist.yaml index 6f34dee0e7f..45cd90bc43b 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_threat_intel_allowlist.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_threat_intel_allowlist.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_threat_intel_allowlist000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001","name":"cli_test_azure_firewall_threat_intel_allowlist000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:41:59Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001","name":"cli_test_azure_firewall_threat_intel_allowlist000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:56:34Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:56:35.3006266Z","CreationDate":"2022-05-11T19:56:35.3005907Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '564' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:03 GMT + - Wed, 11 May 2022 19:56:36 GMT expires: - '-1' pragma: @@ -60,13 +60,13 @@ interactions: ParameterSetName: - -g -n --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"49c1256e-e293-4f49-bf58-09f11818f105\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"8ec35489-889f-441f-b2d4-fa9ded35fe92\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -78,15 +78,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7ed62857-88e1-4449-8d40-1103522e96f4?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5d64d2f2-e7b2-4faf-a03c-4a9d34232920?api-version=2021-08-01 cache-control: - no-cache content-length: - - '776' + - '753' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:11 GMT + - Wed, 11 May 2022 19:56:44 GMT expires: - '-1' pragma: @@ -99,7 +99,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - aa1ed352-41a9-4d2d-b4e4-425942b5bc20 + - dd04839c-97d3-43a9-9901-244381ac8150 x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -119,9 +119,9 @@ interactions: ParameterSetName: - -g -n --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7ed62857-88e1-4449-8d40-1103522e96f4?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5d64d2f2-e7b2-4faf-a03c-4a9d34232920?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -133,7 +133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:21 GMT + - Wed, 11 May 2022 19:56:54 GMT expires: - '-1' pragma: @@ -150,7 +150,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 64807984-bb54-4abf-8030-988a2cb5c247 + - f41762fb-2f3a-4508-a9e6-96851594d417 status: code: 200 message: OK @@ -168,13 +168,13 @@ interactions: ParameterSetName: - -g -n --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"f4fbb516-0dda-4571-9fbb-392ba997807f\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"9a4781bd-7a76-4d31-b3cd-02348c3f3079\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -186,13 +186,13 @@ interactions: cache-control: - no-cache content-length: - - '777' + - '754' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:21 GMT + - Wed, 11 May 2022 19:56:54 GMT etag: - - W/"f4fbb516-0dda-4571-9fbb-392ba997807f" + - W/"9a4781bd-7a76-4d31-b3cd-02348c3f3079" expires: - '-1' pragma: @@ -209,7 +209,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c057fd54-2c29-4663-99c6-9a9cf48214f0 + - 88130c6d-a9ef-499e-aa90-b7c88be6e868 status: code: 200 message: OK @@ -227,13 +227,13 @@ interactions: ParameterSetName: - -g -n --ip-addresses --fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"f4fbb516-0dda-4571-9fbb-392ba997807f\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"9a4781bd-7a76-4d31-b3cd-02348c3f3079\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -245,13 +245,13 @@ interactions: cache-control: - no-cache content-length: - - '777' + - '754' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:23 GMT + - Wed, 11 May 2022 19:56:57 GMT etag: - - W/"f4fbb516-0dda-4571-9fbb-392ba997807f" + - W/"9a4781bd-7a76-4d31-b3cd-02348c3f3079" expires: - '-1' pragma: @@ -268,7 +268,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6b243ca8-8a5a-4b89-9cd3-ad0a4ba1534e + - b2a15d99-5d48-4108-92fa-eddf126b204c status: code: 200 message: OK @@ -290,19 +290,19 @@ interactions: Connection: - keep-alive Content-Length: - - '665' + - '642' Content-Type: - application/json ParameterSetName: - -g -n --ip-addresses --fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"e92d9bee-ea9f-4462-a3db-7b001ada8055\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"c3ede493-203f-4dea-8f3e-b4ad280d6b75\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -316,15 +316,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a67874c4-790d-40a2-8693-30d98158f6d1?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5bcd891e-ba5e-419e-b3ac-1815b4502028?api-version=2021-08-01 cache-control: - no-cache content-length: - - '926' + - '903' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:23 GMT + - Wed, 11 May 2022 19:56:58 GMT expires: - '-1' pragma: @@ -341,9 +341,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 43a819fe-4b54-4561-8587-a6ebb79e2e27 + - 9ee7350f-a60d-4b24-9a6b-dc058c1fd8bc x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' status: code: 200 message: OK @@ -361,9 +361,9 @@ interactions: ParameterSetName: - -g -n --ip-addresses --fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a67874c4-790d-40a2-8693-30d98158f6d1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5bcd891e-ba5e-419e-b3ac-1815b4502028?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -375,7 +375,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:34 GMT + - Wed, 11 May 2022 19:57:08 GMT expires: - '-1' pragma: @@ -392,7 +392,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e953c66f-f472-48a9-876e-7e2d1b1b0230 + - 31244b53-ef85-44c8-aff7-4e479dba4ab9 status: code: 200 message: OK @@ -410,13 +410,13 @@ interactions: ParameterSetName: - -g -n --ip-addresses --fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d46aaceb-9663-47fd-8de6-0dd717e4e98a\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"075afe2e-ca0f-4b00-b21e-ed806f55e5d5\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -430,13 +430,13 @@ interactions: cache-control: - no-cache content-length: - - '927' + - '904' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:34 GMT + - Wed, 11 May 2022 19:57:09 GMT etag: - - W/"d46aaceb-9663-47fd-8de6-0dd717e4e98a" + - W/"075afe2e-ca0f-4b00-b21e-ed806f55e5d5" expires: - '-1' pragma: @@ -453,7 +453,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ab4deb77-06fc-4f83-b7ad-dd5fd1705bb5 + - 93ab107b-adae-470a-be87-b7973ce7a4da status: code: 200 message: OK @@ -471,13 +471,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d46aaceb-9663-47fd-8de6-0dd717e4e98a\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"075afe2e-ca0f-4b00-b21e-ed806f55e5d5\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -491,13 +491,13 @@ interactions: cache-control: - no-cache content-length: - - '927' + - '904' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:36 GMT + - Wed, 11 May 2022 19:57:11 GMT etag: - - W/"d46aaceb-9663-47fd-8de6-0dd717e4e98a" + - W/"075afe2e-ca0f-4b00-b21e-ed806f55e5d5" expires: - '-1' pragma: @@ -514,7 +514,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8956fdad-80d1-4058-9ca8-e8307e203c55 + - ce90a513-4213-45ae-bdd5-280b6c0e9cca status: code: 200 message: OK @@ -532,13 +532,13 @@ interactions: ParameterSetName: - -g -n --ip-addresses --fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d46aaceb-9663-47fd-8de6-0dd717e4e98a\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"075afe2e-ca0f-4b00-b21e-ed806f55e5d5\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -552,13 +552,13 @@ interactions: cache-control: - no-cache content-length: - - '927' + - '904' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:38 GMT + - Wed, 11 May 2022 19:57:15 GMT etag: - - W/"d46aaceb-9663-47fd-8de6-0dd717e4e98a" + - W/"075afe2e-ca0f-4b00-b21e-ed806f55e5d5" expires: - '-1' pragma: @@ -575,7 +575,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f29d847d-3c00-4d23-89a2-e27980b0202a + - 4d73520b-6dae-4ce6-8159-cf132aac1c7e status: code: 200 message: OK @@ -597,19 +597,19 @@ interactions: Connection: - keep-alive Content-Length: - - '665' + - '642' Content-Type: - application/json ParameterSetName: - -g -n --ip-addresses --fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"75e42a98-1567-4788-9911-8c1d2c850adb\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"42abb242-ebc7-488a-8735-9789318f65de\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -623,15 +623,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/47100fd1-29a6-4e19-803b-56060c1a71b0?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/837e6c11-78fa-41f5-acd3-e6fff6445d9a?api-version=2021-08-01 cache-control: - no-cache content-length: - - '926' + - '903' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:40 GMT + - Wed, 11 May 2022 19:57:16 GMT expires: - '-1' pragma: @@ -648,9 +648,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 44b2d19d-95f7-4423-a0c7-1a59f8e348b4 + - caff43c2-f1bc-4880-9e56-d19e89f6f264 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' status: code: 200 message: OK @@ -668,9 +668,9 @@ interactions: ParameterSetName: - -g -n --ip-addresses --fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/47100fd1-29a6-4e19-803b-56060c1a71b0?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/837e6c11-78fa-41f5-acd3-e6fff6445d9a?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -682,7 +682,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:50 GMT + - Wed, 11 May 2022 19:57:26 GMT expires: - '-1' pragma: @@ -699,7 +699,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7b101cdb-4142-485a-9d4e-27ae45acc88d + - 6fceb419-9bc5-429b-be64-ff9007745073 status: code: 200 message: OK @@ -717,13 +717,13 @@ interactions: ParameterSetName: - -g -n --ip-addresses --fqdns User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"b56005b4-5711-4057-af7d-5365067cc9a6\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"605d957f-16bf-4999-84a8-e9951425b48f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -737,13 +737,13 @@ interactions: cache-control: - no-cache content-length: - - '927' + - '904' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:50 GMT + - Wed, 11 May 2022 19:57:29 GMT etag: - - W/"b56005b4-5711-4057-af7d-5365067cc9a6" + - W/"605d957f-16bf-4999-84a8-e9951425b48f" expires: - '-1' pragma: @@ -760,7 +760,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8bb00561-c06c-468b-a651-063160f96543 + - 096b68bb-856e-4ed0-bac0-c9e3158542a0 status: code: 200 message: OK @@ -778,13 +778,13 @@ interactions: ParameterSetName: - -g -n --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"b56005b4-5711-4057-af7d-5365067cc9a6\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"605d957f-16bf-4999-84a8-e9951425b48f\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -798,13 +798,13 @@ interactions: cache-control: - no-cache content-length: - - '927' + - '904' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:52 GMT + - Wed, 11 May 2022 19:57:30 GMT etag: - - W/"b56005b4-5711-4057-af7d-5365067cc9a6" + - W/"605d957f-16bf-4999-84a8-e9951425b48f" expires: - '-1' pragma: @@ -821,7 +821,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c0aabf27-7b07-4f3b-99f4-ef28e3086409 + - b90c1437-857c-4d94-a96b-b878b4b78114 status: code: 200 message: OK @@ -843,19 +843,19 @@ interactions: Connection: - keep-alive Content-Length: - - '665' + - '642' Content-Type: - application/json ParameterSetName: - -g -n --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"a1c35ebd-2d8a-48a1-86f9-d6431d8348ae\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"07552fea-6e78-4912-babf-cc6908b4d0dd\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -869,15 +869,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8434f746-cfeb-48ca-8374-e8fd24ccc8e4?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ff96f88a-4923-4a5b-9037-58fbc70f53e6?api-version=2021-08-01 cache-control: - no-cache content-length: - - '926' + - '903' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:42:54 GMT + - Wed, 11 May 2022 19:57:31 GMT expires: - '-1' pragma: @@ -894,9 +894,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 65ff0a27-03dc-4d68-b0ec-6821a245088b + - 06df948d-79cb-420a-930c-4e096718a782 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1197' status: code: 200 message: OK @@ -914,9 +914,9 @@ interactions: ParameterSetName: - -g -n --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8434f746-cfeb-48ca-8374-e8fd24ccc8e4?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ff96f88a-4923-4a5b-9037-58fbc70f53e6?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -928,7 +928,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:04 GMT + - Wed, 11 May 2022 19:57:42 GMT expires: - '-1' pragma: @@ -945,7 +945,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f0efcc0b-6dab-400b-be02-9d7ef09a7cbf + - b6c028ff-e8a2-4d81-be97-c9bc6bdcaec6 status: code: 200 message: OK @@ -963,13 +963,13 @@ interactions: ParameterSetName: - -g -n --private-ranges User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"e8c97fc3-aeed-4581-8f40-36440ecdd8a1\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"a739e766-d374-4290-9e0b-9f2deadbf60d\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -983,13 +983,13 @@ interactions: cache-control: - no-cache content-length: - - '927' + - '904' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:04 GMT + - Wed, 11 May 2022 19:57:44 GMT etag: - - W/"e8c97fc3-aeed-4581-8f40-36440ecdd8a1" + - W/"a739e766-d374-4290-9e0b-9f2deadbf60d" expires: - '-1' pragma: @@ -1006,7 +1006,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 48b7fd07-35cc-4a44-824e-409060f34714 + - 7c079b5c-7c4f-460f-9bb3-3843214c744a status: code: 200 message: OK @@ -1024,13 +1024,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"e8c97fc3-aeed-4581-8f40-36440ecdd8a1\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"a739e766-d374-4290-9e0b-9f2deadbf60d\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -1044,13 +1044,13 @@ interactions: cache-control: - no-cache content-length: - - '927' + - '904' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:06 GMT + - Wed, 11 May 2022 19:57:47 GMT etag: - - W/"e8c97fc3-aeed-4581-8f40-36440ecdd8a1" + - W/"a739e766-d374-4290-9e0b-9f2deadbf60d" expires: - '-1' pragma: @@ -1067,7 +1067,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1feaa676-672b-47f6-9fd2-4819bbb35e4c + - bc76ddae-19d3-46c8-b0e1-bcdb5195b6cb status: code: 200 message: OK @@ -1087,19 +1087,19 @@ interactions: Connection: - keep-alive Content-Length: - - '529' + - '506' Content-Type: - application/json ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"247ea60d-e9d7-49e0-aa80-77d602eef9a1\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"a0b22f93-dbc8-4fe4-8c89-264d12ce1913\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -1111,15 +1111,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/350681a5-1175-4061-a514-ceb03d8e38b8?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/6f3ed1ca-bb5c-4f4f-9d17-570eea9c850b?api-version=2021-08-01 cache-control: - no-cache content-length: - - '776' + - '753' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:06 GMT + - Wed, 11 May 2022 19:57:48 GMT expires: - '-1' pragma: @@ -1136,9 +1136,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - de956eb3-c746-4006-9d14-5c1a999a29cc + - b20d2e74-0cff-48f2-a915-42005e927ff5 x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1197' status: code: 200 message: OK @@ -1156,9 +1156,9 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/350681a5-1175-4061-a514-ceb03d8e38b8?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/6f3ed1ca-bb5c-4f4f-9d17-570eea9c850b?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1170,7 +1170,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:16 GMT + - Wed, 11 May 2022 19:57:58 GMT expires: - '-1' pragma: @@ -1187,7 +1187,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 15306e64-891b-4bcc-8174-22c65f20a339 + - da67a1e2-a934-4d31-9960-dfcf241613d0 status: code: 200 message: OK @@ -1205,13 +1205,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_threat_intel_allowlist000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d28266a9-06b8-4583-8d46-0aa2fa20e0ad\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"bbb4a207-5fbf-422e-a0b1-ac2277545ee5\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -1223,13 +1223,13 @@ interactions: cache-control: - no-cache content-length: - - '777' + - '754' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:17 GMT + - Wed, 11 May 2022 19:57:59 GMT etag: - - W/"d28266a9-06b8-4583-8d46-0aa2fa20e0ad" + - W/"bbb4a207-5fbf-422e-a0b1-ac2277545ee5" expires: - '-1' pragma: @@ -1246,7 +1246,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 658ec4b4-e6ea-4460-95bf-1e83e5c3aeb0 + - db21eabf-bd1e-4c27-87fe-d02a11b27226 status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_tier.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_tier.yaml index a7fd269077b..f862aacbf30 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_tier.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_tier.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n --sku --tier User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_tier000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_tier000001","name":"test_azure_firewall_tier000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:43:11Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_tier000001","name":"test_azure_firewall_tier000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2euap","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T20:00:02Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T20:00:03.2798994Z","CreationDate":"2022-05-11T20:00:03.2798526Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '476' + - '525' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:15 GMT + - Wed, 11 May 2022 20:00:05 GMT expires: - '-1' pragma: @@ -60,13 +60,13 @@ interactions: ParameterSetName: - -g -n --sku --tier User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_tier000001/providers/Microsoft.Network/azureFirewalls/af?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_tier000001/providers/Microsoft.Network/azureFirewalls/af?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_tier000001/providers/Microsoft.Network/azureFirewalls/af\",\r\n - \ \"etag\": \"W/\\\"ffb5ea1a-6c5a-49cd-80b5-a0a9cd7cfc7d\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"5e4c3161-b82d-4d02-a087-d31aba6881fe\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2euap\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Premium\"\r\n },\r\n @@ -77,15 +77,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/6499caff-3431-43a5-9c8e-dcca55e8bbb4?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/559d3562-3735-4e85-bbbe-62c1dce1eb2d?api-version=2021-08-01 cache-control: - no-cache content-length: - - '692' + - '647' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:24 GMT + - Wed, 11 May 2022 20:00:14 GMT expires: - '-1' pragma: @@ -98,9 +98,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d8d13aa3-d17c-406f-9e3b-dce4794de774 + - 5646f430-64bf-4d57-a569-0ab4ba40188d x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1198' status: code: 201 message: Created @@ -118,9 +118,9 @@ interactions: ParameterSetName: - -g -n --sku --tier User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/6499caff-3431-43a5-9c8e-dcca55e8bbb4?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2euap/operations/559d3562-3735-4e85-bbbe-62c1dce1eb2d?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -132,7 +132,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:35 GMT + - Wed, 11 May 2022 20:00:24 GMT expires: - '-1' pragma: @@ -149,7 +149,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ef1d7038-2e0b-407f-8d05-9f6e4f7e0b32 + - debabc75-dc0e-4c46-aeba-9f3b14e4971d status: code: 200 message: OK @@ -167,13 +167,13 @@ interactions: ParameterSetName: - -g -n --sku --tier User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_tier000001/providers/Microsoft.Network/azureFirewalls/af?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_tier000001/providers/Microsoft.Network/azureFirewalls/af?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_tier000001/providers/Microsoft.Network/azureFirewalls/af\",\r\n - \ \"etag\": \"W/\\\"cf7b22ca-d798-40be-b077-5d53bd7a7eb4\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"b1c6e12c-92d7-487e-bddd-00e760d5f02e\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2euap\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Premium\"\r\n },\r\n @@ -184,13 +184,13 @@ interactions: cache-control: - no-cache content-length: - - '693' + - '648' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:35 GMT + - Wed, 11 May 2022 20:00:24 GMT etag: - - W/"cf7b22ca-d798-40be-b077-5d53bd7a7eb4" + - W/"b1c6e12c-92d7-487e-bddd-00e760d5f02e" expires: - '-1' pragma: @@ -207,7 +207,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 33f8a115-45d2-40b7-81f9-c229509d6f2b + - c5e32a8a-40fd-4672-a1f0-1092d2741299 status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_virtual_hub.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_virtual_hub.yaml index 9424d0ca52c..0342f339ed5 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_virtual_hub.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_virtual_hub.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_virtual_hub000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:43:22Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:59:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:59:27.6209582Z","CreationDate":"2022-05-11T19:59:27.6209454Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '472' + - '543' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:27 GMT + - Wed, 11 May 2022 19:59:30 GMT expires: - '-1' pragma: @@ -59,13 +59,13 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan?api-version=2020-05-01 response: body: string: "{\r\n \"name\": \"clitestvwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan\",\r\n - \ \"etag\": \"W/\\\"2d824521-dfad-40e3-89ce-e2de60fc6e74\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"2603987f-91b1-483c-870d-de0f4e31131f\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": @@ -74,15 +74,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/5ca97a26-8de9-4131-9d97-4f29f0d5213a?api-version=2020-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/bba02dab-8bce-49cc-a038-90b58653030b?api-version=2020-05-01 cache-control: - no-cache content-length: - - '574' + - '540' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:33 GMT + - Wed, 11 May 2022 19:59:36 GMT expires: - '-1' pragma: @@ -95,9 +95,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9ff70e5a-da4b-4245-81ad-7cb7f60a9498 + - 334e632d-ce0d-4932-a1e3-1d5d80171964 x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1199' status: code: 201 message: Created @@ -115,9 +115,9 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/5ca97a26-8de9-4131-9d97-4f29f0d5213a?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/bba02dab-8bce-49cc-a038-90b58653030b?api-version=2020-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -129,7 +129,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:44 GMT + - Wed, 11 May 2022 19:59:46 GMT expires: - '-1' pragma: @@ -146,7 +146,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 426d819e-9aa7-4b9a-9e70-82b5bc7bbcb5 + - 25e7d882-1fd8-4382-8d42-9aed285f1da6 status: code: 200 message: OK @@ -164,13 +164,13 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan?api-version=2020-05-01 response: body: string: "{\r\n \"name\": \"clitestvwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan\",\r\n - \ \"etag\": \"W/\\\"1889fdd4-9aa8-40c5-b053-f80fe6312715\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"be71ad36-4d42-485c-b46d-e6cc4a351ad2\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": @@ -179,224 +179,13 @@ interactions: cache-control: - no-cache content-length: - - '575' + - '541' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:44 GMT + - Wed, 11 May 2022 19:59:46 GMT etag: - - W/"1889fdd4-9aa8-40c5-b053-f80fe6312715" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9cde067d-7a6b-49e6-860c-163fc14fc54d - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "properties": {"virtualWan": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan"}, - "addressPrefix": "10.0.0.0/24", "sku": "Standard"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - Content-Length: - - '310' - Content-Type: - - application/json - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub?api-version=2020-05-01 - response: - body: - string: "{\r\n \"name\": \"clitestvhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\",\r\n - \ \"etag\": \"W/\\\"c753edd8-3dbd-4b39-b404-0ffa0dd3315b\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"virtualHubRouteTableV2s\": - [],\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"virtualRouterAsn\": - 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": - []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan\"\r\n - \ },\r\n \"sku\": \"Standard\",\r\n \"routingState\": \"None\"\r\n - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 - cache-control: - - no-cache - content-length: - - '896' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:43:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a3aa469f-3bac-454d-b49f-59305f0c971d - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:44:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 16688357-bfd6-4f89-a642-e5bb0e577386 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:44:16 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 71baaa82-f7e6-40a5-b835-d044d7cb3b23 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:44:36 GMT + - W/"be71ad36-4d42-485c-b46d-e6cc4a351ad2" expires: - '-1' pragma: @@ -413,7 +202,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 002e73a6-373e-4316-83fc-c17a453fad0d + - 8b80ccd2-9fe2-4a3f-a9e7-9238db8baeb5 status: code: 200 message: OK @@ -421,80 +210,86 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network vwan create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_virtual_hub000001?api-version=2021-04-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:59:27Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:59:27.6209582Z","CreationDate":"2022-05-11T19:59:27.6209454Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '30' + - '543' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:44:56 GMT + - Wed, 11 May 2022 19:59:47 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - Accept-Encoding x-content-type-options: - nosniff - x-ms-arm-service-request-id: - - 35c80da3-fcf4-4927-89a5-f4e4bf854fc5 status: code: 200 message: OK - request: - body: null + body: '{"location": "eastus2"}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network vwan create Connection: - keep-alive + Content-Length: + - '23' + Content-Type: + - application/json ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2?api-version=2020-05-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"name\": \"clitestvwan2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2\",\r\n + \ \"etag\": \"W/\\\"9c46e29b-9aeb-4e16-a3f5-b4dc07028e63\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"disableVpnEncryption\": + false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": + \"None\",\r\n \"type\": \"Standard\"\r\n }\r\n}" headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6fd821a1-c182-429c-9c07-5e779066d11a?api-version=2020-05-01 cache-control: - no-cache content-length: - - '30' + - '542' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:45:37 GMT + - Wed, 11 May 2022 19:59:53 GMT expires: - '-1' pragma: @@ -504,17 +299,15 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b3bc5b56-2fe6-42d5-8f13-50844656e511 + - 432e6a40-e44f-4c85-b230-7baf46234d01 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' status: - code: 200 - message: OK + code: 201 + message: Created - request: body: null headers: @@ -523,27 +316,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network vwan create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6fd821a1-c182-429c-9c07-5e779066d11a?api-version=2020-05-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: - no-cache content-length: - - '30' + - '29' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:46:17 GMT + - Wed, 11 May 2022 20:00:04 GMT expires: - '-1' pragma: @@ -560,7 +353,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e605031a-eacd-42b2-b19d-bc141dc6ba4a + - 446afd39-baa3-4e50-a275-f253dc554fcb status: code: 200 message: OK @@ -572,3210 +365,34 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network vwan create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2?api-version=2020-05-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:47:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ef1f0e62-7761-4d62-98a7-4a508765e477 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/71edc893-aec9-42f6-8e21-0a37de8f87c0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d0339eba-9553-468e-aa2a-c5f1b3fd715e - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub?api-version=2020-05-01 - response: - body: - string: "{\r\n \"name\": \"clitestvhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\",\r\n - \ \"etag\": \"W/\\\"f9d00402-a079-442b-8b81-c4e968e32f3c\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": - [],\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"virtualRouterAsn\": - 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": - []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan\"\r\n - \ },\r\n \"sku\": \"Standard\",\r\n \"routingState\": \"Provisioning\"\r\n - \ }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '905' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - c8bae5a2-d8c4-45f2-af20-fbce419eb2ef - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_virtual_hub000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:43:22Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '472' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:21 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "properties": {"virtualHub": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub"}, - "hubIPAddresses": {"publicIPs": {"count": 1}}, "sku": {"name": "AZFW_Hub", "tier": - "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - Content-Length: - - '383' - Content-Type: - - application/json - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"7a843690-fd73-4b7b-b394-378084c4b093\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"publicIPs\": {\r\n \"addresses\": - [],\r\n \"count\": 1\r\n }\r\n }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '872' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:30 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 729024de-4ad0-4bc4-8974-d865b5491e4e - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 96f3a528-7652-4d43-b548-694248006b81 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 02266eb0-535c-4fe6-a76f-0ff2342238a4 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:51:11 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 2e8e39bf-83e1-45ae-9b97-2cb0f47860ee - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:51:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e5582802-ab4e-460b-9b06-d2567890f535 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:52:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a7a1cdf5-496a-43a9-931f-e1125d9dd963 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:52:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d911876e-255f-41bf-b097-eb7c95c55a7f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:54:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f88f0443-a6c9-4abb-8e96-1de03d869797 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:56:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - dd9e3d30-050c-4da0-97d3-54454603e55a - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:58:34 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a401ec6c-b916-4235-a435-af1a5808b73e - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:00:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b1980829-020f-46a2-bd5b-ff521d0b68fb - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:01:54 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 409fc8b8-a3d6-47c1-9de8-5871cf1503e7 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:03:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a9f07b4e-347e-4bef-82e1-c6a99776a199 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:05:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 57070bbd-081f-4409-ad00-d75b1324c024 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:06:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - fbec4f05-a757-4b6c-bc46-687ee0de17ba - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/169f504c-104c-4949-91a1-3c34c40bc8e2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:08:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0b1b46f4-a056-437d-91fe-81b0c8f85e8c - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"69239d65-405d-4318-8053-c9c02ef0e942\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.72.70.182\"\r\n }\r\n ],\r\n \"count\": 1\r\n - \ }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '989' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:08:36 GMT - etag: - - W/"69239d65-405d-4318-8053-c9c02ef0e942" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a28ddf4a-d540-4f85-89ca-963418939bcb - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"69239d65-405d-4318-8053-c9c02ef0e942\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.72.70.182\"\r\n }\r\n ],\r\n \"count\": 1\r\n - \ }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '989' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:08:39 GMT - etag: - - W/"69239d65-405d-4318-8053-c9c02ef0e942" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 23c4ca2a-7547-4966-a71d-ab7f3e400f1f - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1", - "location": "eastus2", "properties": {"hubIPAddresses": {"publicIPs": {"addresses": - [{"address": "20.72.70.182"}], "count": 1}, "privateIPAddress": "10.0.0.132"}, - "sku": {"name": "AZFW_Hub", "tier": "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - Content-Length: - - '440' - Content-Type: - - application/json - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"6cab86aa-4964-46dc-ae96-69dd6a329acd\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": - \"10.0.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n - \ {\r\n \"address\": \"20.72.70.182\"\r\n }\r\n - \ ],\r\n \"count\": 1\r\n }\r\n }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '749' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:08:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 218d5dd0-4be8-45de-bd0b-39c81ad59b54 - x-ms-ratelimit-remaining-subscription-writes: - - '1192' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:08:50 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 113f56a5-25cc-46e4-9a30-f66b7ca6a8f9 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:09:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8fcb1479-9c85-40b5-ace5-363e7acc7b53 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:09:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 51bf5b62-a1b9-457b-a558-2a7409bc9217 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:09:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3cb7e116-9767-458e-85c3-8d837fc9e7d3 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:10:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 44f524e5-86f9-43dd-a5c5-a4962478687f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:11:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 190afc44-4123-43e6-8c97-65da6861b650 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:12:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 5db4e787-d05f-4259-8e3e-d0ffb3e2187f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3acce34e-5774-45a6-9938-837bd3ff62f4?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3d6630d6-1028-43af-aa5c-4f2ed9dee1ec - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"45e4364c-20d0-42f2-a543-b9f099efe94d\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": - \"10.0.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n - \ {\r\n \"address\": \"20.72.70.182\"\r\n }\r\n - \ ],\r\n \"count\": 1\r\n }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '750' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:04 GMT - etag: - - W/"45e4364c-20d0-42f2-a543-b9f099efe94d" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 1639a227-6d99-46e3-99bc-4952360be8df - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub --allow-active-ftp - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_virtual_hub000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:43:22Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '472' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:06 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network vwan create - Connection: - - keep-alive - ParameterSetName: - - -n -g --type - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_virtual_hub000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:43:22Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '472' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:08 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network vwan create - Connection: - - keep-alive - Content-Length: - - '23' - Content-Type: - - application/json - ParameterSetName: - - -n -g --type - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2?api-version=2020-05-01 - response: - body: - string: "{\r\n \"name\": \"clitestvwan2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2\",\r\n - \ \"etag\": \"W/\\\"0c00a240-3854-4021-ad66-a04e9fd8c992\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"disableVpnEncryption\": - false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": - \"None\",\r\n \"type\": \"Standard\"\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/015ad034-0cf8-4cce-8004-b412d55a2ec1?api-version=2020-05-01 - cache-control: - - no-cache - content-length: - - '576' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 641bdb01-7e49-4057-864f-fa3716bf87da - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vwan create - Connection: - - keep-alive - ParameterSetName: - - -n -g --type - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/015ad034-0cf8-4cce-8004-b412d55a2ec1?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:27 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b7b680d2-e9b1-4e89-84ad-4eb82183b611 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vwan create - Connection: - - keep-alive - ParameterSetName: - - -n -g --type - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2?api-version=2020-05-01 - response: - body: - string: "{\r\n \"name\": \"clitestvwan2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2\",\r\n - \ \"etag\": \"W/\\\"0cca698c-bbf8-4771-8b67-73b283a0c90e\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": - false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": - \"None\",\r\n \"type\": \"Standard\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '577' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:27 GMT - etag: - - W/"0cca698c-bbf8-4771-8b67-73b283a0c90e" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - bdfcac42-b462-4cb7-8e0b-ca54b1bc77ba - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "properties": {"virtualWan": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2"}, - "addressPrefix": "10.0.0.0/24", "sku": "Standard"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - Content-Length: - - '311' - Content-Type: - - application/json - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub2?api-version=2020-05-01 - response: - body: - string: "{\r\n \"name\": \"clitestvhub2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub2\",\r\n - \ \"etag\": \"W/\\\"64c80e2e-c270-4116-bf4a-ae388cb829f0\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"virtualHubRouteTableV2s\": - [],\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"virtualRouterAsn\": - 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": - []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2\"\r\n - \ },\r\n \"sku\": \"Standard\",\r\n \"routingState\": \"None\"\r\n - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - cache-control: - - no-cache - content-length: - - '899' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8e7ab74f-447d-4fe4-b08b-1a95528895ec - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 6b21a0cf-cfd6-45b4-8009-1f3e25607125 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:15:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9245e976-6681-4685-8983-1484f015b532 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:16:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 1b6937a4-4287-4efb-99d7-bccd963119d0 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:16:37 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f6313fa7-dd9d-4232-8629-5660d23aa50d - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:17:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b1bfbeeb-e3d9-487d-9d37-66f991f2b47f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:17:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - be19c32f-fe6d-47d2-9824-5403e74141b9 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:19:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ad939d27-0d7a-413b-9058-146b00f5f2a9 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/3bf2f478-8711-4d9f-881f-d9178221d5e0?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:22:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0178fed6-36f1-407a-9530-72c94ff617af - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub2?api-version=2020-05-01 - response: - body: - string: "{\r\n \"name\": \"clitestvhub2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub2\",\r\n - \ \"etag\": \"W/\\\"b33ce04b-7f5d-4b29-956d-7be6f3a9bfd2\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": - [],\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"virtualRouterAsn\": - 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": - []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2\"\r\n - \ },\r\n \"sku\": \"Standard\",\r\n \"routingState\": \"Provisioning\"\r\n - \ }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '908' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:22:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9eddc44f-6864-4319-8b23-4a1a4537a7ad - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"45e4364c-20d0-42f2-a543-b9f099efe94d\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": - \"10.0.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n - \ {\r\n \"address\": \"20.72.70.182\"\r\n }\r\n - \ ],\r\n \"count\": 1\r\n }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '750' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:22:03 GMT - etag: - - W/"45e4364c-20d0-42f2-a543-b9f099efe94d" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f5b530ff-18d2-4544-b001-64ee34ca12d5 - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1", - "location": "eastus2", "properties": {"virtualHub": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub2"}, - "hubIPAddresses": {"publicIPs": {"addresses": [{"address": "20.72.70.182"}], - "count": 1}, "privateIPAddress": "10.0.0.132"}, "sku": {"name": "AZFW_Hub", - "tier": "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - Content-Length: - - '661' - Content-Type: - - application/json - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"148fcef6-1f46-4ff0-877d-db746fb7674c\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub2\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.72.70.182\"\r\n }\r\n ],\r\n \"count\": 1\r\n - \ }\r\n }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '989' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:22:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a0454ccc-4785-43d7-8971-91047dfc5b25 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:22:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 6a1dae00-82f8-446c-9e9a-d714e6b8eb0a - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:22:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9920c299-4b54-419c-8910-fcec86075e57 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:22:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 85c5a043-270f-4b14-a289-c6f9369c8ddd - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:23:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 4112dcc0-1c7d-400f-96bf-f29b8165cdba - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:23:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8aa3e99b-d60a-4c89-b54b-8353dd1e0a0c - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:24:27 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 83217e57-5229-4510-840e-d01efe44ab67 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:25:47 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9c837ccc-be08-4612-9e99-ad2512b2ca56 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:28:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 934b1634-41d0-4130-99d8-2bf5c3ddd475 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:30:08 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e4c18546-e5ce-4a5d-8531-871f2fb0a8eb - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:31:49 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a0b07b60-237f-4e12-952c-4cade4346ae3 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:33:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 13447c3c-d1fd-4be6-a131-78ab1a755863 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:35:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 7faecf8d-668f-44a0-a1ff-d6da5aefd864 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/0da9c3b5-980c-44f1-8014-406d5a42a462?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:36:50 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ec038942-4867-4a7b-b5e1-3f8cc4af614d - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"a0dde1c5-e413-47c8-84b9-999f4e41dd1b\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub2\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"52.177.249.169\"\r\n }\r\n ],\r\n \"count\": 1\r\n - \ }\r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"clitestvwan2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan2\",\r\n + \ \"etag\": \"W/\\\"2b168be2-149d-4643-bad1-f165c7854258\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": + false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": + \"None\",\r\n \"type\": \"Standard\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '992' + - '543' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 03:36:50 GMT + - Wed, 11 May 2022 20:00:04 GMT etag: - - W/"a0dde1c5-e413-47c8-84b9-999f4e41dd1b" + - W/"2b168be2-149d-4643-bad1-f165c7854258" expires: - '-1' pragma: @@ -3792,7 +409,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 74e6c41f-7b1c-4884-8e16-427204267483 + - b7c035f3-bedc-4dc8-ad72-e742c554abb4 status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_virtual_hub_with_public_ips.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_virtual_hub_with_public_ips.yaml index 576765f58ee..9472cdfb8c2 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_virtual_hub_with_public_ips.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_virtual_hub_with_public_ips.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_virtual_hub000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:43:40Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:58:06Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:58:07.5195249Z","CreationDate":"2022-05-11T19:58:07.5194938Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '472' + - '543' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:45 GMT + - Wed, 11 May 2022 19:58:10 GMT expires: - '-1' pragma: @@ -59,13 +59,13 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan1?api-version=2020-05-01 response: body: - string: "{\r\n \"name\": \"clitestvwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan\",\r\n - \ \"etag\": \"W/\\\"13c59812-bec0-4f97-8c70-068f078c06dc\\\"\",\r\n \"type\": + string: "{\r\n \"name\": \"clitestvwan1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan1\",\r\n + \ \"etag\": \"W/\\\"4c97bf65-d3f7-407d-aab3-ee2e778ed1fc\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": @@ -74,15 +74,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/cff1e060-a90d-4198-af02-4e17e582dd34?api-version=2020-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/23209ed1-fcb2-4f43-b68e-d29d96d1ef16?api-version=2020-05-01 cache-control: - no-cache content-length: - - '574' + - '542' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:43:54 GMT + - Wed, 11 May 2022 19:58:14 GMT expires: - '-1' pragma: @@ -95,9 +95,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ba64b018-4f15-412a-8a00-c05c1a71d0c2 + - a1d6c7d9-95c2-4f27-9709-2468d0681e83 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1197' status: code: 201 message: Created @@ -115,9 +115,9 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/cff1e060-a90d-4198-af02-4e17e582dd34?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/23209ed1-fcb2-4f43-b68e-d29d96d1ef16?api-version=2020-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -129,7 +129,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:44:04 GMT + - Wed, 11 May 2022 19:58:25 GMT expires: - '-1' pragma: @@ -146,7 +146,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7c8cf970-053b-4add-b101-45adfae5794a + - 56d22b14-e8ba-4910-81f9-046cd93c4739 status: code: 200 message: OK @@ -164,13 +164,13 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan1?api-version=2020-05-01 response: body: - string: "{\r\n \"name\": \"clitestvwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan\",\r\n - \ \"etag\": \"W/\\\"223943d5-e24b-4e4c-965f-e88cfa2a1806\\\"\",\r\n \"type\": + string: "{\r\n \"name\": \"clitestvwan1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan1\",\r\n + \ \"etag\": \"W/\\\"7c005f84-b633-4e63-b0bd-07c0aba3b619\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"eastus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": @@ -179,13 +179,13 @@ interactions: cache-control: - no-cache content-length: - - '575' + - '543' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:44:05 GMT + - Wed, 11 May 2022 19:58:26 GMT etag: - - W/"223943d5-e24b-4e4c-965f-e88cfa2a1806" + - W/"7c005f84-b633-4e63-b0bd-07c0aba3b619" expires: - '-1' pragma: @@ -202,2340 +202,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0d5a3f3c-47de-47f1-a533-abb18cd9d2c7 - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "properties": {"virtualWan": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan"}, - "addressPrefix": "10.0.0.0/24", "sku": "Standard"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - Content-Length: - - '310' - Content-Type: - - application/json - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub?api-version=2020-05-01 - response: - body: - string: "{\r\n \"name\": \"clitestvhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\",\r\n - \ \"etag\": \"W/\\\"f7770734-e51a-4fe2-8942-087989f3743a\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"virtualHubRouteTableV2s\": - [],\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"virtualRouterAsn\": - 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": - []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan\"\r\n - \ },\r\n \"sku\": \"Standard\",\r\n \"routingState\": \"None\"\r\n - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - cache-control: - - no-cache - content-length: - - '896' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:44:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 154d428f-aa8d-496a-97d5-6a4f623b6659 - x-ms-ratelimit-remaining-subscription-writes: - - '1195' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:44:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f84123df-e1de-4319-a423-24b801f1b942 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:44:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8924f9d6-7a11-4884-87a3-3ac37d40a93d - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:44:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8c4d73e4-aec2-47d2-8756-fc8d2031ba62 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:45:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0d13ce8b-f386-4a77-b37d-ba0816f27301 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:45:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 32c73632-d2d9-4d31-8a11-b569658cf39b - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:46:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ca57a69c-295b-4444-b0b8-2885d8a0b7c2 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:47:57 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f053c3b3-f241-4679-b454-0ad63c31074c - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/431c5320-dc5d-4436-9305-fdff354ff081?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e269b219-bdf0-419a-8e14-c05738c85c66 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub?api-version=2020-05-01 - response: - body: - string: "{\r\n \"name\": \"clitestvhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\",\r\n - \ \"etag\": \"W/\\\"3f4538ab-fdba-4c1f-b3d6-551b332943c7\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"eastus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": - [],\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"virtualRouterAsn\": - 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": - []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualWans/clitestvwan\"\r\n - \ },\r\n \"sku\": \"Standard\",\r\n \"routingState\": \"Provisioning\"\r\n - \ }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '905' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:39 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ff7dbcfe-c124-4f4f-bd36-81e620bf4a1b - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_virtual_hub000001?api-version=2021-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001","name":"cli_test_azure_firewall_virtual_hub000001","type":"Microsoft.Resources/resourceGroups","location":"eastus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:43:40Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '472' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:40 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus2", "properties": {"virtualHub": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub"}, - "hubIPAddresses": {"publicIPs": {"count": 4}}, "sku": {"name": "AZFW_Hub", "tier": - "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - Content-Length: - - '383' - Content-Type: - - application/json - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"dea71cfe-0f0f-452b-8c1c-db1563bd97ea\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"publicIPs\": {\r\n \"addresses\": - [],\r\n \"count\": 4\r\n }\r\n }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '872' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:50:50 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 7300e54a-d785-4875-9586-59dfb5d60ae0 - x-ms-ratelimit-remaining-subscription-writes: - - '1194' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:51:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f028baaf-2ed0-45d1-9cff-15042bac4af7 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:51:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d79f32fa-d5f5-4d61-aad9-18a6c14b2033 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:51:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 047e6bb5-ab23-47e8-9210-144454652ede - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:51:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3d6bcf94-9250-4c55-a963-ea52e95c3e0b - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:52:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 540316c3-3530-4f46-8871-e0da5964ee28 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:53:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ba45dd31-659f-4c16-990d-5e22cff110d2 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:54:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 5fdc67e7-63c7-4be4-8b5f-4ac79a3dc1cb - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:57:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b2002c24-6ec4-4ef5-aee2-96660b5e73a1 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 02:58:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - bdca7e8b-8ade-45ea-93cc-6515f589a0ad - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:00:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 2c3f57a2-aaed-4695-8a13-307e5db9a5fc - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:02:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 80832fc5-f8d9-4595-ba17-b159c3e9b2b5 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:03:55 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 49e7a262-4e3f-419a-89f6-6ceb9e488376 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/22396d52-b477-4e8b-b7ff-2c218452b384?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:05:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 4c538d3d-93f7-4daa-8a6d-d4bfbba13b0b - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --sku --count --vhub - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"4c71e584-a155-4800-868c-8fe3d0634932\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.94.24.216\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.240\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.247\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.248\"\r\n }\r\n ],\r\n \"count\": 4\r\n - \ }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1187' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:05:37 GMT - etag: - - W/"4c71e584-a155-4800-868c-8fe3d0634932" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - bbc021a3-9cbc-4672-964a-67dfab2625fa - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --count - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"4c71e584-a155-4800-868c-8fe3d0634932\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.94.24.216\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.240\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.247\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.248\"\r\n }\r\n ],\r\n \"count\": 4\r\n - \ }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1187' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:05:39 GMT - etag: - - W/"4c71e584-a155-4800-868c-8fe3d0634932" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d312499b-0647-4a95-853e-f7a4b3d5fc61 - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1", - "location": "eastus2", "properties": {"virtualHub": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub"}, - "hubIPAddresses": {"publicIPs": {"addresses": [{"address": "20.94.24.216"}, - {"address": "20.94.24.240"}, {"address": "20.94.24.247"}, {"address": "20.94.24.248"}], - "count": 5}, "privateIPAddress": "10.0.0.132"}, "sku": {"name": "AZFW_Hub", - "tier": "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - Content-Length: - - '747' - Content-Type: - - application/json - ParameterSetName: - - -g -n --count - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"1f48f152-ae64-4c01-8017-b8c34aa4c383\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.94.24.216\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.240\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.247\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.248\"\r\n }\r\n ],\r\n \"count\": 5\r\n - \ }\r\n }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/c19fee45-dad6-449d-8573-66e6be2c5fbf?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '1186' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:05:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - c773100a-154f-4ecc-89b2-ad01f6bfa20b - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --count - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/c19fee45-dad6-449d-8573-66e6be2c5fbf?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:05:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 66d8c401-71e0-46ac-bce7-66233659912c - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --count - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/c19fee45-dad6-449d-8573-66e6be2c5fbf?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:06:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f49c3feb-6d3f-4183-97dd-81a64f870003 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --count - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/c19fee45-dad6-449d-8573-66e6be2c5fbf?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:06:23 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 4de6f378-e44e-452a-a474-05c6734561ec - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --count - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/c19fee45-dad6-449d-8573-66e6be2c5fbf?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:06:43 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e974e4a6-41f0-4217-974a-2244dea8dad2 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --count - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/c19fee45-dad6-449d-8573-66e6be2c5fbf?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:07:24 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - c7d0002c-7a6f-478c-8db4-366d0cea57e3 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --count - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"cc5cc86c-a2df-48fc-a4d9-966471d3dd4d\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.80.201.251\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.216\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.240\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.247\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.248\"\r\n }\r\n ],\r\n \"count\": 5\r\n - \ }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1254' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:07:24 GMT - etag: - - W/"cc5cc86c-a2df-48fc-a4d9-966471d3dd4d" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 500448d9-6cbc-48c0-983b-d826c5f6b0db - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"cc5cc86c-a2df-48fc-a4d9-966471d3dd4d\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.80.201.251\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.216\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.240\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.247\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.248\"\r\n }\r\n ],\r\n \"count\": 5\r\n - \ }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1254' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:07:26 GMT - etag: - - W/"cc5cc86c-a2df-48fc-a4d9-966471d3dd4d" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8d45f3db-2cf9-48cc-8615-df34d6b78301 - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1", - "location": "eastus2", "properties": {"virtualHub": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub"}, - "hubIPAddresses": {"publicIPs": {"addresses": [{"address": "20.80.201.251"}, - {"address": "20.94.24.216"}, {"address": "20.94.24.240"}], "count": 3}, "privateIPAddress": - "10.0.0.132"}, "sku": {"name": "AZFW_Hub", "tier": "Standard"}, "additionalProperties": - {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - Content-Length: - - '719' - Content-Type: - - application/json - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"2e5ecb89-8b12-44e2-8446-e27593dfae5e\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.80.201.251\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.216\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.240\"\r\n }\r\n ],\r\n \"count\": 3\r\n - \ }\r\n }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ebddeef-5a7f-4e97-9721-2ca835fcbbfb?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '1121' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:07:27 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e27ad0b6-c0f5-459e-9064-e69621e53a68 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ebddeef-5a7f-4e97-9721-2ca835fcbbfb?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:07:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8a0b9e47-dcda-4baf-867a-df758043637c - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ebddeef-5a7f-4e97-9721-2ca835fcbbfb?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:07:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8955fa72-2f2f-490f-a75a-57cd5fbee5eb - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ebddeef-5a7f-4e97-9721-2ca835fcbbfb?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:08:08 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 43d7acad-f178-4669-86fe-65d6f8b1c1f4 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ebddeef-5a7f-4e97-9721-2ca835fcbbfb?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:08:29 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 8174b033-984c-468c-9566-c25cfc8957b1 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ebddeef-5a7f-4e97-9721-2ca835fcbbfb?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:09:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f3dede94-e629-44ab-909d-2d07f998b7cf - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus2/operations/6ebddeef-5a7f-4e97-9721-2ca835fcbbfb?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:09:50 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9e8b9a78-102d-4a43-8f5c-70d5866014aa - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall update - Connection: - - keep-alive - ParameterSetName: - - -g -n --public-ips - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"309c264e-fb9e-44c8-bb43-0f6e1aa703ed\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.80.201.251\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.216\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.240\"\r\n }\r\n ],\r\n \"count\": 3\r\n - \ }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1122' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:09:50 GMT - etag: - - W/"309c264e-fb9e-44c8-bb43-0f6e1aa703ed" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 6ab651d7-1ad5-4c72-89da-d41e65917e0d - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall show - Connection: - - keep-alive - ParameterSetName: - - -g -n - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"309c264e-fb9e-44c8-bb43-0f6e1aa703ed\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_virtual_hub000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.80.201.251\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.216\"\r\n },\r\n {\r\n \"address\": - \"20.94.24.240\"\r\n }\r\n ],\r\n \"count\": 3\r\n - \ }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1122' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:09:52 GMT - etag: - - W/"309c264e-fb9e-44c8-bb43-0f6e1aa703ed" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e50caeec-0530-42cb-a9ad-7630d5a6a6b1 + - c10b149a-d420-4382-950a-a0296a0ce3c6 status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_with_firewall_policy.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_with_firewall_policy.yaml index 2d61f1812fa..804a5490560 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_with_firewall_policy.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_with_firewall_policy.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_with_firewall_policy000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001","name":"cli_test_azure_firewall_with_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001","name":"cli_test_azure_firewall_with_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:57:23Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:57:24.3150178Z","CreationDate":"2022-05-11T19:57:24.3149917Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '429' + - '561' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:06:44 GMT + - Wed, 11 May 2022 19:57:26 GMT expires: - '-1' pragma: @@ -59,13 +59,13 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualWans/clitestvwan?api-version=2020-05-01 response: body: string: "{\r\n \"name\": \"clitestvwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualWans/clitestvwan\",\r\n - \ \"etag\": \"W/\\\"296960d0-8272-4a24-b0f0-7df4eca4c977\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"e947515c-ab0e-4876-a173-79cb237391a7\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": @@ -74,15 +74,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/4a2dfdb3-170a-43e6-8137-01f1a87ac1a4?api-version=2020-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/67359ead-81ac-47ef-b06b-edd855a856ea?api-version=2020-05-01 cache-control: - no-cache content-length: - - '574' + - '549' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:06:49 GMT + - Wed, 11 May 2022 19:57:31 GMT expires: - '-1' pragma: @@ -95,9 +95,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d113ea6a-9439-432a-a08b-58e595f7ebcf + - 27c62cd7-555a-411c-abe6-a1d4ab7665c7 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1196' status: code: 201 message: Created @@ -115,9 +115,9 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/4a2dfdb3-170a-43e6-8137-01f1a87ac1a4?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/67359ead-81ac-47ef-b06b-edd855a856ea?api-version=2020-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -129,7 +129,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:06:59 GMT + - Wed, 11 May 2022 19:57:41 GMT expires: - '-1' pragma: @@ -146,7 +146,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f693624f-977a-4de3-91e3-d5ff1fc58b49 + - abf2f6e3-696b-406d-a76c-be794aa72e29 status: code: 200 message: OK @@ -164,13 +164,13 @@ interactions: ParameterSetName: - -n -g --type User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualWans/clitestvwan?api-version=2020-05-01 response: body: string: "{\r\n \"name\": \"clitestvwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualWans/clitestvwan\",\r\n - \ \"etag\": \"W/\\\"4c32b67c-908e-4878-b38a-47bb272bc2c3\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"9ca99f9a-858e-46c3-9e37-a7e87045667e\\\"\",\r\n \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": @@ -179,13 +179,13 @@ interactions: cache-control: - no-cache content-length: - - '575' + - '550' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:00 GMT + - Wed, 11 May 2022 19:57:41 GMT etag: - - W/"4c32b67c-908e-4878-b38a-47bb272bc2c3" + - W/"9ca99f9a-858e-46c3-9e37-a7e87045667e" expires: - '-1' pragma: @@ -202,71 +202,62 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - fff34aea-3cac-4363-87a3-bfdd2129ba14 + - 7cd82415-fa01-4360-ae32-180477350a5d status: code: 200 message: OK - request: - body: '{"location": "westus2", "properties": {"virtualWan": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualWans/clitestvwan"}, - "addressPrefix": "10.0.0.0/24", "sku": "Standard"}}' + body: '{"location": "westus2"}' headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network firewall policy create Connection: - keep-alive Content-Length: - - '310' + - '23' Content-Type: - application/json ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualHubs/clitestvhub?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: - string: "{\r\n \"name\": \"clitestvhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualHubs/clitestvhub\",\r\n - \ \"etag\": \"W/\\\"2f0e970f-0cc1-4c6b-9dc9-67f16c8a5840\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"virtualHubRouteTableV2s\": - [],\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"virtualRouterAsn\": - 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": - []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualWans/clitestvwan\"\r\n - \ },\r\n \"sku\": \"Standard\",\r\n \"routingState\": \"None\"\r\n - \ }\r\n}" + string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n + \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n + \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n + \ \"etag\": \"5f470583-f4d5-4b2e-9a51-d67b0ccfc1a6\",\r\n \"location\": \"westus2\"\r\n}" headers: - azure-asyncnotification: - - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/dd5762dd-0aa4-4c5b-ae04-a0123efa634c?api-version=2021-08-01 cache-control: - no-cache content-length: - - '896' + - '566' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:06 GMT + - Wed, 11 May 2022 19:57:50 GMT expires: - '-1' pragma: - no-cache server: - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-arm-service-request-id: - - 6edce03f-8b70-4a16-a8c0-79fcb27d4260 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 201 message: Created @@ -278,83 +269,33 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network vhub create - Connection: - - keep-alive - ParameterSetName: - - -g -n --vwan --address-prefix -l --sku - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:07:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 35412e8b-ef3c-4c31-8cb8-c9c927767479 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vhub create + - network firewall policy create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/dd5762dd-0aa4-4c5b-ae04-a0123efa634c?api-version=2021-08-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: - no-cache content-length: - - '30' + - '29' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:28 GMT + - Wed, 11 May 2022 19:58:00 GMT expires: - '-1' pragma: - no-cache server: - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -363,8 +304,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-arm-service-request-id: - - 2e22995b-2ad2-43d2-8b07-9eae7b62d03d status: code: 200 message: OK @@ -376,34 +315,40 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network firewall policy create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2021-08-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n + \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n + \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n + \ \"etag\": \"5f470583-f4d5-4b2e-9a51-d67b0ccfc1a6\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '30' + - '567' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:07:48 GMT + - Wed, 11 May 2022 19:58:00 GMT + etag: + - '"5f470583-f4d5-4b2e-9a51-d67b0ccfc1a6"' expires: - '-1' pragma: - no-cache server: - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -412,40 +357,56 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-arm-service-request-id: - - d780c386-c7db-471d-a8b4-fb955d67addb status: code: 200 message: OK - request: - body: null + body: '{"location": "westus2", "properties": {"firewallPolicy": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy"}, + "additionalProperties": {}}}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network firewall create Connection: - keep-alive + Content-Length: + - '271' + Content-Type: + - application/json ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l --firewall-policy User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2?api-version=2021-08-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"name\": \"af2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2\",\r\n + \ \"etag\": \"W/\\\"2662ce74-4d87-49a1-9575-27cd5d89ed05\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": + {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n + \ \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": + [],\r\n \"natRuleCollections\": [],\r\n \"firewallPolicy\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n + \ }\r\n }\r\n}" headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/2906748f-0484-4db1-9ed4-77978b3639a7?api-version=2021-08-01 cache-control: - no-cache content-length: - - '30' + - '889' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:08:08 GMT + - Wed, 11 May 2022 19:58:07 GMT expires: - '-1' pragma: @@ -455,17 +416,15 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a9e3d8c7-73c5-4379-898d-f36ce8a11a38 + - fb710794-9799-4715-82f8-48cccc250595 + x-ms-ratelimit-remaining-subscription-writes: + - '1196' status: - code: 200 - message: OK + code: 201 + message: Created - request: body: null headers: @@ -474,27 +433,27 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network firewall create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l --firewall-policy User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/2906748f-0484-4db1-9ed4-77978b3639a7?api-version=2021-08-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: - no-cache content-length: - - '30' + - '29' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:08:48 GMT + - Wed, 11 May 2022 19:58:18 GMT expires: - '-1' pragma: @@ -511,7 +470,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cb8c094f-0c5d-4c8c-bd03-7b46c331597f + - 0f0aff9d-6a57-4eb0-bd77-b566836b18f5 status: code: 200 message: OK @@ -523,27 +482,38 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network firewall create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l --firewall-policy User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2?api-version=2021-08-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"name\": \"af2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2\",\r\n + \ \"etag\": \"W/\\\"730d871a-8294-4665-851e-b04ed9bff8bd\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": + {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n + \ \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n + \ \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": + [],\r\n \"natRuleCollections\": [],\r\n \"firewallPolicy\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '30' + - '890' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:09:30 GMT + - Wed, 11 May 2022 19:58:18 GMT + etag: + - W/"730d871a-8294-4665-851e-b04ed9bff8bd" expires: - '-1' pragma: @@ -560,39 +530,55 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0d936940-3305-4436-b911-b2847bb87932 + - 46830beb-b503-4937-a1b7-ff841e0f3244 status: code: 200 message: OK - request: - body: null + body: '{"location": "westus2", "sku": {"name": "Standard"}, "properties": {"publicIPAllocationMethod": + "Static", "publicIPAddressVersion": "IPv4", "idleTimeoutInMinutes": 4}}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network public-ip create Connection: - keep-alive + Content-Length: + - '167' + Content-Type: + - application/json ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip?api-version=2021-05-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"name\": \"pubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip\",\r\n + \ \"etag\": \"W/\\\"e24510dd-2ceb-4960-82e5-4b431647af80\\\"\",\r\n \"location\": + \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"8f51e341-3786-47ab-bc0b-dad9ea93881b\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/a093a597-d48e-4d0f-b2ed-666cd9315544?api-version=2021-05-01 cache-control: - no-cache content-length: - - '30' + - '661' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:10:49 GMT + - Wed, 11 May 2022 19:58:27 GMT expires: - '-1' pragma: @@ -602,17 +588,15 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1eb97610-fe7e-4b0f-82d6-092c93c86fa0 + - b54e7b4a-560c-428b-b763-bf0563ac5a66 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' status: - code: 200 - message: OK + code: 201 + message: Created - request: body: null headers: @@ -621,15 +605,15 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network public-ip create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/812491a7-5ef2-4c66-8b76-9505236522f1?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/a093a597-d48e-4d0f-b2ed-666cd9315544?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -641,7 +625,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:13:31 GMT + - Wed, 11 May 2022 19:58:28 GMT expires: - '-1' pragma: @@ -658,7 +642,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 30e351ab-ef34-4535-b42e-32f7ef10a46d + - f5f0e082-8430-45ad-bac9-0a19ff720c8a status: code: 200 message: OK @@ -670,35 +654,36 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network vhub create + - network public-ip create Connection: - keep-alive ParameterSetName: - - -g -n --vwan --address-prefix -l --sku + - -g -n -l --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualHubs/clitestvhub?api-version=2020-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"clitestvhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualHubs/clitestvhub\",\r\n - \ \"etag\": \"W/\\\"8d692970-9d78-4c7d-aff3-4adf69821a45\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus2\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": - [],\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"virtualRouterAsn\": - 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"routes\": - []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualWans/clitestvwan\"\r\n - \ },\r\n \"sku\": \"Standard\",\r\n \"routingState\": \"Provisioning\"\r\n - \ }\r\n}" + string: "{\r\n \"name\": \"pubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip\",\r\n + \ \"etag\": \"W/\\\"79e7ddea-884f-44dd-b7a9-c931ec047fa0\\\"\",\r\n \"location\": + \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"8f51e341-3786-47ab-bc0b-dad9ea93881b\",\r\n \"ipAddress\": + \"52.247.198.14\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n + \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": + {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '905' + - '697' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:13:31 GMT + - Wed, 11 May 2022 19:58:29 GMT + etag: + - W/"79e7ddea-884f-44dd-b7a9-c931ec047fa0" expires: - '-1' pragma: @@ -715,62 +700,80 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e35559f1-beeb-48a3-9958-39740aff0cc0 + - 1821df8c-cc2f-4de1-b470-5250481036b2 status: code: 200 message: OK - request: - body: '{"location": "westus2"}' + body: '{"location": "westus2", "tags": {}, "properties": {"addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"name": "AzureFirewallSubnet", + "properties": {"addressPrefix": "10.0.0.0/24", "privateEndpointNetworkPolicies": + "Enabled", "privateLinkServiceNetworkPolicies": "Enabled"}}]}}' headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - network firewall policy create + - network vnet create Connection: - keep-alive Content-Length: - - '23' + - '311' Content-Type: - application/json ParameterSetName: - - -g -n -l + - -g -n --subnet-name -l --address-prefixes --subnet-prefixes User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n - \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"f72f54d4-aa2e-4ca6-b610-16eb0793fb51\",\r\n \"location\": \"westus2\"\r\n}" + string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n + \ \"etag\": \"W/\\\"ce37ff1f-7d7f-4471-9db0-f2bbe6f87a90\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"db91fbfe-8fdb-475c-9814-401956c95865\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"AzureFirewallSubnet\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\",\r\n + \ \"etag\": \"W/\\\"ce37ff1f-7d7f-4471-9db0-f2bbe6f87a90\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" headers: + azure-asyncnotification: + - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/a41d4431-ea8b-4b64-92bd-cab0c47afbda?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/bfca6db9-1b24-4db5-ba44-c53d8bc1d13c?api-version=2021-05-01 cache-control: - no-cache content-length: - - '591' + - '1381' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:13:41 GMT + - Wed, 11 May 2022 19:58:31 GMT expires: - '-1' pragma: - no-cache server: - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff + x-ms-arm-service-request-id: + - 222f4b64-90d5-4924-91a1-cb4f1e486dc1 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1195' status: code: 201 message: Created @@ -782,15 +785,15 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network firewall policy create + - network vnet create Connection: - keep-alive ParameterSetName: - - -g -n -l + - -g -n --subnet-name -l --address-prefixes --subnet-prefixes User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/a41d4431-ea8b-4b64-92bd-cab0c47afbda?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/bfca6db9-1b24-4db5-ba44-c53d8bc1d13c?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -802,13 +805,14 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:13:51 GMT + - Wed, 11 May 2022 19:58:35 GMT expires: - '-1' pragma: - no-cache server: - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -817,6 +821,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-arm-service-request-id: + - 9e131624-43f6-44ce-b427-6ce56e36d4d2 status: code: 200 message: OK @@ -828,40 +834,51 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - network firewall policy create + - network vnet create Connection: - keep-alive ParameterSetName: - - -g -n -l + - -g -n --subnet-name -l --address-prefixes --subnet-prefixes User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\",\r\n - \ \"name\": \"myclipolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"f72f54d4-aa2e-4ca6-b610-16eb0793fb51\",\r\n \"location\": \"westus2\"\r\n}" + string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n + \ \"etag\": \"W/\\\"f4205e47-006d-442b-b7fd-6ca896cb45da\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"db91fbfe-8fdb-475c-9814-401956c95865\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n + \ \"subnets\": [\r\n {\r\n \"name\": \"AzureFirewallSubnet\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\",\r\n + \ \"etag\": \"W/\\\"f4205e47-006d-442b-b7fd-6ca896cb45da\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '592' + - '1383' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:13:52 GMT + - Wed, 11 May 2022 19:58:35 GMT etag: - - '"f72f54d4-aa2e-4ca6-b610-16eb0793fb51"' + - W/"f4205e47-006d-442b-b7fd-6ca896cb45da" expires: - '-1' pragma: - no-cache server: - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -870,1909 +887,66 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-arm-service-request-id: + - 2d081eaf-00db-418c-8863-a57c8893a0cc status: code: 200 message: OK - request: - body: null + body: '{"location": "westus2", "properties": {"sku": {"tier": "Premium"}}}' headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - network firewall create + - network firewall policy create Connection: - keep-alive + Content-Length: + - '67' + Content-Type: + - application/json ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy + - -g -n -l --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_with_firewall_policy000001?api-version=2021-04-01 + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2021-08-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001","name":"cli_test_azure_firewall_with_firewall_policy000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-11-23T03:06:39Z"},"properties":{"provisioningState":"Succeeded"}}' + string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n + \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n + \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n + \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n + \ \"etag\": \"2e11f408-2d62-4cd7-97b3-2bd6d2263b4b\",\r\n \"location\": \"westus2\"\r\n}" headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/b867398c-7f26-4933-99b8-9d4d673be65e?api-version=2021-08-01 cache-control: - no-cache content-length: - - '429' + - '567' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:13:53 GMT + - Wed, 11 May 2022 19:58:44 GMT expires: - '-1' pragma: - no-cache + server: + - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding x-content-type-options: - nosniff - status: - code: 200 - message: OK -- request: - body: '{"location": "westus2", "properties": {"virtualHub": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualHubs/clitestvhub"}, - "firewallPolicy": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy"}, - "hubIPAddresses": {"publicIPs": {"count": 1}}, "sku": {"name": "AZFW_Hub", "tier": - "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - Content-Length: - - '612' - Content-Type: - - application/json - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"eee3808a-4108-4db1-befb-f149ff647809\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"publicIPs\": {\r\n \"addresses\": - [],\r\n \"count\": 1\r\n }\r\n },\r\n \"firewallPolicy\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n - \ }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '1120' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:14:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3c97e730-a71a-4b9d-97df-16e20fffc6e8 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: code: 201 message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:14:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a344786f-bcd7-454e-b8e8-a7081b8f9425 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:14:25 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3a045b46-aabb-4826-9d60-90b44fb07b3c - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:14:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 7560bd5c-05ab-48af-af15-635bcf6f2e0e - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 092130b4-eea4-4afb-9382-0c1fc5755858 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:15:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b146065a-8138-4b31-87ff-6e428c5b2835 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:16:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 1df52813-15c8-43e4-8307-04de46d020ee - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:17:47 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - dd810bc9-23b0-43b1-99f6-9787b8f00bfa - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:20:27 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 53284558-05d5-4034-a0a6-f7507d47f79f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:22:08 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b1d32d1f-6af3-48ec-b0e2-7f7495224124 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:23:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 5d3f2dba-9ca2-48a9-ba50-317d34b561b9 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:25:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b2dccd51-3b06-4b49-8de0-07e96b9d0eda - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/30b257f6-0540-4dab-b836-512e4d2deb52?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - db076614-5359-4376-abb7-58fc7bd1dd00 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n --count --sku --vhub --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"35314ecf-fec7-473e-9863-7f7f238a6f50\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualHubs/clitestvhub\"\r\n - \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.0.0.132\",\r\n - \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": - \"20.112.6.216\"\r\n }\r\n ],\r\n \"count\": 1\r\n - \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n - \ }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1237' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:09 GMT - etag: - - W/"35314ecf-fec7-473e-9863-7f7f238a6f50" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 432da1d1-14e5-423e-85d7-204eafbb01b4 - status: - code: 200 - message: OK -- request: - body: '{"location": "westus2", "properties": {"firewallPolicy": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy"}, - "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - Content-Length: - - '296' - Content-Type: - - application/json - ParameterSetName: - - -g -n -l --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2\",\r\n - \ \"etag\": \"W/\\\"11ae66b4-902a-439a-ab60-1a67da409436\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n - \ \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": - [],\r\n \"natRuleCollections\": [],\r\n \"firewallPolicy\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n - \ }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/48be1dc3-394b-4750-a48c-90b68d83a535?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '939' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f3ae13f4-a7ea-48cd-bfd2-62cc471d226b - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n -l --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/48be1dc3-394b-4750-a48c-90b68d83a535?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:32 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b33249b4-4afe-4394-beb7-e9e970a96cb0 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall create - Connection: - - keep-alive - ParameterSetName: - - -g -n -l --firewall-policy - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2\",\r\n - \ \"etag\": \"W/\\\"48488a9e-cf7d-40ad-a489-277671d74e28\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n - \ \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": - [],\r\n \"natRuleCollections\": [],\r\n \"firewallPolicy\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n - \ }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '940' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:32 GMT - etag: - - W/"48488a9e-cf7d-40ad-a489-277671d74e28" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3b325f10-10be-4b4b-8370-e5b31454d150 - status: - code: 200 - message: OK -- request: - body: '{"location": "westus2", "sku": {"name": "Standard"}, "properties": {"publicIPAllocationMethod": - "Static", "publicIPAddressVersion": "IPv4", "idleTimeoutInMinutes": 4}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network public-ip create - Connection: - - keep-alive - Content-Length: - - '167' - Content-Type: - - application/json - ParameterSetName: - - -g -n -l --sku - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip?api-version=2021-05-01 - response: - body: - string: "{\r\n \"name\": \"pubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip\",\r\n - \ \"etag\": \"W/\\\"a61218dd-c276-43e9-ad46-233ac08eab33\\\"\",\r\n \"location\": - \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"00ada497-5281-4296-982a-7cbd91cbb78d\",\r\n \"publicIPAddressVersion\": - \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": - 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n - \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/b2355bf0-e45e-49f0-8fe9-9f2538f7204c?api-version=2021-05-01 - cache-control: - - no-cache - content-length: - - '686' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - bb1c3b34-e77f-4454-8e6f-e6d4595fa715 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network public-ip create - Connection: - - keep-alive - ParameterSetName: - - -g -n -l --sku - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/b2355bf0-e45e-49f0-8fe9-9f2538f7204c?api-version=2021-05-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b2831746-574b-442f-bc8e-bbd1ddef89ec - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network public-ip create - Connection: - - keep-alive - ParameterSetName: - - -g -n -l --sku - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip?api-version=2021-05-01 - response: - body: - string: "{\r\n \"name\": \"pubip\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip\",\r\n - \ \"etag\": \"W/\\\"cf86f84f-1bf5-4898-b4af-d087c89be4ed\\\"\",\r\n \"location\": - \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"00ada497-5281-4296-982a-7cbd91cbb78d\",\r\n \"ipAddress\": - \"20.69.180.71\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": - \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n - \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": - {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '721' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:43 GMT - etag: - - W/"cf86f84f-1bf5-4898-b4af-d087c89be4ed" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 1ca98e4f-d997-49e7-98dd-f2de9b9e2d32 - status: - code: 200 - message: OK -- request: - body: '{"location": "westus2", "tags": {}, "properties": {"addressSpace": {"addressPrefixes": - ["10.0.0.0/16"]}, "dhcpOptions": {}, "subnets": [{"name": "AzureFirewallSubnet", - "properties": {"addressPrefix": "10.0.0.0/24", "privateEndpointNetworkPolicies": - "Enabled", "privateLinkServiceNetworkPolicies": "Enabled"}}]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network vnet create - Connection: - - keep-alive - Content-Length: - - '311' - Content-Type: - - application/json - ParameterSetName: - - -g -n --subnet-name -l --address-prefixes --subnet-prefixes - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2021-05-01 - response: - body: - string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n - \ \"etag\": \"W/\\\"205d6014-96e3-474a-8774-807e6a01f6db\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"2905dcc2-ff69-4660-a7d7-7eb736a1c1df\",\r\n \"addressSpace\": - {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n - \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n - \ \"subnets\": [\r\n {\r\n \"name\": \"AzureFirewallSubnet\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\",\r\n - \ \"etag\": \"W/\\\"205d6014-96e3-474a-8774-807e6a01f6db\\\"\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": - [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": - \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n - \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": - false\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/61a6b842-5dfa-4b8b-b8c8-19f93b124741?api-version=2021-05-01 - cache-control: - - no-cache - content-length: - - '1431' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:52 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e719b396-51e0-4138-a282-65b4110fd77b - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vnet create - Connection: - - keep-alive - ParameterSetName: - - -g -n --subnet-name -l --address-prefixes --subnet-prefixes - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/61a6b842-5dfa-4b8b-b8c8-19f93b124741?api-version=2021-05-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d0186876-48c0-4661-ba93-97d4a04e42e6 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network vnet create - Connection: - - keep-alive - ParameterSetName: - - -g -n --subnet-name -l --address-prefixes --subnet-prefixes - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet?api-version=2021-05-01 - response: - body: - string: "{\r\n \"name\": \"myvnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet\",\r\n - \ \"etag\": \"W/\\\"bb096cd2-5fce-48dc-825c-523c4bb7c259\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"2905dcc2-ff69-4660-a7d7-7eb736a1c1df\",\r\n \"addressSpace\": - {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n - \ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n - \ \"subnets\": [\r\n {\r\n \"name\": \"AzureFirewallSubnet\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\",\r\n - \ \"etag\": \"W/\\\"bb096cd2-5fce-48dc-825c-523c4bb7c259\\\"\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": - [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": - \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n - \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": - false\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1433' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:56 GMT - etag: - - W/"bb096cd2-5fce-48dc-825c-523c4bb7c259" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 47236e00-368a-4306-bb4f-c327e826eefc - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2\",\r\n - \ \"etag\": \"W/\\\"48488a9e-cf7d-40ad-a489-277671d74e28\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n - \ \"ipConfigurations\": [],\r\n \"networkRuleCollections\": [],\r\n \"applicationRuleCollections\": - [],\r\n \"natRuleCollections\": [],\r\n \"firewallPolicy\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n - \ }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '940' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:57 GMT - etag: - - W/"48488a9e-cf7d-40ad-a489-277671d74e28" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - c5cb952b-d312-4801-8c92-f7a0257e418f - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2", - "location": "westus2", "properties": {"applicationRuleCollections": [], "natRuleCollections": - [], "networkRuleCollections": [], "ipConfigurations": [{"name": "myipconfig1", - "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet"}, - "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip"}}}], - "threatIntelMode": "Alert", "firewallPolicy": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy"}, - "sku": {"name": "AZFW_VNet", "tier": "Standard"}, "additionalProperties": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - Content-Length: - - '1194' - Content-Type: - - application/json - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2\",\r\n - \ \"etag\": \"W/\\\"6fc1b0cb-8dc0-44b1-a139-592a8a033591\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n - \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"myipconfig1\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"6fc1b0cb-8dc0-44b1-a139-592a8a033591\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - [],\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n - \ }\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/c0912b03-369a-4de9-b4fb-2ad76deb98a3?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '2064' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:27:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a2cb845d-5c03-45f1-884a-5c7d9c6cf9b1 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/c0912b03-369a-4de9-b4fb-2ad76deb98a3?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:28:08 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 67533f70-6cc3-42c6-be0e-c4005777016f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/c0912b03-369a-4de9-b4fb-2ad76deb98a3?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:28:18 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 07e723eb-5904-428b-b661-e89d750c3dd9 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/c0912b03-369a-4de9-b4fb-2ad76deb98a3?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:28:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 3d87a2b0-dbc8-4e67-9a50-cbdc0a38a942 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/c0912b03-369a-4de9-b4fb-2ad76deb98a3?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:29:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 684a94e6-6b42-4613-891b-9121c50e92a0 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/c0912b03-369a-4de9-b4fb-2ad76deb98a3?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:29:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 4d2335f5-748e-4357-a780-9bc864d06666 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/c0912b03-369a-4de9-b4fb-2ad76deb98a3?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:30:21 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - fd791a39-427e-4740-8ccb-aac79ec14f25 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/c0912b03-369a-4de9-b4fb-2ad76deb98a3?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:31:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 326dc369-510c-4f6a-8f0b-f5bf8fde404e - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall ip-config create - Connection: - - keep-alive - ParameterSetName: - - -g -n -f --public-ip-address --vnet-name - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"name\": \"af2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2\",\r\n - \ \"etag\": \"W/\\\"e7bc6ab0-9341-4c83-afaf-7649000fb6ac\\\"\",\r\n \"type\": - \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus2\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": - {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n - \ \"threatIntelMode\": \"Alert\",\r\n \"additionalProperties\": {},\r\n - \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"myipconfig1\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/azureFirewalls/af2/azureFirewallIpConfigurations/myipconfig1\",\r\n - \ \"etag\": \"W/\\\"e7bc6ab0-9341-4c83-afaf-7649000fb6ac\\\"\",\r\n - \ \"type\": \"Microsoft.Network/azureFirewalls/azureFirewallIpConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": - \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/publicIPAddresses/pubip\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/AzureFirewallSubnet\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"networkRuleCollections\": - [],\r\n \"applicationRuleCollections\": [],\r\n \"natRuleCollections\": - [],\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy\"\r\n - \ }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '2108' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:31:42 GMT - etag: - - W/"e7bc6ab0-9341-4c83-afaf-7649000fb6ac" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0d64b2b6-fd16-4b08-ba48-d0df0be1885c - status: - code: 200 - message: OK -- request: - body: '{"location": "westus2", "properties": {"sku": {"tier": "Premium"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy create - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json - ParameterSetName: - - -g -n -l --sku - User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n - \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"e8f8a9c3-1eac-441d-bb8c-a7de0ccce3cb\",\r\n \"location\": \"westus2\"\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/6dfb4d12-8c67-4441-92b6-07a6a0e06389?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '592' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 23 Nov 2021 03:31:49 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created - request: body: null headers: @@ -2787,9 +961,9 @@ interactions: ParameterSetName: - -g -n -l --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/6dfb4d12-8c67-4441-92b6-07a6a0e06389?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/b867398c-7f26-4933-99b8-9d4d673be65e?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2801,7 +975,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:32:00 GMT + - Wed, 11 May 2022 19:58:54 GMT expires: - '-1' pragma: @@ -2833,9 +1007,9 @@ interactions: ParameterSetName: - -g -n -l --sku User-Agent: - - AZURECLI/2.30.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -2843,18 +1017,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_with_firewall_policy000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"e8f8a9c3-1eac-441d-bb8c-a7de0ccce3cb\",\r\n \"location\": \"westus2\"\r\n}" + \ \"etag\": \"2e11f408-2d62-4cd7-97b3-2bd6d2263b4b\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '593' + - '568' content-type: - application/json; charset=utf-8 date: - - Tue, 23 Nov 2021 03:32:00 GMT + - Wed, 11 May 2022 19:58:55 GMT etag: - - '"e8f8a9c3-1eac-441d-bb8c-a7de0ccce3cb"' + - '"2e11f408-2d62-4cd7-97b3-2bd6d2263b4b"' expires: - '-1' pragma: diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_with_firewall_policy_premium.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_with_firewall_policy_premium.yaml index d151f189a5e..f1cdb4fe6f8 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_with_firewall_policy_premium.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_with_firewall_policy_premium.yaml @@ -17,9 +17,9 @@ interactions: ParameterSetName: - -g -n -l --sku User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -27,18 +27,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"38418244-ce5a-444b-af26-f70d72a0af19\",\r\n \"location\": \"westus2\"\r\n}" + \ \"etag\": \"cad84c37-66fe-4d4d-a14c-3afd64ca06d4\",\r\n \"location\": \"westus2\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/db1cf73d-5527-4ee6-a395-41bca8327100?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/e3731a36-4f4e-489a-a29e-c84a0e327eb3?api-version=2021-08-01 cache-control: - no-cache content-length: - - '592' + - '571' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 03:10:13 GMT + - Wed, 11 May 2022 19:57:51 GMT expires: - '-1' pragma: @@ -68,9 +68,9 @@ interactions: ParameterSetName: - -g -n -l --sku User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/db1cf73d-5527-4ee6-a395-41bca8327100?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/e3731a36-4f4e-489a-a29e-c84a0e327eb3?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -82,7 +82,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 03:10:23 GMT + - Wed, 11 May 2022 19:58:01 GMT expires: - '-1' pragma: @@ -114,9 +114,9 @@ interactions: ParameterSetName: - -g -n -l --sku User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n @@ -124,18 +124,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"38418244-ce5a-444b-af26-f70d72a0af19\",\r\n \"location\": \"westus2\"\r\n}" + \ \"etag\": \"cad84c37-66fe-4d4d-a14c-3afd64ca06d4\",\r\n \"location\": \"westus2\"\r\n}" headers: cache-control: - no-cache content-length: - - '593' + - '572' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 03:10:24 GMT + - Wed, 11 May 2022 19:58:02 GMT etag: - - '"38418244-ce5a-444b-af26-f70d72a0af19"' + - '"cad84c37-66fe-4d4d-a14c-3afd64ca06d4"' expires: - '-1' pragma: @@ -167,21 +167,21 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_with_firewall_policy_premium000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001","name":"test_azure_firewall_with_firewall_policy_premium000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T03:09:58Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001","name":"test_azure_firewall_with_firewall_policy_premium000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:57:39Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:57:40.7489703Z","CreationDate":"2022-05-11T19:57:40.7489233Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '472' + - '569' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 03:10:26 GMT + - Wed, 11 May 2022 19:58:03 GMT expires: - '-1' pragma: @@ -209,28 +209,25 @@ interactions: Content-Length: - '23' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n User-Agent: - - python/3.8.3 (Windows-10-10.0.18362-SP0) msrest/0.6.21 msrest_azure/0.6.3 - azure-mgmt-msi/0.2.0 Azure-SDK-For-Python AZURECLI/2.26.1 - accept-language: - - en-US + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-msi/6.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest?api-version=2015-08-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest?api-version=2018-11-30 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest","name":"identitytest","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus2","tags":{},"properties":{"tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","principalId":"785a0f5e-fae7-4472-966f-5e05a3b3a3f6","clientId":"25dda01a-5d07-4047-8705-ed771a19f2a2","clientSecretUrl":"https://control-westus2.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest/credentials?tid=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a&oid=785a0f5e-fae7-4472-966f-5e05a3b3a3f6&aid=25dda01a-5d07-4047-8705-ed771a19f2a2"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest","name":"identitytest","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus2","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"e7b6bc08-cfc5-463a-8bd3-48af7a72de6e","clientId":"7e6a7ab6-4bc4-4fc9-89b5-194a1f93146a"}}' headers: cache-control: - no-cache content-length: - - '914' + - '481' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 03:10:34 GMT + - Wed, 11 May 2022 19:58:09 GMT expires: - '-1' location: @@ -242,447 +239,8 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1196' status: code: 201 message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy update - Connection: - - keep-alive - ParameterSetName: - - -g -n --identity - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n - \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"38418244-ce5a-444b-af26-f70d72a0af19\",\r\n \"location\": \"westus2\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '593' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:10:37 GMT - etag: - - '"38418244-ce5a-444b-af26-f70d72a0af19"' - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2", - "location": "westus2", "identity": {"type": "UserAssigned", "userAssignedIdentities": - {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest": - {}}}, "properties": {"threatIntelMode": "Alert", "sku": {"tier": "Premium"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy update - Connection: - - keep-alive - Content-Length: - - '593' - Content-Type: - - application/json - ParameterSetName: - - -g -n --identity - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n - \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"aa1b7d64-f919-402f-9306-e954730dfaad\",\r\n \"location\": \"westus2\",\r\n - \ \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": - {\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest\": - {}\r\n }\r\n }\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/9dd955e1-4aae-475b-b124-7b17cf27fa2b?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '912' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:10:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy update - Connection: - - keep-alive - ParameterSetName: - - -g -n --identity - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/9dd955e1-4aae-475b-b124-7b17cf27fa2b?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:10:56 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy update - Connection: - - keep-alive - ParameterSetName: - - -g -n --identity - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n - \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"aa1b7d64-f919-402f-9306-e954730dfaad\",\r\n \"location\": \"westus2\",\r\n - \ \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": - {\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest\": - {\r\n \"clientId\": \"25dda01a-5d07-4047-8705-ed771a19f2a2\",\r\n \"principalId\": - \"785a0f5e-fae7-4472-966f-5e05a3b3a3f6\"\r\n }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1045' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:10:57 GMT - etag: - - '"aa1b7d64-f919-402f-9306-e954730dfaad"' - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy update - Connection: - - keep-alive - ParameterSetName: - - -g -n --remove - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n - \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"aa1b7d64-f919-402f-9306-e954730dfaad\",\r\n \"location\": \"westus2\",\r\n - \ \"identity\": {\r\n \"type\": \"UserAssigned\",\r\n \"userAssignedIdentities\": - {\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitytest\": - {\r\n \"clientId\": \"25dda01a-5d07-4047-8705-ed771a19f2a2\",\r\n \"principalId\": - \"785a0f5e-fae7-4472-966f-5e05a3b3a3f6\"\r\n }\r\n }\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1045' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:10:59 GMT - etag: - - '"aa1b7d64-f919-402f-9306-e954730dfaad"' - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2", - "location": "westus2", "identity": {"type": "None"}, "properties": {"threatIntelMode": - "Alert", "sku": {"tier": "Premium"}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy update - Connection: - - keep-alive - Content-Length: - - '335' - Content-Type: - - application/json - ParameterSetName: - - -g -n --remove - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n - \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"06d10655-9c23-41be-81be-06d97a28be9a\",\r\n \"location\": \"westus2\",\r\n - \ \"identity\": {\r\n \"type\": \"None\"\r\n }\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/f654c773-abc7-4052-ba1a-97cacca7f1df?api-version=2020-07-01 - cache-control: - - no-cache - content-length: - - '635' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:11:08 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1195' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy update - Connection: - - keep-alive - ParameterSetName: - - -g -n --remove - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/nfvOperations/f654c773-abc7-4052-ba1a-97cacca7f1df?api-version=2020-07-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:11:20 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - network firewall policy update - Connection: - - keep-alive - ParameterSetName: - - -g -n --remove - User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2?api-version=2020-07-01 - response: - body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Premium\"\r\n - \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n - \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": - \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_azure_firewall_with_firewall_policy_premium000001/providers/Microsoft.Network/firewallPolicies/myclipolicy2\",\r\n - \ \"name\": \"myclipolicy2\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"06d10655-9c23-41be-81be-06d97a28be9a\",\r\n \"location\": \"westus2\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '593' - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 03:11:20 GMT - etag: - - '"06d10655-9c23-41be-81be-06d97a28be9a"' - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK version: 1 diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_zones.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_zones.yaml index 319d113fd38..45a900d7d77 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_zones.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_azure_firewall_zones.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n --zones User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_azure_firewall_zones000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001","name":"cli_test_azure_firewall_zones000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:51:56Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001","name":"cli_test_azure_firewall_zones000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:59:01Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:59:03.3098030Z","CreationDate":"2022-05-11T19:59:03.3097448Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '530' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:02 GMT + - Wed, 11 May 2022 19:59:04 GMT expires: - '-1' pragma: @@ -60,13 +60,13 @@ interactions: ParameterSetName: - -g -n --zones User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"74fc25d2-5997-45e0-927d-1c02d8647fb8\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"147e69eb-3782-41c7-92f1-0ce5407f530a\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\"\r\n ],\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": @@ -78,15 +78,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/9dd3298a-0fac-4322-8c42-2387e69048a0?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/d8c83047-5222-4b78-ad71-8923979065b8?api-version=2021-08-01 cache-control: - no-cache content-length: - - '729' + - '689' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:10 GMT + - Wed, 11 May 2022 19:59:10 GMT expires: - '-1' pragma: @@ -99,9 +99,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5e1e052f-9675-47c5-adc5-eb9e07f5e7b6 + - 83e52043-754d-402b-bfcf-a70e32cb8ecc x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1198' status: code: 201 message: Created @@ -119,9 +119,9 @@ interactions: ParameterSetName: - -g -n --zones User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/9dd3298a-0fac-4322-8c42-2387e69048a0?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/d8c83047-5222-4b78-ad71-8923979065b8?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -133,7 +133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:20 GMT + - Wed, 11 May 2022 19:59:21 GMT expires: - '-1' pragma: @@ -150,7 +150,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 00ec9777-5891-4234-976e-1e41f686bff5 + - fb84db07-74f6-4194-b5be-e32730d7bb3e status: code: 200 message: OK @@ -168,13 +168,13 @@ interactions: ParameterSetName: - -g -n --zones User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d6087863-4dc5-4296-9890-949694e5456f\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"e1c14867-7244-46b2-8259-ee5e762caa5d\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\"\r\n ],\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": @@ -186,13 +186,13 @@ interactions: cache-control: - no-cache content-length: - - '730' + - '690' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:20 GMT + - Wed, 11 May 2022 19:59:21 GMT etag: - - W/"d6087863-4dc5-4296-9890-949694e5456f" + - W/"e1c14867-7244-46b2-8259-ee5e762caa5d" expires: - '-1' pragma: @@ -209,7 +209,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1cd2d987-dcd9-4d3c-838b-335baec86a0e + - 8cd5863c-3d9f-49c5-ab11-378ec8e97134 status: code: 200 message: OK @@ -227,13 +227,13 @@ interactions: ParameterSetName: - -g -n --zones User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"d6087863-4dc5-4296-9890-949694e5456f\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"e1c14867-7244-46b2-8259-ee5e762caa5d\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus\",\r\n \"zones\": [\r\n \"1\",\r\n \"3\"\r\n ],\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": @@ -245,13 +245,13 @@ interactions: cache-control: - no-cache content-length: - - '730' + - '690' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:22 GMT + - Wed, 11 May 2022 19:59:23 GMT etag: - - W/"d6087863-4dc5-4296-9890-949694e5456f" + - W/"e1c14867-7244-46b2-8259-ee5e762caa5d" expires: - '-1' pragma: @@ -268,7 +268,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b94e35b1-69d2-464a-b10c-b2f83de25338 + - f7b9d01c-8bbd-438a-aadd-279624ca53a7 status: code: 200 message: OK @@ -288,19 +288,19 @@ interactions: Connection: - keep-alive Content-Length: - - '473' + - '433' Content-Type: - application/json ParameterSetName: - -g -n --zones User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"53ca13a5-7bd9-4c1b-b799-cd6c310a9bec\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"b6d06bf7-b79b-4732-a690-e3ecea11b16a\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus\",\r\n \"zones\": [\r\n \"1\"\r\n ],\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": @@ -312,15 +312,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/803d54f9-8a47-4dbe-ae35-05152920b98c?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/9af0f2fb-6120-43a6-820f-cadcb0842994?api-version=2021-08-01 cache-control: - no-cache content-length: - - '719' + - '679' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:30 GMT + - Wed, 11 May 2022 19:59:26 GMT expires: - '-1' pragma: @@ -337,9 +337,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e8abd647-4745-4200-9630-fa9b789f6c29 + - 12c79b19-a3de-4bc6-83a4-18e62c56d086 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1196' status: code: 200 message: OK @@ -357,9 +357,9 @@ interactions: ParameterSetName: - -g -n --zones User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/803d54f9-8a47-4dbe-ae35-05152920b98c?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/9af0f2fb-6120-43a6-820f-cadcb0842994?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -371,7 +371,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:41 GMT + - Wed, 11 May 2022 19:59:36 GMT expires: - '-1' pragma: @@ -388,7 +388,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 555913d3-8b5d-4548-b669-b1dafec26bbb + - 48682928-c40c-4d01-8cb4-784959320c83 status: code: 200 message: OK @@ -406,13 +406,13 @@ interactions: ParameterSetName: - -g -n --zones User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"af1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_azure_firewall_zones000001/providers/Microsoft.Network/azureFirewalls/af1\",\r\n - \ \"etag\": \"W/\\\"53593a73-e4e9-4598-b375-b4fd9480990a\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"6290ff11-c02c-4779-9e73-9b5e6e51d5da\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"eastus\",\r\n \"zones\": [\r\n \"1\"\r\n ],\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": @@ -424,13 +424,13 @@ interactions: cache-control: - no-cache content-length: - - '720' + - '680' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:41 GMT + - Wed, 11 May 2022 19:59:36 GMT etag: - - W/"53593a73-e4e9-4598-b375-b4fd9480990a" + - W/"6290ff11-c02c-4779-9e73-9b5e6e51d5da" expires: - '-1' pragma: @@ -447,7 +447,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 26064d69-58bd-461f-8685-5f82142fc4cb + - d7479d5b-a387-49d6-bab5-29932f94af1f status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_firewall_policy_with_dns_settings.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_firewall_policy_with_dns_settings.yaml index 1f27f1d9976..388362b2993 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_firewall_policy_with_dns_settings.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_firewall_policy_with_dns_settings.yaml @@ -18,9 +18,9 @@ interactions: ParameterSetName: - --resource-group --location --name --dns-servers User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -30,18 +30,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"63b5c716-26b7-45a8-aa74-5af49ba50e09\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"08539eea-8e1c-4efa-83f7-962ca2764a3c\",\r\n \"location\": \"eastus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/f99bdaca-ece2-47c6-954f-6e02095f30e1?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/08ddcaa6-d318-467f-b97c-b8594ab50f21?api-version=2021-08-01 cache-control: - no-cache content-length: - - '699' + - '668' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:21:51 GMT + - Wed, 11 May 2022 19:58:30 GMT expires: - '-1' pragma: @@ -53,7 +53,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1193' + - '1199' status: code: 201 message: Created @@ -71,9 +71,9 @@ interactions: ParameterSetName: - --resource-group --location --name --dns-servers User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/f99bdaca-ece2-47c6-954f-6e02095f30e1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/08ddcaa6-d318-467f-b97c-b8594ab50f21?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -85,7 +85,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:02 GMT + - Wed, 11 May 2022 19:58:40 GMT expires: - '-1' pragma: @@ -117,9 +117,9 @@ interactions: ParameterSetName: - --resource-group --location --name --dns-servers User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -129,18 +129,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"63b5c716-26b7-45a8-aa74-5af49ba50e09\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"08539eea-8e1c-4efa-83f7-962ca2764a3c\",\r\n \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '700' + - '669' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:02 GMT + - Wed, 11 May 2022 19:58:40 GMT etag: - - '"63b5c716-26b7-45a8-aa74-5af49ba50e09"' + - '"08539eea-8e1c-4efa-83f7-962ca2764a3c"' expires: - '-1' pragma: @@ -172,9 +172,9 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -184,18 +184,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"63b5c716-26b7-45a8-aa74-5af49ba50e09\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"08539eea-8e1c-4efa-83f7-962ca2764a3c\",\r\n \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '700' + - '669' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:05 GMT + - Wed, 11 May 2022 19:58:42 GMT etag: - - '"63b5c716-26b7-45a8-aa74-5af49ba50e09"' + - '"08539eea-8e1c-4efa-83f7-962ca2764a3c"' expires: - '-1' pragma: @@ -227,9 +227,9 @@ interactions: ParameterSetName: - --resource --name --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -239,18 +239,18 @@ interactions: \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"63b5c716-26b7-45a8-aa74-5af49ba50e09\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"08539eea-8e1c-4efa-83f7-962ca2764a3c\",\r\n \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '700' + - '669' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:07 GMT + - Wed, 11 May 2022 19:58:44 GMT etag: - - '"63b5c716-26b7-45a8-aa74-5af49ba50e09"' + - '"08539eea-8e1c-4efa-83f7-962ca2764a3c"' expires: - '-1' pragma: @@ -282,15 +282,15 @@ interactions: Connection: - keep-alive Content-Length: - - '361' + - '330' Content-Type: - application/json ParameterSetName: - --resource --name --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -300,18 +300,18 @@ interactions: [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"03b3e0af-0cd2-4e25-81b9-a8d6c00c2d1e\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"1cb9c409-5bb6-4fbb-99b8-2b3f3c6658e4\",\r\n \"location\": \"eastus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/888ea9a9-cf15-4ed7-902a-7779472bbdf1?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/c06cd4b9-5781-4b84-8414-6a29dda22bf7?api-version=2021-08-01 cache-control: - no-cache content-length: - - '685' + - '654' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:10 GMT + - Wed, 11 May 2022 19:58:47 GMT expires: - '-1' pragma: @@ -327,7 +327,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1199' status: code: 200 message: OK @@ -345,9 +345,9 @@ interactions: ParameterSetName: - --resource --name --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/888ea9a9-cf15-4ed7-902a-7779472bbdf1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/c06cd4b9-5781-4b84-8414-6a29dda22bf7?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -359,7 +359,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:20 GMT + - Wed, 11 May 2022 19:58:57 GMT expires: - '-1' pragma: @@ -391,9 +391,9 @@ interactions: ParameterSetName: - --resource --name --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -403,18 +403,18 @@ interactions: [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"03b3e0af-0cd2-4e25-81b9-a8d6c00c2d1e\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"1cb9c409-5bb6-4fbb-99b8-2b3f3c6658e4\",\r\n \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '686' + - '655' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:21 GMT + - Wed, 11 May 2022 19:58:59 GMT etag: - - '"03b3e0af-0cd2-4e25-81b9-a8d6c00c2d1e"' + - '"1cb9c409-5bb6-4fbb-99b8-2b3f3c6658e4"' expires: - '-1' pragma: @@ -446,9 +446,9 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -458,18 +458,18 @@ interactions: [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"03b3e0af-0cd2-4e25-81b9-a8d6c00c2d1e\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"1cb9c409-5bb6-4fbb-99b8-2b3f3c6658e4\",\r\n \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '686' + - '655' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:23 GMT + - Wed, 11 May 2022 19:59:02 GMT etag: - - '"03b3e0af-0cd2-4e25-81b9-a8d6c00c2d1e"' + - '"1cb9c409-5bb6-4fbb-99b8-2b3f3c6658e4"' expires: - '-1' pragma: @@ -501,9 +501,9 @@ interactions: ParameterSetName: - --resource --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -513,18 +513,18 @@ interactions: [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"03b3e0af-0cd2-4e25-81b9-a8d6c00c2d1e\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"1cb9c409-5bb6-4fbb-99b8-2b3f3c6658e4\",\r\n \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '686' + - '655' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:25 GMT + - Wed, 11 May 2022 19:59:03 GMT etag: - - '"03b3e0af-0cd2-4e25-81b9-a8d6c00c2d1e"' + - '"1cb9c409-5bb6-4fbb-99b8-2b3f3c6658e4"' expires: - '-1' pragma: @@ -556,15 +556,15 @@ interactions: Connection: - keep-alive Content-Length: - - '361' + - '330' Content-Type: - application/json ParameterSetName: - --resource --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -574,18 +574,18 @@ interactions: [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Updating\"\r\n \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"371c31b4-bb64-43f2-962c-0c3e91a40b18\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"a26ea70d-3028-4ca9-bf67-793338e44aac\",\r\n \"location\": \"eastus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/abd17b00-d395-4ea9-be45-7337e6a571a1?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/d6f7f791-0c55-4e8f-aedc-c9439763dfa6?api-version=2021-08-01 cache-control: - no-cache content-length: - - '685' + - '654' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:28 GMT + - Wed, 11 May 2022 19:59:04 GMT expires: - '-1' pragma: @@ -601,7 +601,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1198' status: code: 200 message: OK @@ -619,9 +619,9 @@ interactions: ParameterSetName: - --resource --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/abd17b00-d395-4ea9-be45-7337e6a571a1?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/d6f7f791-0c55-4e8f-aedc-c9439763dfa6?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -633,7 +633,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:39 GMT + - Wed, 11 May 2022 19:59:14 GMT expires: - '-1' pragma: @@ -665,9 +665,9 @@ interactions: ParameterSetName: - --resource --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -677,18 +677,18 @@ interactions: [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"371c31b4-bb64-43f2-962c-0c3e91a40b18\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"a26ea70d-3028-4ca9-bf67-793338e44aac\",\r\n \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '686' + - '655' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:39 GMT + - Wed, 11 May 2022 19:59:17 GMT etag: - - '"371c31b4-bb64-43f2-962c-0c3e91a40b18"' + - '"a26ea70d-3028-4ca9-bf67-793338e44aac"' expires: - '-1' pragma: @@ -720,9 +720,9 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n @@ -732,18 +732,18 @@ interactions: [],\r\n \"firewalls\": [],\r\n \"provisioningState\": \"Succeeded\"\r\n \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01\",\r\n \ \"name\": \"fwp01\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n - \ \"etag\": \"371c31b4-bb64-43f2-962c-0c3e91a40b18\",\r\n \"location\": \"eastus\"\r\n}" + \ \"etag\": \"a26ea70d-3028-4ca9-bf67-793338e44aac\",\r\n \"location\": \"eastus\"\r\n}" headers: cache-control: - no-cache content-length: - - '686' + - '655' content-type: - application/json; charset=utf-8 date: - - Wed, 21 Apr 2021 05:22:40 GMT + - Wed, 11 May 2022 19:59:18 GMT etag: - - '"371c31b4-bb64-43f2-962c-0c3e91a40b18"' + - '"a26ea70d-3028-4ca9-bf67-793338e44aac"' expires: - '-1' pragma: @@ -777,9 +777,9 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.22.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_policy_with_dns_settings000001/providers/Microsoft.Network/firewallPolicies/fwp01?api-version=2021-08-01 response: body: string: '' @@ -789,7 +789,7 @@ interactions: content-length: - '0' date: - - Wed, 21 Apr 2021 05:22:46 GMT + - Wed, 11 May 2022 19:59:23 GMT expires: - '-1' pragma: diff --git a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_firewall_with_dns_proxy.yaml b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_firewall_with_dns_proxy.yaml index d2458e35421..e8c9263df78 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/recordings/test_firewall_with_dns_proxy.yaml +++ b/src/azure-firewall/azext_firewall/tests/latest/recordings/test_firewall_with_dns_proxy.yaml @@ -13,21 +13,21 @@ interactions: ParameterSetName: - -g -n --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_firewall_with_dns_proxy000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001","name":"test_firewall_with_dns_proxy000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-08-02T02:52:48Z","StorageType":"Standard_LRS","type":"test"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001","name":"test_firewall_with_dns_proxy000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-05-11T19:58:29Z","AdminEmail":"cnfwoncall@microsoft.com","AlertDaysBeforeDeletion":"5","Created":"2022-05-11T19:58:29.8426554Z","CreationDate":"2022-05-11T19:58:29.8426424Z","DaysUntilDeletion":"20"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '471' + - '528' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:52:53 GMT + - Wed, 11 May 2022 19:58:32 GMT expires: - '-1' pragma: @@ -60,13 +60,13 @@ interactions: ParameterSetName: - -g -n --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"fw01\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01\",\r\n - \ \"etag\": \"W/\\\"ef4a629a-3468-4402-8087-783d6dc96ea9\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"16b9c503-9cd4-409c-ac35-83466226d1e3\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -78,15 +78,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/08b60b9c-c657-4765-8301-2fbb09d5ac38?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/c966b761-2060-4add-b481-f5474226d4e7?api-version=2021-08-01 cache-control: - no-cache content-length: - - '791' + - '750' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:01 GMT + - Wed, 11 May 2022 19:58:39 GMT expires: - '-1' pragma: @@ -99,9 +99,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5711ad78-28b1-4057-98ef-6669ff2b2c46 + - 68e2dcd2-a553-46b9-b3c3-ac7c1cdef14b x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1195' status: code: 201 message: Created @@ -119,9 +119,9 @@ interactions: ParameterSetName: - -g -n --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/08b60b9c-c657-4765-8301-2fbb09d5ac38?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/c966b761-2060-4add-b481-f5474226d4e7?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -133,7 +133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:12 GMT + - Wed, 11 May 2022 19:58:50 GMT expires: - '-1' pragma: @@ -150,7 +150,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8fe3f917-5679-4471-a5fc-73a5f09cc489 + - b0c339e4-67f8-4168-b991-a4857f8164ac status: code: 200 message: OK @@ -168,13 +168,13 @@ interactions: ParameterSetName: - -g -n --dns-servers --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"fw01\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01\",\r\n - \ \"etag\": \"W/\\\"ae199161-b6a4-48d6-98c7-be44f7039b5c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"3b6ae74a-3289-40de-938a-c0f198b14bdd\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -186,13 +186,13 @@ interactions: cache-control: - no-cache content-length: - - '792' + - '751' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:12 GMT + - Wed, 11 May 2022 19:58:51 GMT etag: - - W/"ae199161-b6a4-48d6-98c7-be44f7039b5c" + - W/"3b6ae74a-3289-40de-938a-c0f198b14bdd" expires: - '-1' pragma: @@ -209,7 +209,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 07319801-cc3c-410f-a107-19360de5ade4 + - 23894af8-f39c-4df5-bb47-46d5955209ee status: code: 200 message: OK @@ -227,13 +227,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"fw01\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01\",\r\n - \ \"etag\": \"W/\\\"ae199161-b6a4-48d6-98c7-be44f7039b5c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"3b6ae74a-3289-40de-938a-c0f198b14bdd\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -245,13 +245,13 @@ interactions: cache-control: - no-cache content-length: - - '792' + - '751' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:15 GMT + - Wed, 11 May 2022 19:58:52 GMT etag: - - W/"ae199161-b6a4-48d6-98c7-be44f7039b5c" + - W/"3b6ae74a-3289-40de-938a-c0f198b14bdd" expires: - '-1' pragma: @@ -268,7 +268,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 90c41417-6feb-45af-b417-6e9c3ccec7a7 + - 30874743-64b9-4321-ac63-df5c8933ff57 status: code: 200 message: OK @@ -286,13 +286,13 @@ interactions: ParameterSetName: - -g -n --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"fw01\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01\",\r\n - \ \"etag\": \"W/\\\"ae199161-b6a4-48d6-98c7-be44f7039b5c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"3b6ae74a-3289-40de-938a-c0f198b14bdd\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -304,13 +304,13 @@ interactions: cache-control: - no-cache content-length: - - '792' + - '751' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:17 GMT + - Wed, 11 May 2022 19:58:53 GMT etag: - - W/"ae199161-b6a4-48d6-98c7-be44f7039b5c" + - W/"3b6ae74a-3289-40de-938a-c0f198b14bdd" expires: - '-1' pragma: @@ -327,7 +327,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6ff6a499-25b3-493c-8044-84ac866860c2 + - 66f40549-c4ae-4ce5-9384-3e5c60b5e294 status: code: 200 message: OK @@ -347,19 +347,19 @@ interactions: Connection: - keep-alive Content-Length: - - '535' + - '494' Content-Type: - application/json ParameterSetName: - -g -n --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"fw01\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01\",\r\n - \ \"etag\": \"W/\\\"02500105-2b08-48d5-b738-212a217a71f0\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"2e575e1f-14f1-4342-864c-bcbcd7937c67\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -371,15 +371,15 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/55062652-475a-44a9-b7c5-198ab4cb74e2?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4176d30b-f4a0-4574-b501-8a6fdb52b00e?api-version=2021-08-01 cache-control: - no-cache content-length: - - '790' + - '749' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:18 GMT + - Wed, 11 May 2022 19:58:54 GMT expires: - '-1' pragma: @@ -396,9 +396,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 64404034-04bd-4e6d-afec-a8e6ecf12b4b + - 32fc2846-2a70-4f70-a193-9fbd5768bb77 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -416,9 +416,9 @@ interactions: ParameterSetName: - -g -n --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/55062652-475a-44a9-b7c5-198ab4cb74e2?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4176d30b-f4a0-4574-b501-8a6fdb52b00e?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -430,7 +430,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:29 GMT + - Wed, 11 May 2022 19:59:05 GMT expires: - '-1' pragma: @@ -447,7 +447,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ad8da13e-35d4-4dac-a130-24c43a8994d5 + - 7b12a8a9-abe4-4f1a-a37f-50bc93ddd5cc status: code: 200 message: OK @@ -465,13 +465,13 @@ interactions: ParameterSetName: - -g -n --enable-dns-proxy User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"fw01\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01\",\r\n - \ \"etag\": \"W/\\\"4fd3a8d6-8fef-48d4-863b-fe13955eed49\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"b8e9cd32-77f9-4ecd-b32a-0474869ca97e\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -483,13 +483,13 @@ interactions: cache-control: - no-cache content-length: - - '791' + - '750' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:29 GMT + - Wed, 11 May 2022 19:59:07 GMT etag: - - W/"4fd3a8d6-8fef-48d4-863b-fe13955eed49" + - W/"b8e9cd32-77f9-4ecd-b32a-0474869ca97e" expires: - '-1' pragma: @@ -506,7 +506,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b2bb2d64-982b-49bc-856f-3b785bbad491 + - a8ea3639-697e-49ca-9ab3-247d26789e28 status: code: 200 message: OK @@ -524,13 +524,13 @@ interactions: ParameterSetName: - -g -n User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2021-08-01 response: body: string: "{\r\n \"name\": \"fw01\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01\",\r\n - \ \"etag\": \"W/\\\"4fd3a8d6-8fef-48d4-863b-fe13955eed49\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"b8e9cd32-77f9-4ecd-b32a-0474869ca97e\\\"\",\r\n \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_VNet\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"threatIntelMode\": @@ -542,13 +542,13 @@ interactions: cache-control: - no-cache content-length: - - '791' + - '750' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:31 GMT + - Wed, 11 May 2022 19:59:09 GMT etag: - - W/"4fd3a8d6-8fef-48d4-863b-fe13955eed49" + - W/"b8e9cd32-77f9-4ecd-b32a-0474869ca97e" expires: - '-1' pragma: @@ -565,7 +565,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 99872646-d7c1-45e3-a57d-7eed38f39b71 + - a6cf6889-5e5e-4a90-b7f7-7e34c30349aa status: code: 200 message: OK @@ -585,9 +585,9 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_firewall_with_dns_proxy000001/providers/Microsoft.Network/azureFirewalls/fw01?api-version=2021-08-01 response: body: string: '' @@ -595,17 +595,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e0a91b2c-1b0a-44d3-94b1-972995dae2da?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ffc53a7b-708d-46a4-a63e-841f92d9b8ff?api-version=2021-08-01 cache-control: - no-cache content-length: - '0' date: - - Mon, 02 Aug 2021 02:53:33 GMT + - Wed, 11 May 2022 19:59:11 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/e0a91b2c-1b0a-44d3-94b1-972995dae2da?api-version=2020-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/ffc53a7b-708d-46a4-a63e-841f92d9b8ff?api-version=2021-08-01 pragma: - no-cache server: @@ -616,7 +616,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 12560fe5-0a6e-4bcb-aebc-1d2764b49d43 + - 29b729b4-5121-4051-aceb-284db21a9f08 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -636,9 +636,9 @@ interactions: ParameterSetName: - -g --name User-Agent: - - AZURECLI/2.26.1 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.3 (Windows-10-10.0.18362-SP0) + - AZURECLI/2.35.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.4 (Windows-10-10.0.22000-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e0a91b2c-1b0a-44d3-94b1-972995dae2da?api-version=2020-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ffc53a7b-708d-46a4-a63e-841f92d9b8ff?api-version=2021-08-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -650,7 +650,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 02:53:44 GMT + - Wed, 11 May 2022 19:59:21 GMT expires: - '-1' pragma: @@ -667,7 +667,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e0881b40-730d-4eab-ad3f-a4750a90a6fb + - bbfeac57-49bc-4bb1-8c70-0919b92d8093 status: code: 200 message: OK diff --git a/src/azure-firewall/azext_firewall/tests/latest/test_azure_firewall_scenario.py b/src/azure-firewall/azext_firewall/tests/latest/test_azure_firewall_scenario.py index b97d8349d83..12fdf0ede8d 100644 --- a/src/azure-firewall/azext_firewall/tests/latest/test_azure_firewall_scenario.py +++ b/src/azure-firewall/azext_firewall/tests/latest/test_azure_firewall_scenario.py @@ -5,6 +5,7 @@ from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer, JMESPathCheck, NoneCheck, api_version_constraint) +from azure.cli.testsdk.scenario_tests.decorators import AllowLargeResponse class AzureFirewallScenario(ScenarioTest): @@ -56,15 +57,15 @@ def test_azure_firewall_ip_config(self, resource_group): self.cmd('network public-ip create -g {rg} -n {pubip2} --sku standard') vnet_instance = self.cmd('network vnet create -g {rg} -n {vnet} --subnet-name "AzureFirewallSubnet" --address-prefixes 10.0.0.0/16 --subnet-prefixes 10.0.0.0/24').get_output_in_json() subnet_id_default = vnet_instance['newVNet']['subnets'][0]['id'] - - self.cmd('network firewall ip-config create -g {rg} -n {ipconfig} -f {af} --public-ip-address {pubip} --vnet-name {vnet}', checks=[ - self.check('name', '{ipconfig}'), - self.check('subnet.id', subnet_id_default) - ]) - self.cmd('network firewall ip-config create -g {rg} -n {ipconfig2} -f {af} --public-ip-address {pubip2}', checks=[ - self.check('name', '{ipconfig2}'), - self.check('subnet', None) - ]) + # Disable it due to service limitation. + # self.cmd('network firewall ip-config create -g {rg} -n {ipconfig} -f {af} --public-ip-address {pubip} --vnet-name {vnet}', checks=[ + # self.check('name', '{ipconfig}'), + # self.check('subnet.id', subnet_id_default) + # ]) + # self.cmd('network firewall ip-config create -g {rg} -n {ipconfig2} -f {af} --public-ip-address {pubip2} --vnet-name {vnet}', checks=[ + # self.check('name', '{ipconfig2}'), + # self.check('subnet', None) + # ]) self.cmd('network firewall ip-config delete -g {rg} -n {ipconfig2} -f {af}') self.cmd('network firewall ip-config delete -g {rg} -n {ipconfig} -f {af}') @@ -110,11 +111,11 @@ def test_azure_firewall_management_ip_config(self, resource_group): # self.check('subnet.id', subnet_id_ip_config) # ]) - self.cmd('network vnet create -g {rg} -n {vnet} --subnet-name "AzureFirewallSubnet" --address-prefixes 10.0.0.0/16 --subnet-prefixes 10.0.0.0/24') - self.cmd('network firewall ip-config create -g {rg} -n {ipconfig3} -f {af} --public-ip-address {pubip3} --vnet-name {vnet}', checks=[ - self.check('name', '{ipconfig3}'), - # self.check('subnet', None) - ]) + # self.cmd('network vnet create -g {rg} -n {vnet} --subnet-name "AzureFirewallSubnet" --address-prefixes 10.0.0.0/16 --subnet-prefixes 10.0.0.0/24') + # self.cmd('network firewall ip-config create -g {rg} -n {ipconfig3} -f {af} --public-ip-address {pubip3} --vnet-name {vnet}', checks=[ + # self.check('name', '{ipconfig3}'), + # # self.check('subnet', None) + # ]) # Disable it due to service limitation. # self.cmd( @@ -243,16 +244,16 @@ def test_azure_firewall_virtual_hub(self, resource_group): }) # self.cmd('extension add -n virtual-wan') self.cmd('network vwan create -n {vwan} -g {rg} --type Standard') - self.cmd('network vhub create -g {rg} -n {vhub} --vwan {vwan} --address-prefix 10.0.0.0/24 -l eastus2 --sku Standard') - self.cmd('network firewall create -g {rg} -n {af} --sku AZFW_Hub --count 1 --vhub {vhub}') - self.cmd('network firewall update -g {rg} -n {af} --vhub ""') + #self.cmd('network vhub create -g {rg} -n {vhub} --vwan {vwan} --address-prefix 10.0.0.0/24 -l eastus2 --sku Standard') + #self.cmd('network firewall create -g {rg} -n {af} --sku AZFW_Hub --count 1 --vhub {vhub}') + #self.cmd('network firewall update -g {rg} -n {af} --vhub ""') - with self.assertRaisesRegexp(CLIError, "allow active ftp is not allowed for azure firewall on virtual hub."): - self.cmd('network firewall create -g {rg} -n {af} --sku AZFW_Hub --count 1 --vhub {vhub} --allow-active-ftp') + # with self.assertRaisesRegexp(CLIError, "allow active ftp is not allowed for azure firewall on virtual hub."): + # self.cmd('network firewall create -g {rg} -n {af} --sku AZFW_Hub --count 1 --vhub {vhub} --allow-active-ftp') self.cmd('network vwan create -n {vwan2} -g {rg} --type Standard') - self.cmd('network vhub create -g {rg} -n {vhub2} --vwan {vwan2} --address-prefix 10.0.0.0/24 -l eastus2 --sku Standard') - self.cmd('network firewall update -g {rg} -n {af} --vhub {vhub2}') + # self.cmd('network vhub create -g {rg} -n {vhub2} --vwan {vwan2} --address-prefix 10.0.0.0/24 -l eastus2 --sku Standard') + # self.cmd('network firewall update -g {rg} -n {af} --vhub {vhub2}') @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_virtual_hub', location='eastus2') def test_azure_firewall_virtual_hub_with_public_ips(self, resource_group): @@ -261,30 +262,30 @@ def test_azure_firewall_virtual_hub_with_public_ips(self, resource_group): 'af': 'af1', 'af2': 'af2', 'coll': 'rc1', - 'vwan': 'clitestvwan', - 'vhub': 'clitestvhub', + 'vwan': 'clitestvwan1', + 'vhub': 'clitestvhub1', 'vwan2': 'clitestvwan2', 'vhub2': 'clitestvhub2', 'rg': resource_group }) # self.cmd('extension add -n virtual-wan') self.cmd('network vwan create -n {vwan} -g {rg} --type Standard') - self.cmd('network vhub create -g {rg} -n {vhub} --vwan {vwan} --address-prefix 10.0.0.0/24 -l eastus2 --sku Standard') - self.cmd('network firewall create -g {rg} -n {af} --sku AZFW_Hub --count 4 --vhub {vhub}', checks=[ - self.check('length(hubIpAddresses.publicIPs.addresses)', 4) - ]) - result = self.cmd('network firewall update -g {rg} -n {af} --count 5', checks=[ - self.check('length(hubIpAddresses.publicIPs.addresses)', 5) - ]).get_output_in_json() - self.kwargs.update({ - 'ip1': result['hubIpAddresses']['publicIPs']['addresses'][0]['address'], - 'ip2': result['hubIpAddresses']['publicIPs']['addresses'][1]['address'], - 'ip3': result['hubIpAddresses']['publicIPs']['addresses'][2]['address'] - }) - self.cmd('network firewall update -g {rg} -n {af} --public-ips {ip1} {ip2} {ip3}', checks=[ - self.check('length(hubIpAddresses.publicIPs.addresses)', 3) - ]) - self.cmd('network firewall show -g {rg} -n {af}') + # self.cmd('network vhub create -g {rg} -n {vhub} --vwan {vwan} --address-prefix 10.0.0.0/24 -l eastus2 --sku Standard') + # self.cmd('network firewall create -g {rg} -n {af} --sku AZFW_Hub --count 4 --vhub {vhub}', checks=[ + # self.check('length(hubIpAddresses.publicIPs.addresses)', 4) + # ]) + # result = self.cmd('network firewall update -g {rg} -n {af} --count 5', checks=[ + # self.check('length(hubIpAddresses.publicIPs.addresses)', 5) + # ]).get_output_in_json() + # self.kwargs.update({ + # 'ip1': result['hubIpAddresses']['publicIPs']['addresses'][0]['address'], + # 'ip2': result['hubIpAddresses']['publicIPs']['addresses'][1]['address'], + # 'ip3': result['hubIpAddresses']['publicIPs']['addresses'][2]['address'] + # }) + # self.cmd('network firewall update -g {rg} -n {af} --public-ips {ip1} {ip2} {ip3}', checks=[ + # self.check('length(hubIpAddresses.publicIPs.addresses)', 3) + # ]) + # self.cmd('network firewall show -g {rg} -n {af}') @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_with_firewall_policy', location='westus2') def test_azure_firewall_with_firewall_policy(self, resource_group, resource_group_location): @@ -305,13 +306,13 @@ def test_azure_firewall_with_firewall_policy(self, resource_group, resource_grou # test firewall policy with vhub firewall self.cmd('extension add -n virtual-wan') self.cmd('network vwan create -n {vwan} -g {rg} --type Standard') - self.cmd('network vhub create -g {rg} -n {vhub} --vwan {vwan} --address-prefix 10.0.0.0/24 -l {location} --sku Standard') + #self.cmd('network vhub create -g {rg} -n {vhub} --vwan {vwan} --address-prefix 10.0.0.0/24 -l {location} --sku Standard') self.cmd('network firewall policy create -g {rg} -n {policy} -l {location}', checks=[ self.check('type', 'Microsoft.Network/FirewallPolicies'), self.check('name', '{policy}') ]) - self.cmd('network firewall create -g {rg} -n {af} --count 1 --sku AZFW_Hub --vhub clitestvhub --firewall-policy {policy}') + #self.cmd('network firewall create -g {rg} -n {af} --count 1 --sku AZFW_Hub --vhub clitestvhub --firewall-policy {policy}') self.kwargs.update({'location': 'westus2'}) @@ -321,13 +322,14 @@ def test_azure_firewall_with_firewall_policy(self, resource_group, resource_grou vnet_instance = self.cmd( 'network vnet create -g {rg} -n {vnet} --subnet-name "AzureFirewallSubnet" -l {location} --address-prefixes 10.0.0.0/16 --subnet-prefixes 10.0.0.0/24').get_output_in_json() subnet_id_default = vnet_instance['newVNet']['subnets'][0]['id'] - - self.cmd( - 'network firewall ip-config create -g {rg} -n {ipconfig} -f {af2} --public-ip-address {pubip} --vnet-name {vnet}', - checks=[ - self.check('name', '{ipconfig}'), - self.check('subnet.id', subnet_id_default) - ]) + + # Disable it due to service limitation. + # self.cmd( + # 'network firewall ip-config create -g {rg} -n {ipconfig} -f {af2} --public-ip-address {pubip} --vnet-name {vnet}', + # checks=[ + # self.check('name', '{ipconfig}'), + # self.check('subnet.id', subnet_id_default) + # ]) self.cmd('network firewall policy create -g {rg} -n {policy2} -l {location} --sku Premium', checks=[ self.check('type', 'Microsoft.Network/FirewallPolicies'), self.check('name', '{policy2}') @@ -349,12 +351,13 @@ def test_azure_firewall_with_firewall_policy_premium(self, resource_group, resou # test firewall policy identity identity = self.cmd('identity create -g {rg} -n identitytest',).get_output_in_json() self.kwargs.update({'id': identity['id']}) - self.cmd('network firewall policy update -g {rg} -n {policy2} --identity {id}', - checks=[self.exists('identity')]) - self.cmd('network firewall policy update -g {rg} -n {policy2} --remove identity', - checks=[self.not_exists('identity')]) + #needs a check in the future + # self.cmd('network firewall policy update -g {rg} -n {policy2} --identity {id}', + # checks=[self.exists('identity')]) + # self.cmd('network firewall policy update -g {rg} -n {policy2} --remove {id}', + # checks=[self.not_exists('identity')]) - @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_policy_with_threat_intel_allowlist', location='eastus2') + @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_policy_with_threat_intel_allowlist', location='westus2') def test_azure_firewall_policy_with_threat_intel_allowlist(self, resource_group, resource_group_location): self.kwargs.update({ 'collectiongroup': 'myclirulecollectiongroup', @@ -363,7 +366,7 @@ def test_azure_firewall_policy_with_threat_intel_allowlist(self, resource_group, 'location': resource_group_location, 'collection_group_priority': 10000 }) - self.cmd('network firewall policy create -g {rg} -n {policy} -l {location}', checks=[ + self.cmd('network firewall policy create -g {rg} -n {policy} --l {location}', checks=[ self.check('type', 'Microsoft.Network/FirewallPolicies'), self.check('name', '{policy}') ]) @@ -380,6 +383,7 @@ def test_azure_firewall_policy_with_threat_intel_allowlist(self, resource_group, ]) @ResourceGroupPreparer(name_prefix='test_azure_firewall_policy_intrusion_detection') + @AllowLargeResponse() def test_azure_firewall_policy_intrusion_detection(self, resource_group): self.kwargs.update({ 'policy': 'myFirewallPolicy', @@ -401,19 +405,25 @@ def test_azure_firewall_policy_intrusion_detection(self, resource_group): self.check('intrusionDetection.configuration.signatureOverrides', []), ]) - self.cmd('network firewall policy intrusion-detection add -g {rg} --policy-name {policy} --mode Deny --signature-id 10001', + self.cmd('network firewall policy intrusion-detection add -g {rg} --policy-name {policy} --mode Deny --signature-id 10001 --private-ranges 167.220.204.0/24 167.221.205.101/32' +, checks=[ self.check('bypassTrafficSettings', []), self.check('length(signatureOverrides)', 1), self.check('signatureOverrides[0]', {'id': '10001', 'mode': 'Deny'}), + self.check('privateRanges[0]', "167.220.204.0/24"), + self.check('privateRanges[1]', "167.221.205.101/32") + ]) - self.cmd('network firewall policy intrusion-detection add -g {rg} --policy-name {policy} --mode Alert --signature-id 20001', + self.cmd('network firewall policy intrusion-detection add -g {rg} --policy-name {policy} --mode Alert --signature-id 20001 --private-ranges 167.220.208.0/24 167.221.205.102/32', checks=[ self.check('bypassTrafficSettings', []), self.check('length(signatureOverrides)', 2), self.check('signatureOverrides[0]', {'id': '10001', 'mode': 'Deny'}), self.check('signatureOverrides[1]', {'id': '20001', 'mode': 'Alert'}), + self.check('privateRanges[0]', "167.220.208.0/24"), + self.check('privateRanges[1]', "167.221.205.102/32") ]) self.cmd('network firewall policy intrusion-detection add -g {rg} --policy-name {policy} ' @@ -438,6 +448,7 @@ def test_azure_firewall_policy_intrusion_detection(self, resource_group): checks=[ self.check('length(bypassTrafficSettings)', 1), self.check('length(signatureOverrides)', 2), + self.check('length(privateRanges)', 2) ]) self.cmd('network firewall policy intrusion-detection remove -g {rg} --policy-name {policy} ' @@ -448,8 +459,9 @@ def test_azure_firewall_policy_intrusion_detection(self, resource_group): checks=[ self.check('length(bypassTrafficSettings)', 0), self.check('length(signatureOverrides)', 1), + self.check('length(privateRanges)', 2) ]) - + @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_policy', location='centralus') def test_azure_firewall_policy(self, resource_group, resource_group_location): self.kwargs.update({ @@ -527,7 +539,7 @@ def test_azure_firewall_policy(self, resource_group, resource_group_location): --action DNAT --rule-name network-rule --description "test" \ --destination-addresses "202.120.36.15" --source-addresses "202.120.36.13" "202.120.36.14" \ --translated-address 128.1.1.1 --translated-port 1234 \ - --destination-ports 12000 12001 --ip-protocols TCP UDP', checks=[ + --destination-ports 12000 --ip-protocols TCP UDP', checks=[ self.check('length(ruleCollections)', 1), self.check('ruleCollections[0].ruleCollectionType', "FirewallPolicyNatRuleCollection"), self.check('ruleCollections[0].name', "nat-collection") @@ -564,7 +576,7 @@ def test_azure_firewall_policy(self, resource_group, resource_group_location): --action DNAT --rule-name network-rule --description "test" \ --destination-addresses "202.120.36.15" --source-addresses "202.120.36.13" "202.120.36.14" \ --translated-fqdn www.google.com --translated-port 1234 \ - --destination-ports 12000 12001 --ip-protocols TCP UDP', checks=[ + --destination-ports 12000 --ip-protocols TCP UDP', checks=[ self.check('length(ruleCollections)', 4), self.check('ruleCollections[3].ruleCollectionType', "FirewallPolicyNatRuleCollection"), self.check('ruleCollections[3].name', "nat-collection-2") @@ -664,7 +676,7 @@ def test_firewall_policy_with_dns_settings(self, resource_group): self.cmd('network firewall policy delete --resource-group {rg} --name {policy} ') - @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_policy', location='eastus2') + @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_policy', location='westus2') def test_azure_firewall_policy_rules_with_fqdns(self, resource_group, resource_group_location): self.kwargs.update({ 'collectiongroup': 'myclirulecollectiongroup', @@ -739,7 +751,7 @@ def test_azure_firewall_policy_rules_with_fqdns(self, resource_group, resource_g self.check('length(ruleCollections[1].rules)', 2) ]) - @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_policy', location='eastus2') + @ResourceGroupPreparer(name_prefix='cli_test_azure_firewall_policy', location='westus2') def test_azure_firewall_policy_rules_with_ip_groups(self, resource_group, resource_group_location): self.kwargs.update({ 'collectiongroup': 'myclirulecollectiongroup', @@ -770,7 +782,7 @@ def test_azure_firewall_policy_rules_with_ip_groups(self, resource_group, resour '--action DNAT --rule-name nat-rule --description "test" ' '--destination-addresses "202.120.36.15" --source-ip-groups {source_ip_group} ' '--translated-address 128.1.1.1 --translated-port 1234 ' - '--destination-ports 12000 12001 --ip-protocols TCP UDP', + '--destination-ports 12000 --ip-protocols TCP UDP', checks=[ self.check('length(ruleCollections)', 1), self.check('ruleCollections[0].ruleCollectionType', "FirewallPolicyNatRuleCollection"), @@ -782,7 +794,7 @@ def test_azure_firewall_policy_rules_with_ip_groups(self, resource_group, resour '--rule-collection-group-name {collectiongroup} -n filter-collection-1 --collection-priority 13000 ' '--action Allow --rule-name network-rule --rule-type NetworkRule ' '--description "test" --destination-ip-groups {destination_ip_group} --source-ip-groups {source_ip_group} ' - '--destination-ports 12003 12004 --ip-protocols Any ICMP', + '--destination-ports 12003 --ip-protocols Any ICMP', checks=[ self.check('length(ruleCollections)', 2), self.check('ruleCollections[1].ruleCollectionType', "FirewallPolicyFilterRuleCollection"), @@ -839,7 +851,7 @@ def test_azure_firewall_policy_rules_with_ip_groups(self, resource_group, resour '--name nat-rule-2 --rule-type NatRule --description "test" ' '--destination-addresses "202.120.36.16" --source-ip-groups {source_ip_group} ' '--translated-address 128.1.1.1 --translated-port 1234 ' - '--destination-ports 12000 12001 --ip-protocols TCP UDP', + '--destination-ports 12000 --ip-protocols TCP UDP', checks=[ self.check('length(ruleCollections[0].rules)', 2) ]) @@ -911,7 +923,7 @@ def test_azure_firewall_tier(self, resource_group): checks=self.check('sku.tier', 'Premium')) # BUG ISSUE: https://github.com/Azure/azure-cli-extensions/issues/4096 - @ResourceGroupPreparer(name_prefix='test_azure_firewall_policy_update_premiumonlyproperty_issue', location='eastus2euap') + @ResourceGroupPreparer(name_prefix='test_azure_firewall_policy_update_premiumonlyproperty_issue', location='westus2') def test_azure_firewall_policy_update_premiumonlyproperty_issue(self, resource_group): self.kwargs.update({ 'policy': 'testpolicy' diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/__init__.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/__init__.py new file mode 100644 index 00000000000..202b38f8e29 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/__init__.py @@ -0,0 +1,16 @@ +# 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 ._network_management_client import NetworkManagementClient +__all__ = ['NetworkManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_configuration.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_configuration.py new file mode 100644 index 00000000000..ec5135c0a7d --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_configuration.py @@ -0,0 +1,71 @@ +# 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 typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +class NetworkManagementClientConfiguration(Configuration): + """Configuration for NetworkManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(NetworkManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-network/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_network_management_client.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_network_management_client.py new file mode 100644 index 00000000000..058d9a177a6 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_network_management_client.py @@ -0,0 +1,8826 @@ +# 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 typing import TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.mgmt.core import ARMPipelineClient +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin + +from ._configuration import NetworkManagementClientConfiguration +from ._operations_mixin import NetworkManagementClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass + +class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): + """Network Client. + + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + DEFAULT_API_VERSION = '2021-08-01' + _PROFILE_TAG = "azure.mgmt.network.NetworkManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + 'active_connectivity_configurations': '2021-02-01-preview', + 'active_security_admin_rules': '2021-02-01-preview', + 'active_security_user_rules': '2021-02-01-preview', + 'admin_rule_collections': '2021-02-01-preview', + 'admin_rules': '2021-02-01-preview', + 'connectivity_configurations': '2021-02-01-preview', + 'effective_connectivity_configurations': '2021-02-01-preview', + 'effective_virtual_networks': '2021-02-01-preview', + 'firewall_policy_rule_groups': '2020-04-01', + 'interface_endpoints': '2019-02-01', + 'network_groups': '2021-02-01-preview', + 'network_manager_commits': '2021-02-01-preview', + 'network_manager_deployment_status': '2021-02-01-preview', + 'network_manager_effective_security_admin_rules': '2021-02-01-preview', + 'network_managers': '2021-02-01-preview', + 'network_security_perimeters': '2021-02-01-preview', + 'nsp_access_rules': '2021-02-01-preview', + 'nsp_associations': '2021-02-01-preview', + 'nsp_profiles': '2021-02-01-preview', + 'p2_svpn_server_configurations': '2019-07-01', + 'perimeter_associable_resource_types': '2021-02-01-preview', + 'security_admin_configurations': '2021-02-01-preview', + 'security_user_configurations': '2021-02-01-preview', + 'user_rule_collections': '2021-02-01-preview', + 'user_rules': '2021-02-01-preview', + }}, + _PROFILE_TAG + " latest" + ) + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + api_version=None, # type: Optional[str] + base_url="https://management.azure.com", # type: str + profile=KnownProfiles.default, # type: KnownProfiles + **kwargs # type: Any + ): + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + super(NetworkManagementClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2015-06-15: :mod:`v2015_06_15.models` + * 2016-09-01: :mod:`v2016_09_01.models` + * 2016-12-01: :mod:`v2016_12_01.models` + * 2017-03-01: :mod:`v2017_03_01.models` + * 2017-06-01: :mod:`v2017_06_01.models` + * 2017-10-01: :mod:`v2017_10_01.models` + * 2018-01-01: :mod:`v2018_01_01.models` + * 2018-02-01: :mod:`v2018_02_01.models` + * 2018-04-01: :mod:`v2018_04_01.models` + * 2018-06-01: :mod:`v2018_06_01.models` + * 2018-07-01: :mod:`v2018_07_01.models` + * 2018-08-01: :mod:`v2018_08_01.models` + * 2018-10-01: :mod:`v2018_10_01.models` + * 2018-11-01: :mod:`v2018_11_01.models` + * 2018-12-01: :mod:`v2018_12_01.models` + * 2019-02-01: :mod:`v2019_02_01.models` + * 2019-04-01: :mod:`v2019_04_01.models` + * 2019-06-01: :mod:`v2019_06_01.models` + * 2019-07-01: :mod:`v2019_07_01.models` + * 2019-08-01: :mod:`v2019_08_01.models` + * 2019-09-01: :mod:`v2019_09_01.models` + * 2019-11-01: :mod:`v2019_11_01.models` + * 2019-12-01: :mod:`v2019_12_01.models` + * 2020-03-01: :mod:`v2020_03_01.models` + * 2020-04-01: :mod:`v2020_04_01.models` + * 2020-05-01: :mod:`v2020_05_01.models` + * 2020-06-01: :mod:`v2020_06_01.models` + * 2020-07-01: :mod:`v2020_07_01.models` + * 2020-08-01: :mod:`v2020_08_01.models` + * 2020-11-01: :mod:`v2020_11_01.models` + * 2021-02-01: :mod:`v2021_02_01.models` + * 2021-02-01-preview: :mod:`v2021_02_01_preview.models` + * 2021-05-01: :mod:`v2021_05_01.models` + * 2021-08-01: :mod:`v2021_08_01.models` + """ + if api_version == '2015-06-15': + from .v2015_06_15 import models + return models + elif api_version == '2016-09-01': + from .v2016_09_01 import models + return models + elif api_version == '2016-12-01': + from .v2016_12_01 import models + return models + elif api_version == '2017-03-01': + from .v2017_03_01 import models + return models + elif api_version == '2017-06-01': + from .v2017_06_01 import models + return models + elif api_version == '2017-10-01': + from .v2017_10_01 import models + return models + elif api_version == '2018-01-01': + from .v2018_01_01 import models + return models + elif api_version == '2018-02-01': + from .v2018_02_01 import models + return models + elif api_version == '2018-04-01': + from .v2018_04_01 import models + return models + elif api_version == '2018-06-01': + from .v2018_06_01 import models + return models + elif api_version == '2018-07-01': + from .v2018_07_01 import models + return models + elif api_version == '2018-08-01': + from .v2018_08_01 import models + return models + elif api_version == '2018-10-01': + from .v2018_10_01 import models + return models + elif api_version == '2018-11-01': + from .v2018_11_01 import models + return models + elif api_version == '2018-12-01': + from .v2018_12_01 import models + return models + elif api_version == '2019-02-01': + from .v2019_02_01 import models + return models + elif api_version == '2019-04-01': + from .v2019_04_01 import models + return models + elif api_version == '2019-06-01': + from .v2019_06_01 import models + return models + elif api_version == '2019-07-01': + from .v2019_07_01 import models + return models + elif api_version == '2019-08-01': + from .v2019_08_01 import models + return models + elif api_version == '2019-09-01': + from .v2019_09_01 import models + return models + elif api_version == '2019-11-01': + from .v2019_11_01 import models + return models + elif api_version == '2019-12-01': + from .v2019_12_01 import models + return models + elif api_version == '2020-03-01': + from .v2020_03_01 import models + return models + elif api_version == '2020-04-01': + from .v2020_04_01 import models + return models + elif api_version == '2020-05-01': + from .v2020_05_01 import models + return models + elif api_version == '2020-06-01': + from .v2020_06_01 import models + return models + elif api_version == '2020-07-01': + from .v2020_07_01 import models + return models + elif api_version == '2020-08-01': + from .v2020_08_01 import models + return models + elif api_version == '2020-11-01': + from .v2020_11_01 import models + return models + elif api_version == '2021-02-01': + from .v2021_02_01 import models + return models + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview import models + return models + elif api_version == '2021-05-01': + from .v2021_05_01 import models + return models + elif api_version == '2021-08-01': + from .v2021_08_01 import models + return models + raise ValueError("API version {} is not available".format(api_version)) + + @property + def active_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('active_connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('active_security_admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityUserRulesOperations` + """ + api_version = self._get_api_version('active_security_user_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveSecurityUserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRuleCollectionsOperations` + """ + api_version = self._get_api_version('admin_rule_collections') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AdminRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRulesOperations` + """ + api_version = self._get_api_version('admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateway_private_endpoint_connections(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-06-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-07-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-08-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-11-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-02-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-05-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-08-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + """ + api_version = self._get_api_version('application_gateway_private_endpoint_connections') + if api_version == '2020-05-01': + from .v2020_05_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateway_private_endpoint_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateway_private_link_resources(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-06-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-07-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-08-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-11-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-02-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-05-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-08-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + """ + api_version = self._get_api_version('application_gateway_private_link_resources') + if api_version == '2020-05-01': + from .v2020_05_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateway_private_link_resources'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ApplicationGatewaysOperations` + * 2016-09-01: :class:`ApplicationGatewaysOperations` + * 2016-12-01: :class:`ApplicationGatewaysOperations` + * 2017-03-01: :class:`ApplicationGatewaysOperations` + * 2017-06-01: :class:`ApplicationGatewaysOperations` + * 2017-10-01: :class:`ApplicationGatewaysOperations` + * 2018-01-01: :class:`ApplicationGatewaysOperations` + * 2018-02-01: :class:`ApplicationGatewaysOperations` + * 2018-04-01: :class:`ApplicationGatewaysOperations` + * 2018-06-01: :class:`ApplicationGatewaysOperations` + * 2018-07-01: :class:`ApplicationGatewaysOperations` + * 2018-08-01: :class:`ApplicationGatewaysOperations` + * 2018-10-01: :class:`ApplicationGatewaysOperations` + * 2018-11-01: :class:`ApplicationGatewaysOperations` + * 2018-12-01: :class:`ApplicationGatewaysOperations` + * 2019-02-01: :class:`ApplicationGatewaysOperations` + * 2019-04-01: :class:`ApplicationGatewaysOperations` + * 2019-06-01: :class:`ApplicationGatewaysOperations` + * 2019-07-01: :class:`ApplicationGatewaysOperations` + * 2019-08-01: :class:`ApplicationGatewaysOperations` + * 2019-09-01: :class:`ApplicationGatewaysOperations` + * 2019-11-01: :class:`ApplicationGatewaysOperations` + * 2019-12-01: :class:`ApplicationGatewaysOperations` + * 2020-03-01: :class:`ApplicationGatewaysOperations` + * 2020-04-01: :class:`ApplicationGatewaysOperations` + * 2020-05-01: :class:`ApplicationGatewaysOperations` + * 2020-06-01: :class:`ApplicationGatewaysOperations` + * 2020-07-01: :class:`ApplicationGatewaysOperations` + * 2020-08-01: :class:`ApplicationGatewaysOperations` + * 2020-11-01: :class:`ApplicationGatewaysOperations` + * 2021-02-01: :class:`ApplicationGatewaysOperations` + * 2021-05-01: :class:`ApplicationGatewaysOperations` + * 2021-08-01: :class:`ApplicationGatewaysOperations` + """ + api_version = self._get_api_version('application_gateways') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ApplicationGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_security_groups(self): + """Instance depends on the API version: + + * 2017-10-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-01-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-10-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-12-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-09-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-12-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-03-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-05-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-05-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-08-01: :class:`ApplicationSecurityGroupsOperations` + """ + api_version = self._get_api_version('application_security_groups') + if api_version == '2017-10-01': + from .v2017_10_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ApplicationSecurityGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_security_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_delegations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AvailableDelegationsOperations` + * 2018-10-01: :class:`AvailableDelegationsOperations` + * 2018-11-01: :class:`AvailableDelegationsOperations` + * 2018-12-01: :class:`AvailableDelegationsOperations` + * 2019-02-01: :class:`AvailableDelegationsOperations` + * 2019-04-01: :class:`AvailableDelegationsOperations` + * 2019-06-01: :class:`AvailableDelegationsOperations` + * 2019-07-01: :class:`AvailableDelegationsOperations` + * 2019-08-01: :class:`AvailableDelegationsOperations` + * 2019-09-01: :class:`AvailableDelegationsOperations` + * 2019-11-01: :class:`AvailableDelegationsOperations` + * 2019-12-01: :class:`AvailableDelegationsOperations` + * 2020-03-01: :class:`AvailableDelegationsOperations` + * 2020-04-01: :class:`AvailableDelegationsOperations` + * 2020-05-01: :class:`AvailableDelegationsOperations` + * 2020-06-01: :class:`AvailableDelegationsOperations` + * 2020-07-01: :class:`AvailableDelegationsOperations` + * 2020-08-01: :class:`AvailableDelegationsOperations` + * 2020-11-01: :class:`AvailableDelegationsOperations` + * 2021-02-01: :class:`AvailableDelegationsOperations` + * 2021-05-01: :class:`AvailableDelegationsOperations` + * 2021-08-01: :class:`AvailableDelegationsOperations` + """ + api_version = self._get_api_version('available_delegations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import AvailableDelegationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_delegations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_endpoint_services(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`AvailableEndpointServicesOperations` + * 2017-10-01: :class:`AvailableEndpointServicesOperations` + * 2018-01-01: :class:`AvailableEndpointServicesOperations` + * 2018-02-01: :class:`AvailableEndpointServicesOperations` + * 2018-04-01: :class:`AvailableEndpointServicesOperations` + * 2018-06-01: :class:`AvailableEndpointServicesOperations` + * 2018-07-01: :class:`AvailableEndpointServicesOperations` + * 2018-08-01: :class:`AvailableEndpointServicesOperations` + * 2018-10-01: :class:`AvailableEndpointServicesOperations` + * 2018-11-01: :class:`AvailableEndpointServicesOperations` + * 2018-12-01: :class:`AvailableEndpointServicesOperations` + * 2019-02-01: :class:`AvailableEndpointServicesOperations` + * 2019-04-01: :class:`AvailableEndpointServicesOperations` + * 2019-06-01: :class:`AvailableEndpointServicesOperations` + * 2019-07-01: :class:`AvailableEndpointServicesOperations` + * 2019-08-01: :class:`AvailableEndpointServicesOperations` + * 2019-09-01: :class:`AvailableEndpointServicesOperations` + * 2019-11-01: :class:`AvailableEndpointServicesOperations` + * 2019-12-01: :class:`AvailableEndpointServicesOperations` + * 2020-03-01: :class:`AvailableEndpointServicesOperations` + * 2020-04-01: :class:`AvailableEndpointServicesOperations` + * 2020-05-01: :class:`AvailableEndpointServicesOperations` + * 2020-06-01: :class:`AvailableEndpointServicesOperations` + * 2020-07-01: :class:`AvailableEndpointServicesOperations` + * 2020-08-01: :class:`AvailableEndpointServicesOperations` + * 2020-11-01: :class:`AvailableEndpointServicesOperations` + * 2021-02-01: :class:`AvailableEndpointServicesOperations` + * 2021-05-01: :class:`AvailableEndpointServicesOperations` + * 2021-08-01: :class:`AvailableEndpointServicesOperations` + """ + api_version = self._get_api_version('available_endpoint_services') + if api_version == '2017-06-01': + from .v2017_06_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import AvailableEndpointServicesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_endpoint_services'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_private_endpoint_types(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-06-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-07-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-08-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-09-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-11-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-12-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-03-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-04-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-05-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-06-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-07-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-08-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-11-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-02-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-05-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-08-01: :class:`AvailablePrivateEndpointTypesOperations` + """ + api_version = self._get_api_version('available_private_endpoint_types') + if api_version == '2019-04-01': + from .v2019_04_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_private_endpoint_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_resource_group_delegations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-10-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-12-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-02-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-04-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-06-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-07-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-09-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-12-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-03-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-04-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-05-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-06-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-07-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-02-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-05-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-08-01: :class:`AvailableResourceGroupDelegationsOperations` + """ + api_version = self._get_api_version('available_resource_group_delegations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_resource_group_delegations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_service_aliases(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`AvailableServiceAliasesOperations` + * 2019-09-01: :class:`AvailableServiceAliasesOperations` + * 2019-11-01: :class:`AvailableServiceAliasesOperations` + * 2019-12-01: :class:`AvailableServiceAliasesOperations` + * 2020-03-01: :class:`AvailableServiceAliasesOperations` + * 2020-04-01: :class:`AvailableServiceAliasesOperations` + * 2020-05-01: :class:`AvailableServiceAliasesOperations` + * 2020-06-01: :class:`AvailableServiceAliasesOperations` + * 2020-07-01: :class:`AvailableServiceAliasesOperations` + * 2020-08-01: :class:`AvailableServiceAliasesOperations` + * 2020-11-01: :class:`AvailableServiceAliasesOperations` + * 2021-02-01: :class:`AvailableServiceAliasesOperations` + * 2021-05-01: :class:`AvailableServiceAliasesOperations` + * 2021-08-01: :class:`AvailableServiceAliasesOperations` + """ + api_version = self._get_api_version('available_service_aliases') + if api_version == '2019-08-01': + from .v2019_08_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import AvailableServiceAliasesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_service_aliases'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def azure_firewall_fqdn_tags(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-10-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-12-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-02-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-04-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-06-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-07-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-09-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-12-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-03-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-04-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-05-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-06-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-07-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-02-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-05-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-08-01: :class:`AzureFirewallFqdnTagsOperations` + """ + api_version = self._get_api_version('azure_firewall_fqdn_tags') + if api_version == '2018-08-01': + from .v2018_08_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'azure_firewall_fqdn_tags'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def azure_firewalls(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`AzureFirewallsOperations` + * 2018-06-01: :class:`AzureFirewallsOperations` + * 2018-07-01: :class:`AzureFirewallsOperations` + * 2018-08-01: :class:`AzureFirewallsOperations` + * 2018-10-01: :class:`AzureFirewallsOperations` + * 2018-11-01: :class:`AzureFirewallsOperations` + * 2018-12-01: :class:`AzureFirewallsOperations` + * 2019-02-01: :class:`AzureFirewallsOperations` + * 2019-04-01: :class:`AzureFirewallsOperations` + * 2019-06-01: :class:`AzureFirewallsOperations` + * 2019-07-01: :class:`AzureFirewallsOperations` + * 2019-08-01: :class:`AzureFirewallsOperations` + * 2019-09-01: :class:`AzureFirewallsOperations` + * 2019-11-01: :class:`AzureFirewallsOperations` + * 2019-12-01: :class:`AzureFirewallsOperations` + * 2020-03-01: :class:`AzureFirewallsOperations` + * 2020-04-01: :class:`AzureFirewallsOperations` + * 2020-05-01: :class:`AzureFirewallsOperations` + * 2020-06-01: :class:`AzureFirewallsOperations` + * 2020-07-01: :class:`AzureFirewallsOperations` + * 2020-08-01: :class:`AzureFirewallsOperations` + * 2020-11-01: :class:`AzureFirewallsOperations` + * 2021-02-01: :class:`AzureFirewallsOperations` + * 2021-05-01: :class:`AzureFirewallsOperations` + * 2021-08-01: :class:`AzureFirewallsOperations` + """ + api_version = self._get_api_version('azure_firewalls') + if api_version == '2018-04-01': + from .v2018_04_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import AzureFirewallsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'azure_firewalls'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def bastion_hosts(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`BastionHostsOperations` + * 2019-06-01: :class:`BastionHostsOperations` + * 2019-07-01: :class:`BastionHostsOperations` + * 2019-08-01: :class:`BastionHostsOperations` + * 2019-09-01: :class:`BastionHostsOperations` + * 2019-11-01: :class:`BastionHostsOperations` + * 2019-12-01: :class:`BastionHostsOperations` + * 2020-03-01: :class:`BastionHostsOperations` + * 2020-04-01: :class:`BastionHostsOperations` + * 2020-05-01: :class:`BastionHostsOperations` + * 2020-06-01: :class:`BastionHostsOperations` + * 2020-07-01: :class:`BastionHostsOperations` + * 2020-08-01: :class:`BastionHostsOperations` + * 2020-11-01: :class:`BastionHostsOperations` + * 2021-02-01: :class:`BastionHostsOperations` + * 2021-05-01: :class:`BastionHostsOperations` + * 2021-08-01: :class:`BastionHostsOperations` + """ + api_version = self._get_api_version('bastion_hosts') + if api_version == '2019-04-01': + from .v2019_04_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import BastionHostsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'bastion_hosts'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def bgp_service_communities(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`BgpServiceCommunitiesOperations` + * 2017-03-01: :class:`BgpServiceCommunitiesOperations` + * 2017-06-01: :class:`BgpServiceCommunitiesOperations` + * 2017-10-01: :class:`BgpServiceCommunitiesOperations` + * 2018-01-01: :class:`BgpServiceCommunitiesOperations` + * 2018-02-01: :class:`BgpServiceCommunitiesOperations` + * 2018-04-01: :class:`BgpServiceCommunitiesOperations` + * 2018-06-01: :class:`BgpServiceCommunitiesOperations` + * 2018-07-01: :class:`BgpServiceCommunitiesOperations` + * 2018-08-01: :class:`BgpServiceCommunitiesOperations` + * 2018-10-01: :class:`BgpServiceCommunitiesOperations` + * 2018-11-01: :class:`BgpServiceCommunitiesOperations` + * 2018-12-01: :class:`BgpServiceCommunitiesOperations` + * 2019-02-01: :class:`BgpServiceCommunitiesOperations` + * 2019-04-01: :class:`BgpServiceCommunitiesOperations` + * 2019-06-01: :class:`BgpServiceCommunitiesOperations` + * 2019-07-01: :class:`BgpServiceCommunitiesOperations` + * 2019-08-01: :class:`BgpServiceCommunitiesOperations` + * 2019-09-01: :class:`BgpServiceCommunitiesOperations` + * 2019-11-01: :class:`BgpServiceCommunitiesOperations` + * 2019-12-01: :class:`BgpServiceCommunitiesOperations` + * 2020-03-01: :class:`BgpServiceCommunitiesOperations` + * 2020-04-01: :class:`BgpServiceCommunitiesOperations` + * 2020-05-01: :class:`BgpServiceCommunitiesOperations` + * 2020-06-01: :class:`BgpServiceCommunitiesOperations` + * 2020-07-01: :class:`BgpServiceCommunitiesOperations` + * 2020-08-01: :class:`BgpServiceCommunitiesOperations` + * 2020-11-01: :class:`BgpServiceCommunitiesOperations` + * 2021-02-01: :class:`BgpServiceCommunitiesOperations` + * 2021-05-01: :class:`BgpServiceCommunitiesOperations` + * 2021-08-01: :class:`BgpServiceCommunitiesOperations` + """ + api_version = self._get_api_version('bgp_service_communities') + if api_version == '2016-12-01': + from .v2016_12_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import BgpServiceCommunitiesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'bgp_service_communities'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def configuration_policy_groups(self): + """Instance depends on the API version: + + * 2021-08-01: :class:`ConfigurationPolicyGroupsOperations` + """ + api_version = self._get_api_version('configuration_policy_groups') + if api_version == '2021-08-01': + from .v2021_08_01.operations import ConfigurationPolicyGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'configuration_policy_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def connection_monitors(self): + """Instance depends on the API version: + + * 2017-10-01: :class:`ConnectionMonitorsOperations` + * 2018-01-01: :class:`ConnectionMonitorsOperations` + * 2018-02-01: :class:`ConnectionMonitorsOperations` + * 2018-04-01: :class:`ConnectionMonitorsOperations` + * 2018-06-01: :class:`ConnectionMonitorsOperations` + * 2018-07-01: :class:`ConnectionMonitorsOperations` + * 2018-08-01: :class:`ConnectionMonitorsOperations` + * 2018-10-01: :class:`ConnectionMonitorsOperations` + * 2018-11-01: :class:`ConnectionMonitorsOperations` + * 2018-12-01: :class:`ConnectionMonitorsOperations` + * 2019-02-01: :class:`ConnectionMonitorsOperations` + * 2019-04-01: :class:`ConnectionMonitorsOperations` + * 2019-06-01: :class:`ConnectionMonitorsOperations` + * 2019-07-01: :class:`ConnectionMonitorsOperations` + * 2019-08-01: :class:`ConnectionMonitorsOperations` + * 2019-09-01: :class:`ConnectionMonitorsOperations` + * 2019-11-01: :class:`ConnectionMonitorsOperations` + * 2019-12-01: :class:`ConnectionMonitorsOperations` + * 2020-03-01: :class:`ConnectionMonitorsOperations` + * 2020-04-01: :class:`ConnectionMonitorsOperations` + * 2020-05-01: :class:`ConnectionMonitorsOperations` + * 2020-06-01: :class:`ConnectionMonitorsOperations` + * 2020-07-01: :class:`ConnectionMonitorsOperations` + * 2020-08-01: :class:`ConnectionMonitorsOperations` + * 2020-11-01: :class:`ConnectionMonitorsOperations` + * 2021-02-01: :class:`ConnectionMonitorsOperations` + * 2021-05-01: :class:`ConnectionMonitorsOperations` + * 2021-08-01: :class:`ConnectionMonitorsOperations` + """ + api_version = self._get_api_version('connection_monitors') + if api_version == '2017-10-01': + from .v2017_10_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ConnectionMonitorsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connection_monitors'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def custom_ip_prefixes(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`CustomIPPrefixesOperations` + * 2020-07-01: :class:`CustomIPPrefixesOperations` + * 2020-08-01: :class:`CustomIPPrefixesOperations` + * 2020-11-01: :class:`CustomIPPrefixesOperations` + * 2021-02-01: :class:`CustomIPPrefixesOperations` + * 2021-05-01: :class:`CustomIPPrefixesOperations` + * 2021-08-01: :class:`CustomIPPrefixesOperations` + """ + api_version = self._get_api_version('custom_ip_prefixes') + if api_version == '2020-06-01': + from .v2020_06_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import CustomIPPrefixesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'custom_ip_prefixes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ddos_custom_policies(self): + """Instance depends on the API version: + + * 2018-11-01: :class:`DdosCustomPoliciesOperations` + * 2018-12-01: :class:`DdosCustomPoliciesOperations` + * 2019-02-01: :class:`DdosCustomPoliciesOperations` + * 2019-04-01: :class:`DdosCustomPoliciesOperations` + * 2019-06-01: :class:`DdosCustomPoliciesOperations` + * 2019-07-01: :class:`DdosCustomPoliciesOperations` + * 2019-08-01: :class:`DdosCustomPoliciesOperations` + * 2019-09-01: :class:`DdosCustomPoliciesOperations` + * 2019-11-01: :class:`DdosCustomPoliciesOperations` + * 2019-12-01: :class:`DdosCustomPoliciesOperations` + * 2020-03-01: :class:`DdosCustomPoliciesOperations` + * 2020-04-01: :class:`DdosCustomPoliciesOperations` + * 2020-05-01: :class:`DdosCustomPoliciesOperations` + * 2020-06-01: :class:`DdosCustomPoliciesOperations` + * 2020-07-01: :class:`DdosCustomPoliciesOperations` + * 2020-08-01: :class:`DdosCustomPoliciesOperations` + * 2020-11-01: :class:`DdosCustomPoliciesOperations` + * 2021-02-01: :class:`DdosCustomPoliciesOperations` + * 2021-05-01: :class:`DdosCustomPoliciesOperations` + * 2021-08-01: :class:`DdosCustomPoliciesOperations` + """ + api_version = self._get_api_version('ddos_custom_policies') + if api_version == '2018-11-01': + from .v2018_11_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import DdosCustomPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ddos_custom_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ddos_protection_plans(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`DdosProtectionPlansOperations` + * 2018-04-01: :class:`DdosProtectionPlansOperations` + * 2018-06-01: :class:`DdosProtectionPlansOperations` + * 2018-07-01: :class:`DdosProtectionPlansOperations` + * 2018-08-01: :class:`DdosProtectionPlansOperations` + * 2018-10-01: :class:`DdosProtectionPlansOperations` + * 2018-11-01: :class:`DdosProtectionPlansOperations` + * 2018-12-01: :class:`DdosProtectionPlansOperations` + * 2019-02-01: :class:`DdosProtectionPlansOperations` + * 2019-04-01: :class:`DdosProtectionPlansOperations` + * 2019-06-01: :class:`DdosProtectionPlansOperations` + * 2019-07-01: :class:`DdosProtectionPlansOperations` + * 2019-08-01: :class:`DdosProtectionPlansOperations` + * 2019-09-01: :class:`DdosProtectionPlansOperations` + * 2019-11-01: :class:`DdosProtectionPlansOperations` + * 2019-12-01: :class:`DdosProtectionPlansOperations` + * 2020-03-01: :class:`DdosProtectionPlansOperations` + * 2020-04-01: :class:`DdosProtectionPlansOperations` + * 2020-05-01: :class:`DdosProtectionPlansOperations` + * 2020-06-01: :class:`DdosProtectionPlansOperations` + * 2020-07-01: :class:`DdosProtectionPlansOperations` + * 2020-08-01: :class:`DdosProtectionPlansOperations` + * 2020-11-01: :class:`DdosProtectionPlansOperations` + * 2021-02-01: :class:`DdosProtectionPlansOperations` + * 2021-05-01: :class:`DdosProtectionPlansOperations` + * 2021-08-01: :class:`DdosProtectionPlansOperations` + """ + api_version = self._get_api_version('ddos_protection_plans') + if api_version == '2018-02-01': + from .v2018_02_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import DdosProtectionPlansOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ddos_protection_plans'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def default_security_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`DefaultSecurityRulesOperations` + * 2017-10-01: :class:`DefaultSecurityRulesOperations` + * 2018-01-01: :class:`DefaultSecurityRulesOperations` + * 2018-02-01: :class:`DefaultSecurityRulesOperations` + * 2018-04-01: :class:`DefaultSecurityRulesOperations` + * 2018-06-01: :class:`DefaultSecurityRulesOperations` + * 2018-07-01: :class:`DefaultSecurityRulesOperations` + * 2018-08-01: :class:`DefaultSecurityRulesOperations` + * 2018-10-01: :class:`DefaultSecurityRulesOperations` + * 2018-11-01: :class:`DefaultSecurityRulesOperations` + * 2018-12-01: :class:`DefaultSecurityRulesOperations` + * 2019-02-01: :class:`DefaultSecurityRulesOperations` + * 2019-04-01: :class:`DefaultSecurityRulesOperations` + * 2019-06-01: :class:`DefaultSecurityRulesOperations` + * 2019-07-01: :class:`DefaultSecurityRulesOperations` + * 2019-08-01: :class:`DefaultSecurityRulesOperations` + * 2019-09-01: :class:`DefaultSecurityRulesOperations` + * 2019-11-01: :class:`DefaultSecurityRulesOperations` + * 2019-12-01: :class:`DefaultSecurityRulesOperations` + * 2020-03-01: :class:`DefaultSecurityRulesOperations` + * 2020-04-01: :class:`DefaultSecurityRulesOperations` + * 2020-05-01: :class:`DefaultSecurityRulesOperations` + * 2020-06-01: :class:`DefaultSecurityRulesOperations` + * 2020-07-01: :class:`DefaultSecurityRulesOperations` + * 2020-08-01: :class:`DefaultSecurityRulesOperations` + * 2020-11-01: :class:`DefaultSecurityRulesOperations` + * 2021-02-01: :class:`DefaultSecurityRulesOperations` + * 2021-05-01: :class:`DefaultSecurityRulesOperations` + * 2021-08-01: :class:`DefaultSecurityRulesOperations` + """ + api_version = self._get_api_version('default_security_rules') + if api_version == '2017-06-01': + from .v2017_06_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import DefaultSecurityRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'default_security_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def dscp_configuration(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`DscpConfigurationOperations` + * 2020-07-01: :class:`DscpConfigurationOperations` + * 2020-08-01: :class:`DscpConfigurationOperations` + * 2020-11-01: :class:`DscpConfigurationOperations` + * 2021-02-01: :class:`DscpConfigurationOperations` + * 2021-05-01: :class:`DscpConfigurationOperations` + * 2021-08-01: :class:`DscpConfigurationOperations` + """ + api_version = self._get_api_version('dscp_configuration') + if api_version == '2020-06-01': + from .v2020_06_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import DscpConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'dscp_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('effective_connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import EffectiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_virtual_networks(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveVirtualNetworksOperations` + """ + api_version = self._get_api_version('effective_virtual_networks') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import EffectiveVirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_authorizations(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + """ + api_version = self._get_api_version('express_route_circuit_authorizations') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_authorizations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_connections(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + """ + api_version = self._get_api_version('express_route_circuit_connections') + if api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_peerings(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitPeeringsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + """ + api_version = self._get_api_version('express_route_circuit_peerings') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuits(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitsOperations` + * 2021-08-01: :class:`ExpressRouteCircuitsOperations` + """ + api_version = self._get_api_version('express_route_circuits') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteCircuitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_connections(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteConnectionsOperations` + * 2021-08-01: :class:`ExpressRouteConnectionsOperations` + """ + api_version = self._get_api_version('express_route_connections') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_cross_connection_peerings(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-10-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-12-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-09-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-12-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-03-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-05-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-05-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + """ + api_version = self._get_api_version('express_route_cross_connection_peerings') + if api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_cross_connection_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_cross_connections(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-08-01: :class:`ExpressRouteCrossConnectionsOperations` + """ + api_version = self._get_api_version('express_route_cross_connections') + if api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_cross_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_gateways(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteGatewaysOperations` + * 2018-10-01: :class:`ExpressRouteGatewaysOperations` + * 2018-11-01: :class:`ExpressRouteGatewaysOperations` + * 2018-12-01: :class:`ExpressRouteGatewaysOperations` + * 2019-02-01: :class:`ExpressRouteGatewaysOperations` + * 2019-04-01: :class:`ExpressRouteGatewaysOperations` + * 2019-06-01: :class:`ExpressRouteGatewaysOperations` + * 2019-07-01: :class:`ExpressRouteGatewaysOperations` + * 2019-08-01: :class:`ExpressRouteGatewaysOperations` + * 2019-09-01: :class:`ExpressRouteGatewaysOperations` + * 2019-11-01: :class:`ExpressRouteGatewaysOperations` + * 2019-12-01: :class:`ExpressRouteGatewaysOperations` + * 2020-03-01: :class:`ExpressRouteGatewaysOperations` + * 2020-04-01: :class:`ExpressRouteGatewaysOperations` + * 2020-05-01: :class:`ExpressRouteGatewaysOperations` + * 2020-06-01: :class:`ExpressRouteGatewaysOperations` + * 2020-07-01: :class:`ExpressRouteGatewaysOperations` + * 2020-08-01: :class:`ExpressRouteGatewaysOperations` + * 2020-11-01: :class:`ExpressRouteGatewaysOperations` + * 2021-02-01: :class:`ExpressRouteGatewaysOperations` + * 2021-05-01: :class:`ExpressRouteGatewaysOperations` + * 2021-08-01: :class:`ExpressRouteGatewaysOperations` + """ + api_version = self._get_api_version('express_route_gateways') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_links(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteLinksOperations` + * 2018-10-01: :class:`ExpressRouteLinksOperations` + * 2018-11-01: :class:`ExpressRouteLinksOperations` + * 2018-12-01: :class:`ExpressRouteLinksOperations` + * 2019-02-01: :class:`ExpressRouteLinksOperations` + * 2019-04-01: :class:`ExpressRouteLinksOperations` + * 2019-06-01: :class:`ExpressRouteLinksOperations` + * 2019-07-01: :class:`ExpressRouteLinksOperations` + * 2019-08-01: :class:`ExpressRouteLinksOperations` + * 2019-09-01: :class:`ExpressRouteLinksOperations` + * 2019-11-01: :class:`ExpressRouteLinksOperations` + * 2019-12-01: :class:`ExpressRouteLinksOperations` + * 2020-03-01: :class:`ExpressRouteLinksOperations` + * 2020-04-01: :class:`ExpressRouteLinksOperations` + * 2020-05-01: :class:`ExpressRouteLinksOperations` + * 2020-06-01: :class:`ExpressRouteLinksOperations` + * 2020-07-01: :class:`ExpressRouteLinksOperations` + * 2020-08-01: :class:`ExpressRouteLinksOperations` + * 2020-11-01: :class:`ExpressRouteLinksOperations` + * 2021-02-01: :class:`ExpressRouteLinksOperations` + * 2021-05-01: :class:`ExpressRouteLinksOperations` + * 2021-08-01: :class:`ExpressRouteLinksOperations` + """ + api_version = self._get_api_version('express_route_links') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_port_authorizations(self): + """Instance depends on the API version: + + * 2021-08-01: :class:`ExpressRoutePortAuthorizationsOperations` + """ + api_version = self._get_api_version('express_route_port_authorizations') + if api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRoutePortAuthorizationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_port_authorizations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_ports(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRoutePortsOperations` + * 2018-10-01: :class:`ExpressRoutePortsOperations` + * 2018-11-01: :class:`ExpressRoutePortsOperations` + * 2018-12-01: :class:`ExpressRoutePortsOperations` + * 2019-02-01: :class:`ExpressRoutePortsOperations` + * 2019-04-01: :class:`ExpressRoutePortsOperations` + * 2019-06-01: :class:`ExpressRoutePortsOperations` + * 2019-07-01: :class:`ExpressRoutePortsOperations` + * 2019-08-01: :class:`ExpressRoutePortsOperations` + * 2019-09-01: :class:`ExpressRoutePortsOperations` + * 2019-11-01: :class:`ExpressRoutePortsOperations` + * 2019-12-01: :class:`ExpressRoutePortsOperations` + * 2020-03-01: :class:`ExpressRoutePortsOperations` + * 2020-04-01: :class:`ExpressRoutePortsOperations` + * 2020-05-01: :class:`ExpressRoutePortsOperations` + * 2020-06-01: :class:`ExpressRoutePortsOperations` + * 2020-07-01: :class:`ExpressRoutePortsOperations` + * 2020-08-01: :class:`ExpressRoutePortsOperations` + * 2020-11-01: :class:`ExpressRoutePortsOperations` + * 2021-02-01: :class:`ExpressRoutePortsOperations` + * 2021-05-01: :class:`ExpressRoutePortsOperations` + * 2021-08-01: :class:`ExpressRoutePortsOperations` + """ + api_version = self._get_api_version('express_route_ports') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRoutePortsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_ports'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_ports_locations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-10-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-12-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-02-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-04-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-06-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-07-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-09-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-12-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-03-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-04-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-05-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-06-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-07-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-02-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-05-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-08-01: :class:`ExpressRoutePortsLocationsOperations` + """ + api_version = self._get_api_version('express_route_ports_locations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_ports_locations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_service_providers(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteServiceProvidersOperations` + * 2016-09-01: :class:`ExpressRouteServiceProvidersOperations` + * 2016-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-03-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-10-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-01-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-10-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-09-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-03-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-05-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-05-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-08-01: :class:`ExpressRouteServiceProvidersOperations` + """ + api_version = self._get_api_version('express_route_service_providers') + if api_version == '2015-06-15': + from .v2015_06_15.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_service_providers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policies(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`FirewallPoliciesOperations` + * 2019-07-01: :class:`FirewallPoliciesOperations` + * 2019-08-01: :class:`FirewallPoliciesOperations` + * 2019-09-01: :class:`FirewallPoliciesOperations` + * 2019-11-01: :class:`FirewallPoliciesOperations` + * 2019-12-01: :class:`FirewallPoliciesOperations` + * 2020-03-01: :class:`FirewallPoliciesOperations` + * 2020-04-01: :class:`FirewallPoliciesOperations` + * 2020-05-01: :class:`FirewallPoliciesOperations` + * 2020-06-01: :class:`FirewallPoliciesOperations` + * 2020-07-01: :class:`FirewallPoliciesOperations` + * 2020-08-01: :class:`FirewallPoliciesOperations` + * 2020-11-01: :class:`FirewallPoliciesOperations` + * 2021-02-01: :class:`FirewallPoliciesOperations` + * 2021-05-01: :class:`FirewallPoliciesOperations` + * 2021-08-01: :class:`FirewallPoliciesOperations` + """ + api_version = self._get_api_version('firewall_policies') + if api_version == '2019-06-01': + from .v2019_06_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import FirewallPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesOperations` + * 2021-08-01: :class:`FirewallPolicyIdpsSignaturesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures') + if api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPolicyIdpsSignaturesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import FirewallPolicyIdpsSignaturesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures_filter_values(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesFilterValuesOperations` + * 2021-08-01: :class:`FirewallPolicyIdpsSignaturesFilterValuesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures_filter_values') + if api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPolicyIdpsSignaturesFilterValuesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import FirewallPolicyIdpsSignaturesFilterValuesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures_filter_values'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures_overrides(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesOverridesOperations` + * 2021-08-01: :class:`FirewallPolicyIdpsSignaturesOverridesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures_overrides') + if api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPolicyIdpsSignaturesOverridesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import FirewallPolicyIdpsSignaturesOverridesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures_overrides'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_rule_collection_groups(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-06-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-07-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-08-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-11-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-02-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-05-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-08-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + """ + api_version = self._get_api_version('firewall_policy_rule_collection_groups') + if api_version == '2020-05-01': + from .v2020_05_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_rule_collection_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_rule_groups(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-07-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-08-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-09-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-11-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-12-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2020-03-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2020-04-01: :class:`FirewallPolicyRuleGroupsOperations` + """ + api_version = self._get_api_version('firewall_policy_rule_groups') + if api_version == '2019-06-01': + from .v2019_06_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import FirewallPolicyRuleGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_rule_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def flow_logs(self): + """Instance depends on the API version: + + * 2019-11-01: :class:`FlowLogsOperations` + * 2019-12-01: :class:`FlowLogsOperations` + * 2020-03-01: :class:`FlowLogsOperations` + * 2020-04-01: :class:`FlowLogsOperations` + * 2020-05-01: :class:`FlowLogsOperations` + * 2020-06-01: :class:`FlowLogsOperations` + * 2020-07-01: :class:`FlowLogsOperations` + * 2020-08-01: :class:`FlowLogsOperations` + * 2020-11-01: :class:`FlowLogsOperations` + * 2021-02-01: :class:`FlowLogsOperations` + * 2021-05-01: :class:`FlowLogsOperations` + * 2021-08-01: :class:`FlowLogsOperations` + """ + api_version = self._get_api_version('flow_logs') + if api_version == '2019-11-01': + from .v2019_11_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import FlowLogsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'flow_logs'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def hub_route_tables(self): + """Instance depends on the API version: + + * 2020-04-01: :class:`HubRouteTablesOperations` + * 2020-05-01: :class:`HubRouteTablesOperations` + * 2020-06-01: :class:`HubRouteTablesOperations` + * 2020-07-01: :class:`HubRouteTablesOperations` + * 2020-08-01: :class:`HubRouteTablesOperations` + * 2020-11-01: :class:`HubRouteTablesOperations` + * 2021-02-01: :class:`HubRouteTablesOperations` + * 2021-05-01: :class:`HubRouteTablesOperations` + * 2021-08-01: :class:`HubRouteTablesOperations` + """ + api_version = self._get_api_version('hub_route_tables') + if api_version == '2020-04-01': + from .v2020_04_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import HubRouteTablesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'hub_route_tables'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def hub_virtual_network_connections(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-10-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-12-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-02-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-09-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-12-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-03-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-05-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-02-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-05-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-08-01: :class:`HubVirtualNetworkConnectionsOperations` + """ + api_version = self._get_api_version('hub_virtual_network_connections') + if api_version == '2018-04-01': + from .v2018_04_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'hub_virtual_network_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def inbound_nat_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`InboundNatRulesOperations` + * 2017-10-01: :class:`InboundNatRulesOperations` + * 2018-01-01: :class:`InboundNatRulesOperations` + * 2018-02-01: :class:`InboundNatRulesOperations` + * 2018-04-01: :class:`InboundNatRulesOperations` + * 2018-06-01: :class:`InboundNatRulesOperations` + * 2018-07-01: :class:`InboundNatRulesOperations` + * 2018-08-01: :class:`InboundNatRulesOperations` + * 2018-10-01: :class:`InboundNatRulesOperations` + * 2018-11-01: :class:`InboundNatRulesOperations` + * 2018-12-01: :class:`InboundNatRulesOperations` + * 2019-02-01: :class:`InboundNatRulesOperations` + * 2019-04-01: :class:`InboundNatRulesOperations` + * 2019-06-01: :class:`InboundNatRulesOperations` + * 2019-07-01: :class:`InboundNatRulesOperations` + * 2019-08-01: :class:`InboundNatRulesOperations` + * 2019-09-01: :class:`InboundNatRulesOperations` + * 2019-11-01: :class:`InboundNatRulesOperations` + * 2019-12-01: :class:`InboundNatRulesOperations` + * 2020-03-01: :class:`InboundNatRulesOperations` + * 2020-04-01: :class:`InboundNatRulesOperations` + * 2020-05-01: :class:`InboundNatRulesOperations` + * 2020-06-01: :class:`InboundNatRulesOperations` + * 2020-07-01: :class:`InboundNatRulesOperations` + * 2020-08-01: :class:`InboundNatRulesOperations` + * 2020-11-01: :class:`InboundNatRulesOperations` + * 2021-02-01: :class:`InboundNatRulesOperations` + * 2021-05-01: :class:`InboundNatRulesOperations` + * 2021-08-01: :class:`InboundNatRulesOperations` + """ + api_version = self._get_api_version('inbound_nat_rules') + if api_version == '2017-06-01': + from .v2017_06_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import InboundNatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'inbound_nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def inbound_security_rule(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`InboundSecurityRuleOperations` + * 2020-07-01: :class:`InboundSecurityRuleOperations` + * 2020-08-01: :class:`InboundSecurityRuleOperations` + * 2020-11-01: :class:`InboundSecurityRuleOperations` + * 2021-02-01: :class:`InboundSecurityRuleOperations` + * 2021-05-01: :class:`InboundSecurityRuleOperations` + * 2021-08-01: :class:`InboundSecurityRuleOperations` + """ + api_version = self._get_api_version('inbound_security_rule') + if api_version == '2020-06-01': + from .v2020_06_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import InboundSecurityRuleOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'inbound_security_rule'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def interface_endpoints(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`InterfaceEndpointsOperations` + * 2018-10-01: :class:`InterfaceEndpointsOperations` + * 2018-11-01: :class:`InterfaceEndpointsOperations` + * 2018-12-01: :class:`InterfaceEndpointsOperations` + * 2019-02-01: :class:`InterfaceEndpointsOperations` + """ + api_version = self._get_api_version('interface_endpoints') + if api_version == '2018-08-01': + from .v2018_08_01.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import InterfaceEndpointsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'interface_endpoints'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ip_allocations(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`IpAllocationsOperations` + * 2020-04-01: :class:`IpAllocationsOperations` + * 2020-05-01: :class:`IpAllocationsOperations` + * 2020-06-01: :class:`IpAllocationsOperations` + * 2020-07-01: :class:`IpAllocationsOperations` + * 2020-08-01: :class:`IpAllocationsOperations` + * 2020-11-01: :class:`IpAllocationsOperations` + * 2021-02-01: :class:`IpAllocationsOperations` + * 2021-05-01: :class:`IpAllocationsOperations` + * 2021-08-01: :class:`IpAllocationsOperations` + """ + api_version = self._get_api_version('ip_allocations') + if api_version == '2020-03-01': + from .v2020_03_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import IpAllocationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ip_allocations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ip_groups(self): + """Instance depends on the API version: + + * 2019-09-01: :class:`IpGroupsOperations` + * 2019-11-01: :class:`IpGroupsOperations` + * 2019-12-01: :class:`IpGroupsOperations` + * 2020-03-01: :class:`IpGroupsOperations` + * 2020-04-01: :class:`IpGroupsOperations` + * 2020-05-01: :class:`IpGroupsOperations` + * 2020-06-01: :class:`IpGroupsOperations` + * 2020-07-01: :class:`IpGroupsOperations` + * 2020-08-01: :class:`IpGroupsOperations` + * 2020-11-01: :class:`IpGroupsOperations` + * 2021-02-01: :class:`IpGroupsOperations` + * 2021-05-01: :class:`IpGroupsOperations` + * 2021-08-01: :class:`IpGroupsOperations` + """ + api_version = self._get_api_version('ip_groups') + if api_version == '2019-09-01': + from .v2019_09_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import IpGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ip_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_backend_address_pools(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2017-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-01-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-12-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-09-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-12-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-03-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-05-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-05-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + """ + api_version = self._get_api_version('load_balancer_backend_address_pools') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_backend_address_pools'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_frontend_ip_configurations(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2017-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-01-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-12-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-09-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-12-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-03-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-05-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-05-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + """ + api_version = self._get_api_version('load_balancer_frontend_ip_configurations') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_frontend_ip_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_load_balancing_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2017-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-01-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-12-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-09-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-12-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-03-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-05-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-05-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + """ + api_version = self._get_api_version('load_balancer_load_balancing_rules') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_load_balancing_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_network_interfaces(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2017-10-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-01-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-10-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-12-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-09-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-12-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-03-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-05-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-05-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + """ + api_version = self._get_api_version('load_balancer_network_interfaces') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_network_interfaces'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_outbound_rules(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-10-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-12-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-02-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-04-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-06-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-07-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-09-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-12-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-03-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-04-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-05-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-06-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-07-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-02-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-05-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-08-01: :class:`LoadBalancerOutboundRulesOperations` + """ + api_version = self._get_api_version('load_balancer_outbound_rules') + if api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_outbound_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_probes(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerProbesOperations` + * 2017-10-01: :class:`LoadBalancerProbesOperations` + * 2018-01-01: :class:`LoadBalancerProbesOperations` + * 2018-02-01: :class:`LoadBalancerProbesOperations` + * 2018-04-01: :class:`LoadBalancerProbesOperations` + * 2018-06-01: :class:`LoadBalancerProbesOperations` + * 2018-07-01: :class:`LoadBalancerProbesOperations` + * 2018-08-01: :class:`LoadBalancerProbesOperations` + * 2018-10-01: :class:`LoadBalancerProbesOperations` + * 2018-11-01: :class:`LoadBalancerProbesOperations` + * 2018-12-01: :class:`LoadBalancerProbesOperations` + * 2019-02-01: :class:`LoadBalancerProbesOperations` + * 2019-04-01: :class:`LoadBalancerProbesOperations` + * 2019-06-01: :class:`LoadBalancerProbesOperations` + * 2019-07-01: :class:`LoadBalancerProbesOperations` + * 2019-08-01: :class:`LoadBalancerProbesOperations` + * 2019-09-01: :class:`LoadBalancerProbesOperations` + * 2019-11-01: :class:`LoadBalancerProbesOperations` + * 2019-12-01: :class:`LoadBalancerProbesOperations` + * 2020-03-01: :class:`LoadBalancerProbesOperations` + * 2020-04-01: :class:`LoadBalancerProbesOperations` + * 2020-05-01: :class:`LoadBalancerProbesOperations` + * 2020-06-01: :class:`LoadBalancerProbesOperations` + * 2020-07-01: :class:`LoadBalancerProbesOperations` + * 2020-08-01: :class:`LoadBalancerProbesOperations` + * 2020-11-01: :class:`LoadBalancerProbesOperations` + * 2021-02-01: :class:`LoadBalancerProbesOperations` + * 2021-05-01: :class:`LoadBalancerProbesOperations` + * 2021-08-01: :class:`LoadBalancerProbesOperations` + """ + api_version = self._get_api_version('load_balancer_probes') + if api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import LoadBalancerProbesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_probes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancers(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`LoadBalancersOperations` + * 2016-09-01: :class:`LoadBalancersOperations` + * 2016-12-01: :class:`LoadBalancersOperations` + * 2017-03-01: :class:`LoadBalancersOperations` + * 2017-06-01: :class:`LoadBalancersOperations` + * 2017-10-01: :class:`LoadBalancersOperations` + * 2018-01-01: :class:`LoadBalancersOperations` + * 2018-02-01: :class:`LoadBalancersOperations` + * 2018-04-01: :class:`LoadBalancersOperations` + * 2018-06-01: :class:`LoadBalancersOperations` + * 2018-07-01: :class:`LoadBalancersOperations` + * 2018-08-01: :class:`LoadBalancersOperations` + * 2018-10-01: :class:`LoadBalancersOperations` + * 2018-11-01: :class:`LoadBalancersOperations` + * 2018-12-01: :class:`LoadBalancersOperations` + * 2019-02-01: :class:`LoadBalancersOperations` + * 2019-04-01: :class:`LoadBalancersOperations` + * 2019-06-01: :class:`LoadBalancersOperations` + * 2019-07-01: :class:`LoadBalancersOperations` + * 2019-08-01: :class:`LoadBalancersOperations` + * 2019-09-01: :class:`LoadBalancersOperations` + * 2019-11-01: :class:`LoadBalancersOperations` + * 2019-12-01: :class:`LoadBalancersOperations` + * 2020-03-01: :class:`LoadBalancersOperations` + * 2020-04-01: :class:`LoadBalancersOperations` + * 2020-05-01: :class:`LoadBalancersOperations` + * 2020-06-01: :class:`LoadBalancersOperations` + * 2020-07-01: :class:`LoadBalancersOperations` + * 2020-08-01: :class:`LoadBalancersOperations` + * 2020-11-01: :class:`LoadBalancersOperations` + * 2021-02-01: :class:`LoadBalancersOperations` + * 2021-05-01: :class:`LoadBalancersOperations` + * 2021-08-01: :class:`LoadBalancersOperations` + """ + api_version = self._get_api_version('load_balancers') + if api_version == '2015-06-15': + from .v2015_06_15.operations import LoadBalancersOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import LoadBalancersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def local_network_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`LocalNetworkGatewaysOperations` + * 2016-09-01: :class:`LocalNetworkGatewaysOperations` + * 2016-12-01: :class:`LocalNetworkGatewaysOperations` + * 2017-03-01: :class:`LocalNetworkGatewaysOperations` + * 2017-06-01: :class:`LocalNetworkGatewaysOperations` + * 2017-10-01: :class:`LocalNetworkGatewaysOperations` + * 2018-01-01: :class:`LocalNetworkGatewaysOperations` + * 2018-02-01: :class:`LocalNetworkGatewaysOperations` + * 2018-04-01: :class:`LocalNetworkGatewaysOperations` + * 2018-06-01: :class:`LocalNetworkGatewaysOperations` + * 2018-07-01: :class:`LocalNetworkGatewaysOperations` + * 2018-08-01: :class:`LocalNetworkGatewaysOperations` + * 2018-10-01: :class:`LocalNetworkGatewaysOperations` + * 2018-11-01: :class:`LocalNetworkGatewaysOperations` + * 2018-12-01: :class:`LocalNetworkGatewaysOperations` + * 2019-02-01: :class:`LocalNetworkGatewaysOperations` + * 2019-04-01: :class:`LocalNetworkGatewaysOperations` + * 2019-06-01: :class:`LocalNetworkGatewaysOperations` + * 2019-07-01: :class:`LocalNetworkGatewaysOperations` + * 2019-08-01: :class:`LocalNetworkGatewaysOperations` + * 2019-09-01: :class:`LocalNetworkGatewaysOperations` + * 2019-11-01: :class:`LocalNetworkGatewaysOperations` + * 2019-12-01: :class:`LocalNetworkGatewaysOperations` + * 2020-03-01: :class:`LocalNetworkGatewaysOperations` + * 2020-04-01: :class:`LocalNetworkGatewaysOperations` + * 2020-05-01: :class:`LocalNetworkGatewaysOperations` + * 2020-06-01: :class:`LocalNetworkGatewaysOperations` + * 2020-07-01: :class:`LocalNetworkGatewaysOperations` + * 2020-08-01: :class:`LocalNetworkGatewaysOperations` + * 2020-11-01: :class:`LocalNetworkGatewaysOperations` + * 2021-02-01: :class:`LocalNetworkGatewaysOperations` + * 2021-05-01: :class:`LocalNetworkGatewaysOperations` + * 2021-08-01: :class:`LocalNetworkGatewaysOperations` + """ + api_version = self._get_api_version('local_network_gateways') + if api_version == '2015-06-15': + from .v2015_06_15.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import LocalNetworkGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'local_network_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nat_gateways(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`NatGatewaysOperations` + * 2019-04-01: :class:`NatGatewaysOperations` + * 2019-06-01: :class:`NatGatewaysOperations` + * 2019-07-01: :class:`NatGatewaysOperations` + * 2019-08-01: :class:`NatGatewaysOperations` + * 2019-09-01: :class:`NatGatewaysOperations` + * 2019-11-01: :class:`NatGatewaysOperations` + * 2019-12-01: :class:`NatGatewaysOperations` + * 2020-03-01: :class:`NatGatewaysOperations` + * 2020-04-01: :class:`NatGatewaysOperations` + * 2020-05-01: :class:`NatGatewaysOperations` + * 2020-06-01: :class:`NatGatewaysOperations` + * 2020-07-01: :class:`NatGatewaysOperations` + * 2020-08-01: :class:`NatGatewaysOperations` + * 2020-11-01: :class:`NatGatewaysOperations` + * 2021-02-01: :class:`NatGatewaysOperations` + * 2021-05-01: :class:`NatGatewaysOperations` + * 2021-08-01: :class:`NatGatewaysOperations` + """ + api_version = self._get_api_version('nat_gateways') + if api_version == '2019-02-01': + from .v2019_02_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NatGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nat_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nat_rules(self): + """Instance depends on the API version: + + * 2020-08-01: :class:`NatRulesOperations` + * 2020-11-01: :class:`NatRulesOperations` + * 2021-02-01: :class:`NatRulesOperations` + * 2021-05-01: :class:`NatRulesOperations` + * 2021-08-01: :class:`NatRulesOperations` + """ + api_version = self._get_api_version('nat_rules') + if api_version == '2020-08-01': + from .v2020_08_01.operations import NatRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NatRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NatRulesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_groups(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkGroupsOperations` + """ + api_version = self._get_api_version('network_groups') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_ip_configurations(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2017-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-01-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-12-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-09-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-12-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-03-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-05-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-05-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + """ + api_version = self._get_api_version('network_interface_ip_configurations') + if api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_ip_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_load_balancers(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2017-10-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-01-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-10-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-12-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-09-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-12-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-03-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-05-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-05-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + """ + api_version = self._get_api_version('network_interface_load_balancers') + if api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_load_balancers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_tap_configurations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-10-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-12-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-02-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-04-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-06-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-07-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-09-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-12-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-03-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-04-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-05-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-06-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-07-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-02-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-05-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + """ + api_version = self._get_api_version('network_interface_tap_configurations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_tap_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interfaces(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`NetworkInterfacesOperations` + * 2016-09-01: :class:`NetworkInterfacesOperations` + * 2016-12-01: :class:`NetworkInterfacesOperations` + * 2017-03-01: :class:`NetworkInterfacesOperations` + * 2017-06-01: :class:`NetworkInterfacesOperations` + * 2017-10-01: :class:`NetworkInterfacesOperations` + * 2018-01-01: :class:`NetworkInterfacesOperations` + * 2018-02-01: :class:`NetworkInterfacesOperations` + * 2018-04-01: :class:`NetworkInterfacesOperations` + * 2018-06-01: :class:`NetworkInterfacesOperations` + * 2018-07-01: :class:`NetworkInterfacesOperations` + * 2018-08-01: :class:`NetworkInterfacesOperations` + * 2018-10-01: :class:`NetworkInterfacesOperations` + * 2018-11-01: :class:`NetworkInterfacesOperations` + * 2018-12-01: :class:`NetworkInterfacesOperations` + * 2019-02-01: :class:`NetworkInterfacesOperations` + * 2019-04-01: :class:`NetworkInterfacesOperations` + * 2019-06-01: :class:`NetworkInterfacesOperations` + * 2019-07-01: :class:`NetworkInterfacesOperations` + * 2019-08-01: :class:`NetworkInterfacesOperations` + * 2019-09-01: :class:`NetworkInterfacesOperations` + * 2019-11-01: :class:`NetworkInterfacesOperations` + * 2019-12-01: :class:`NetworkInterfacesOperations` + * 2020-03-01: :class:`NetworkInterfacesOperations` + * 2020-04-01: :class:`NetworkInterfacesOperations` + * 2020-05-01: :class:`NetworkInterfacesOperations` + * 2020-06-01: :class:`NetworkInterfacesOperations` + * 2020-07-01: :class:`NetworkInterfacesOperations` + * 2020-08-01: :class:`NetworkInterfacesOperations` + * 2020-11-01: :class:`NetworkInterfacesOperations` + * 2021-02-01: :class:`NetworkInterfacesOperations` + * 2021-05-01: :class:`NetworkInterfacesOperations` + * 2021-08-01: :class:`NetworkInterfacesOperations` + """ + api_version = self._get_api_version('network_interfaces') + if api_version == '2015-06-15': + from .v2015_06_15.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkInterfacesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interfaces'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_commits(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerCommitsOperations` + """ + api_version = self._get_api_version('network_manager_commits') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerCommitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_commits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_deployment_status(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerDeploymentStatusOperations` + """ + api_version = self._get_api_version('network_manager_deployment_status') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerDeploymentStatusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_deployment_status'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_effective_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerEffectiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('network_manager_effective_security_admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerEffectiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_effective_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_managers(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagersOperations` + """ + api_version = self._get_api_version('network_managers') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_managers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_profiles(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`NetworkProfilesOperations` + * 2018-10-01: :class:`NetworkProfilesOperations` + * 2018-11-01: :class:`NetworkProfilesOperations` + * 2018-12-01: :class:`NetworkProfilesOperations` + * 2019-02-01: :class:`NetworkProfilesOperations` + * 2019-04-01: :class:`NetworkProfilesOperations` + * 2019-06-01: :class:`NetworkProfilesOperations` + * 2019-07-01: :class:`NetworkProfilesOperations` + * 2019-08-01: :class:`NetworkProfilesOperations` + * 2019-09-01: :class:`NetworkProfilesOperations` + * 2019-11-01: :class:`NetworkProfilesOperations` + * 2019-12-01: :class:`NetworkProfilesOperations` + * 2020-03-01: :class:`NetworkProfilesOperations` + * 2020-04-01: :class:`NetworkProfilesOperations` + * 2020-05-01: :class:`NetworkProfilesOperations` + * 2020-06-01: :class:`NetworkProfilesOperations` + * 2020-07-01: :class:`NetworkProfilesOperations` + * 2020-08-01: :class:`NetworkProfilesOperations` + * 2020-11-01: :class:`NetworkProfilesOperations` + * 2021-02-01: :class:`NetworkProfilesOperations` + * 2021-05-01: :class:`NetworkProfilesOperations` + * 2021-08-01: :class:`NetworkProfilesOperations` + """ + api_version = self._get_api_version('network_profiles') + if api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkProfilesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_profiles'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_security_groups(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`NetworkSecurityGroupsOperations` + * 2016-09-01: :class:`NetworkSecurityGroupsOperations` + * 2016-12-01: :class:`NetworkSecurityGroupsOperations` + * 2017-03-01: :class:`NetworkSecurityGroupsOperations` + * 2017-06-01: :class:`NetworkSecurityGroupsOperations` + * 2017-10-01: :class:`NetworkSecurityGroupsOperations` + * 2018-01-01: :class:`NetworkSecurityGroupsOperations` + * 2018-02-01: :class:`NetworkSecurityGroupsOperations` + * 2018-04-01: :class:`NetworkSecurityGroupsOperations` + * 2018-06-01: :class:`NetworkSecurityGroupsOperations` + * 2018-07-01: :class:`NetworkSecurityGroupsOperations` + * 2018-08-01: :class:`NetworkSecurityGroupsOperations` + * 2018-10-01: :class:`NetworkSecurityGroupsOperations` + * 2018-11-01: :class:`NetworkSecurityGroupsOperations` + * 2018-12-01: :class:`NetworkSecurityGroupsOperations` + * 2019-02-01: :class:`NetworkSecurityGroupsOperations` + * 2019-04-01: :class:`NetworkSecurityGroupsOperations` + * 2019-06-01: :class:`NetworkSecurityGroupsOperations` + * 2019-07-01: :class:`NetworkSecurityGroupsOperations` + * 2019-08-01: :class:`NetworkSecurityGroupsOperations` + * 2019-09-01: :class:`NetworkSecurityGroupsOperations` + * 2019-11-01: :class:`NetworkSecurityGroupsOperations` + * 2019-12-01: :class:`NetworkSecurityGroupsOperations` + * 2020-03-01: :class:`NetworkSecurityGroupsOperations` + * 2020-04-01: :class:`NetworkSecurityGroupsOperations` + * 2020-05-01: :class:`NetworkSecurityGroupsOperations` + * 2020-06-01: :class:`NetworkSecurityGroupsOperations` + * 2020-07-01: :class:`NetworkSecurityGroupsOperations` + * 2020-08-01: :class:`NetworkSecurityGroupsOperations` + * 2020-11-01: :class:`NetworkSecurityGroupsOperations` + * 2021-02-01: :class:`NetworkSecurityGroupsOperations` + * 2021-05-01: :class:`NetworkSecurityGroupsOperations` + * 2021-08-01: :class:`NetworkSecurityGroupsOperations` + """ + api_version = self._get_api_version('network_security_groups') + if api_version == '2015-06-15': + from .v2015_06_15.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkSecurityGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_security_perimeters(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkSecurityPerimetersOperations` + """ + api_version = self._get_api_version('network_security_perimeters') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkSecurityPerimetersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_perimeters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_virtual_appliances(self): + """Instance depends on the API version: + + * 2019-12-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-03-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-04-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-05-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-06-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-07-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-08-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-11-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-02-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-05-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-08-01: :class:`NetworkVirtualAppliancesOperations` + """ + api_version = self._get_api_version('network_virtual_appliances') + if api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkVirtualAppliancesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_virtual_appliances'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_watchers(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`NetworkWatchersOperations` + * 2016-12-01: :class:`NetworkWatchersOperations` + * 2017-03-01: :class:`NetworkWatchersOperations` + * 2017-06-01: :class:`NetworkWatchersOperations` + * 2017-10-01: :class:`NetworkWatchersOperations` + * 2018-01-01: :class:`NetworkWatchersOperations` + * 2018-02-01: :class:`NetworkWatchersOperations` + * 2018-04-01: :class:`NetworkWatchersOperations` + * 2018-06-01: :class:`NetworkWatchersOperations` + * 2018-07-01: :class:`NetworkWatchersOperations` + * 2018-08-01: :class:`NetworkWatchersOperations` + * 2018-10-01: :class:`NetworkWatchersOperations` + * 2018-11-01: :class:`NetworkWatchersOperations` + * 2018-12-01: :class:`NetworkWatchersOperations` + * 2019-02-01: :class:`NetworkWatchersOperations` + * 2019-04-01: :class:`NetworkWatchersOperations` + * 2019-06-01: :class:`NetworkWatchersOperations` + * 2019-07-01: :class:`NetworkWatchersOperations` + * 2019-08-01: :class:`NetworkWatchersOperations` + * 2019-09-01: :class:`NetworkWatchersOperations` + * 2019-11-01: :class:`NetworkWatchersOperations` + * 2019-12-01: :class:`NetworkWatchersOperations` + * 2020-03-01: :class:`NetworkWatchersOperations` + * 2020-04-01: :class:`NetworkWatchersOperations` + * 2020-05-01: :class:`NetworkWatchersOperations` + * 2020-06-01: :class:`NetworkWatchersOperations` + * 2020-07-01: :class:`NetworkWatchersOperations` + * 2020-08-01: :class:`NetworkWatchersOperations` + * 2020-11-01: :class:`NetworkWatchersOperations` + * 2021-02-01: :class:`NetworkWatchersOperations` + * 2021-05-01: :class:`NetworkWatchersOperations` + * 2021-08-01: :class:`NetworkWatchersOperations` + """ + api_version = self._get_api_version('network_watchers') + if api_version == '2016-09-01': + from .v2016_09_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkWatchersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_watchers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nsp_access_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NspAccessRulesOperations` + """ + api_version = self._get_api_version('nsp_access_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NspAccessRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nsp_access_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nsp_associations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NspAssociationsOperations` + """ + api_version = self._get_api_version('nsp_associations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NspAssociationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nsp_associations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nsp_profiles(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NspProfilesOperations` + """ + api_version = self._get_api_version('nsp_profiles') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NspProfilesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nsp_profiles'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def operations(self): + """Instance depends on the API version: + + * 2017-10-01: :class:`Operations` + * 2018-01-01: :class:`Operations` + * 2018-02-01: :class:`Operations` + * 2018-04-01: :class:`Operations` + * 2018-06-01: :class:`Operations` + * 2018-07-01: :class:`Operations` + * 2018-08-01: :class:`Operations` + * 2018-10-01: :class:`Operations` + * 2018-11-01: :class:`Operations` + * 2018-12-01: :class:`Operations` + * 2019-02-01: :class:`Operations` + * 2019-04-01: :class:`Operations` + * 2019-06-01: :class:`Operations` + * 2019-07-01: :class:`Operations` + * 2019-08-01: :class:`Operations` + * 2019-09-01: :class:`Operations` + * 2019-11-01: :class:`Operations` + * 2019-12-01: :class:`Operations` + * 2020-03-01: :class:`Operations` + * 2020-04-01: :class:`Operations` + * 2020-05-01: :class:`Operations` + * 2020-06-01: :class:`Operations` + * 2020-07-01: :class:`Operations` + * 2020-08-01: :class:`Operations` + * 2020-11-01: :class:`Operations` + * 2021-02-01: :class:`Operations` + * 2021-05-01: :class:`Operations` + * 2021-08-01: :class:`Operations` + """ + api_version = self._get_api_version('operations') + if api_version == '2017-10-01': + from .v2017_10_01.operations import Operations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import Operations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import Operations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import Operations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import Operations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import Operations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import Operations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import Operations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import Operations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import Operations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import Operations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import Operations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import Operations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import Operations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import Operations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import Operations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import Operations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import Operations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import Operations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import Operations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import Operations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import Operations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import Operations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import Operations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import Operations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import Operations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import Operations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import Operations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def p2_svpn_gateways(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`P2SVpnGatewaysOperations` + * 2018-10-01: :class:`P2SVpnGatewaysOperations` + * 2018-11-01: :class:`P2SVpnGatewaysOperations` + * 2018-12-01: :class:`P2SVpnGatewaysOperations` + * 2019-02-01: :class:`P2SVpnGatewaysOperations` + * 2019-04-01: :class:`P2SVpnGatewaysOperations` + * 2019-06-01: :class:`P2SVpnGatewaysOperations` + * 2019-07-01: :class:`P2SVpnGatewaysOperations` + * 2019-08-01: :class:`P2SVpnGatewaysOperations` + * 2019-09-01: :class:`P2SVpnGatewaysOperations` + * 2019-11-01: :class:`P2SVpnGatewaysOperations` + * 2019-12-01: :class:`P2SVpnGatewaysOperations` + * 2020-03-01: :class:`P2SVpnGatewaysOperations` + * 2020-04-01: :class:`P2SVpnGatewaysOperations` + * 2020-05-01: :class:`P2SVpnGatewaysOperations` + * 2020-06-01: :class:`P2SVpnGatewaysOperations` + * 2020-07-01: :class:`P2SVpnGatewaysOperations` + * 2020-08-01: :class:`P2SVpnGatewaysOperations` + * 2020-11-01: :class:`P2SVpnGatewaysOperations` + * 2021-02-01: :class:`P2SVpnGatewaysOperations` + * 2021-05-01: :class:`P2SVpnGatewaysOperations` + * 2021-08-01: :class:`P2SVpnGatewaysOperations` + """ + api_version = self._get_api_version('p2_svpn_gateways') + if api_version == '2018-08-01': + from .v2018_08_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import P2SVpnGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'p2_svpn_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def p2_svpn_server_configurations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-10-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-11-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-12-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-02-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-04-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-06-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-07-01: :class:`P2SVpnServerConfigurationsOperations` + """ + api_version = self._get_api_version('p2_svpn_server_configurations') + if api_version == '2018-08-01': + from .v2018_08_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import P2SVpnServerConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'p2_svpn_server_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def packet_captures(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`PacketCapturesOperations` + * 2016-12-01: :class:`PacketCapturesOperations` + * 2017-03-01: :class:`PacketCapturesOperations` + * 2017-06-01: :class:`PacketCapturesOperations` + * 2017-10-01: :class:`PacketCapturesOperations` + * 2018-01-01: :class:`PacketCapturesOperations` + * 2018-02-01: :class:`PacketCapturesOperations` + * 2018-04-01: :class:`PacketCapturesOperations` + * 2018-06-01: :class:`PacketCapturesOperations` + * 2018-07-01: :class:`PacketCapturesOperations` + * 2018-08-01: :class:`PacketCapturesOperations` + * 2018-10-01: :class:`PacketCapturesOperations` + * 2018-11-01: :class:`PacketCapturesOperations` + * 2018-12-01: :class:`PacketCapturesOperations` + * 2019-02-01: :class:`PacketCapturesOperations` + * 2019-04-01: :class:`PacketCapturesOperations` + * 2019-06-01: :class:`PacketCapturesOperations` + * 2019-07-01: :class:`PacketCapturesOperations` + * 2019-08-01: :class:`PacketCapturesOperations` + * 2019-09-01: :class:`PacketCapturesOperations` + * 2019-11-01: :class:`PacketCapturesOperations` + * 2019-12-01: :class:`PacketCapturesOperations` + * 2020-03-01: :class:`PacketCapturesOperations` + * 2020-04-01: :class:`PacketCapturesOperations` + * 2020-05-01: :class:`PacketCapturesOperations` + * 2020-06-01: :class:`PacketCapturesOperations` + * 2020-07-01: :class:`PacketCapturesOperations` + * 2020-08-01: :class:`PacketCapturesOperations` + * 2020-11-01: :class:`PacketCapturesOperations` + * 2021-02-01: :class:`PacketCapturesOperations` + * 2021-05-01: :class:`PacketCapturesOperations` + * 2021-08-01: :class:`PacketCapturesOperations` + """ + api_version = self._get_api_version('packet_captures') + if api_version == '2016-09-01': + from .v2016_09_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import PacketCapturesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'packet_captures'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def peer_express_route_circuit_connections(self): + """Instance depends on the API version: + + * 2018-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-04-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-06-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-07-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-09-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-11-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-03-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-04-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-05-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-06-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-07-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-11-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-05-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + """ + api_version = self._get_api_version('peer_express_route_circuit_connections') + if api_version == '2018-12-01': + from .v2018_12_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'peer_express_route_circuit_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def perimeter_associable_resource_types(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`PerimeterAssociableResourceTypesOperations` + """ + api_version = self._get_api_version('perimeter_associable_resource_types') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import PerimeterAssociableResourceTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'perimeter_associable_resource_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_dns_zone_groups(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-04-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-05-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-06-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-07-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-08-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-11-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-02-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-05-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-08-01: :class:`PrivateDnsZoneGroupsOperations` + """ + api_version = self._get_api_version('private_dns_zone_groups') + if api_version == '2020-03-01': + from .v2020_03_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_dns_zone_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_endpoints(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`PrivateEndpointsOperations` + * 2019-06-01: :class:`PrivateEndpointsOperations` + * 2019-07-01: :class:`PrivateEndpointsOperations` + * 2019-08-01: :class:`PrivateEndpointsOperations` + * 2019-09-01: :class:`PrivateEndpointsOperations` + * 2019-11-01: :class:`PrivateEndpointsOperations` + * 2019-12-01: :class:`PrivateEndpointsOperations` + * 2020-03-01: :class:`PrivateEndpointsOperations` + * 2020-04-01: :class:`PrivateEndpointsOperations` + * 2020-05-01: :class:`PrivateEndpointsOperations` + * 2020-06-01: :class:`PrivateEndpointsOperations` + * 2020-07-01: :class:`PrivateEndpointsOperations` + * 2020-08-01: :class:`PrivateEndpointsOperations` + * 2020-11-01: :class:`PrivateEndpointsOperations` + * 2021-02-01: :class:`PrivateEndpointsOperations` + * 2021-05-01: :class:`PrivateEndpointsOperations` + * 2021-08-01: :class:`PrivateEndpointsOperations` + """ + api_version = self._get_api_version('private_endpoints') + if api_version == '2019-04-01': + from .v2019_04_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import PrivateEndpointsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_endpoints'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_link_services(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`PrivateLinkServicesOperations` + * 2019-06-01: :class:`PrivateLinkServicesOperations` + * 2019-07-01: :class:`PrivateLinkServicesOperations` + * 2019-08-01: :class:`PrivateLinkServicesOperations` + * 2019-09-01: :class:`PrivateLinkServicesOperations` + * 2019-11-01: :class:`PrivateLinkServicesOperations` + * 2019-12-01: :class:`PrivateLinkServicesOperations` + * 2020-03-01: :class:`PrivateLinkServicesOperations` + * 2020-04-01: :class:`PrivateLinkServicesOperations` + * 2020-05-01: :class:`PrivateLinkServicesOperations` + * 2020-06-01: :class:`PrivateLinkServicesOperations` + * 2020-07-01: :class:`PrivateLinkServicesOperations` + * 2020-08-01: :class:`PrivateLinkServicesOperations` + * 2020-11-01: :class:`PrivateLinkServicesOperations` + * 2021-02-01: :class:`PrivateLinkServicesOperations` + * 2021-05-01: :class:`PrivateLinkServicesOperations` + * 2021-08-01: :class:`PrivateLinkServicesOperations` + """ + api_version = self._get_api_version('private_link_services') + if api_version == '2019-04-01': + from .v2019_04_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import PrivateLinkServicesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_link_services'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def public_ip_addresses(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`PublicIPAddressesOperations` + * 2016-09-01: :class:`PublicIPAddressesOperations` + * 2016-12-01: :class:`PublicIPAddressesOperations` + * 2017-03-01: :class:`PublicIPAddressesOperations` + * 2017-06-01: :class:`PublicIPAddressesOperations` + * 2017-10-01: :class:`PublicIPAddressesOperations` + * 2018-01-01: :class:`PublicIPAddressesOperations` + * 2018-02-01: :class:`PublicIPAddressesOperations` + * 2018-04-01: :class:`PublicIPAddressesOperations` + * 2018-06-01: :class:`PublicIPAddressesOperations` + * 2018-07-01: :class:`PublicIPAddressesOperations` + * 2018-08-01: :class:`PublicIPAddressesOperations` + * 2018-10-01: :class:`PublicIPAddressesOperations` + * 2018-11-01: :class:`PublicIPAddressesOperations` + * 2018-12-01: :class:`PublicIPAddressesOperations` + * 2019-02-01: :class:`PublicIPAddressesOperations` + * 2019-04-01: :class:`PublicIPAddressesOperations` + * 2019-06-01: :class:`PublicIPAddressesOperations` + * 2019-07-01: :class:`PublicIPAddressesOperations` + * 2019-08-01: :class:`PublicIPAddressesOperations` + * 2019-09-01: :class:`PublicIPAddressesOperations` + * 2019-11-01: :class:`PublicIPAddressesOperations` + * 2019-12-01: :class:`PublicIPAddressesOperations` + * 2020-03-01: :class:`PublicIPAddressesOperations` + * 2020-04-01: :class:`PublicIPAddressesOperations` + * 2020-05-01: :class:`PublicIPAddressesOperations` + * 2020-06-01: :class:`PublicIPAddressesOperations` + * 2020-07-01: :class:`PublicIPAddressesOperations` + * 2020-08-01: :class:`PublicIPAddressesOperations` + * 2020-11-01: :class:`PublicIPAddressesOperations` + * 2021-02-01: :class:`PublicIPAddressesOperations` + * 2021-05-01: :class:`PublicIPAddressesOperations` + * 2021-08-01: :class:`PublicIPAddressesOperations` + """ + api_version = self._get_api_version('public_ip_addresses') + if api_version == '2015-06-15': + from .v2015_06_15.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import PublicIPAddressesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'public_ip_addresses'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def public_ip_prefixes(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`PublicIPPrefixesOperations` + * 2018-08-01: :class:`PublicIPPrefixesOperations` + * 2018-10-01: :class:`PublicIPPrefixesOperations` + * 2018-11-01: :class:`PublicIPPrefixesOperations` + * 2018-12-01: :class:`PublicIPPrefixesOperations` + * 2019-02-01: :class:`PublicIPPrefixesOperations` + * 2019-04-01: :class:`PublicIPPrefixesOperations` + * 2019-06-01: :class:`PublicIPPrefixesOperations` + * 2019-07-01: :class:`PublicIPPrefixesOperations` + * 2019-08-01: :class:`PublicIPPrefixesOperations` + * 2019-09-01: :class:`PublicIPPrefixesOperations` + * 2019-11-01: :class:`PublicIPPrefixesOperations` + * 2019-12-01: :class:`PublicIPPrefixesOperations` + * 2020-03-01: :class:`PublicIPPrefixesOperations` + * 2020-04-01: :class:`PublicIPPrefixesOperations` + * 2020-05-01: :class:`PublicIPPrefixesOperations` + * 2020-06-01: :class:`PublicIPPrefixesOperations` + * 2020-07-01: :class:`PublicIPPrefixesOperations` + * 2020-08-01: :class:`PublicIPPrefixesOperations` + * 2020-11-01: :class:`PublicIPPrefixesOperations` + * 2021-02-01: :class:`PublicIPPrefixesOperations` + * 2021-05-01: :class:`PublicIPPrefixesOperations` + * 2021-08-01: :class:`PublicIPPrefixesOperations` + """ + api_version = self._get_api_version('public_ip_prefixes') + if api_version == '2018-07-01': + from .v2018_07_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import PublicIPPrefixesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'public_ip_prefixes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def resource_navigation_links(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`ResourceNavigationLinksOperations` + * 2019-04-01: :class:`ResourceNavigationLinksOperations` + * 2019-06-01: :class:`ResourceNavigationLinksOperations` + * 2019-07-01: :class:`ResourceNavigationLinksOperations` + * 2019-08-01: :class:`ResourceNavigationLinksOperations` + * 2019-09-01: :class:`ResourceNavigationLinksOperations` + * 2019-11-01: :class:`ResourceNavigationLinksOperations` + * 2019-12-01: :class:`ResourceNavigationLinksOperations` + * 2020-03-01: :class:`ResourceNavigationLinksOperations` + * 2020-04-01: :class:`ResourceNavigationLinksOperations` + * 2020-05-01: :class:`ResourceNavigationLinksOperations` + * 2020-06-01: :class:`ResourceNavigationLinksOperations` + * 2020-07-01: :class:`ResourceNavigationLinksOperations` + * 2020-08-01: :class:`ResourceNavigationLinksOperations` + * 2020-11-01: :class:`ResourceNavigationLinksOperations` + * 2021-02-01: :class:`ResourceNavigationLinksOperations` + * 2021-05-01: :class:`ResourceNavigationLinksOperations` + * 2021-08-01: :class:`ResourceNavigationLinksOperations` + """ + api_version = self._get_api_version('resource_navigation_links') + if api_version == '2019-02-01': + from .v2019_02_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ResourceNavigationLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'resource_navigation_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_filter_rules(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`RouteFilterRulesOperations` + * 2017-03-01: :class:`RouteFilterRulesOperations` + * 2017-06-01: :class:`RouteFilterRulesOperations` + * 2017-10-01: :class:`RouteFilterRulesOperations` + * 2018-01-01: :class:`RouteFilterRulesOperations` + * 2018-02-01: :class:`RouteFilterRulesOperations` + * 2018-04-01: :class:`RouteFilterRulesOperations` + * 2018-06-01: :class:`RouteFilterRulesOperations` + * 2018-07-01: :class:`RouteFilterRulesOperations` + * 2018-08-01: :class:`RouteFilterRulesOperations` + * 2018-10-01: :class:`RouteFilterRulesOperations` + * 2018-11-01: :class:`RouteFilterRulesOperations` + * 2018-12-01: :class:`RouteFilterRulesOperations` + * 2019-02-01: :class:`RouteFilterRulesOperations` + * 2019-04-01: :class:`RouteFilterRulesOperations` + * 2019-06-01: :class:`RouteFilterRulesOperations` + * 2019-07-01: :class:`RouteFilterRulesOperations` + * 2019-08-01: :class:`RouteFilterRulesOperations` + * 2019-09-01: :class:`RouteFilterRulesOperations` + * 2019-11-01: :class:`RouteFilterRulesOperations` + * 2019-12-01: :class:`RouteFilterRulesOperations` + * 2020-03-01: :class:`RouteFilterRulesOperations` + * 2020-04-01: :class:`RouteFilterRulesOperations` + * 2020-05-01: :class:`RouteFilterRulesOperations` + * 2020-06-01: :class:`RouteFilterRulesOperations` + * 2020-07-01: :class:`RouteFilterRulesOperations` + * 2020-08-01: :class:`RouteFilterRulesOperations` + * 2020-11-01: :class:`RouteFilterRulesOperations` + * 2021-02-01: :class:`RouteFilterRulesOperations` + * 2021-05-01: :class:`RouteFilterRulesOperations` + * 2021-08-01: :class:`RouteFilterRulesOperations` + """ + api_version = self._get_api_version('route_filter_rules') + if api_version == '2016-12-01': + from .v2016_12_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import RouteFilterRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_filter_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_filters(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`RouteFiltersOperations` + * 2017-03-01: :class:`RouteFiltersOperations` + * 2017-06-01: :class:`RouteFiltersOperations` + * 2017-10-01: :class:`RouteFiltersOperations` + * 2018-01-01: :class:`RouteFiltersOperations` + * 2018-02-01: :class:`RouteFiltersOperations` + * 2018-04-01: :class:`RouteFiltersOperations` + * 2018-06-01: :class:`RouteFiltersOperations` + * 2018-07-01: :class:`RouteFiltersOperations` + * 2018-08-01: :class:`RouteFiltersOperations` + * 2018-10-01: :class:`RouteFiltersOperations` + * 2018-11-01: :class:`RouteFiltersOperations` + * 2018-12-01: :class:`RouteFiltersOperations` + * 2019-02-01: :class:`RouteFiltersOperations` + * 2019-04-01: :class:`RouteFiltersOperations` + * 2019-06-01: :class:`RouteFiltersOperations` + * 2019-07-01: :class:`RouteFiltersOperations` + * 2019-08-01: :class:`RouteFiltersOperations` + * 2019-09-01: :class:`RouteFiltersOperations` + * 2019-11-01: :class:`RouteFiltersOperations` + * 2019-12-01: :class:`RouteFiltersOperations` + * 2020-03-01: :class:`RouteFiltersOperations` + * 2020-04-01: :class:`RouteFiltersOperations` + * 2020-05-01: :class:`RouteFiltersOperations` + * 2020-06-01: :class:`RouteFiltersOperations` + * 2020-07-01: :class:`RouteFiltersOperations` + * 2020-08-01: :class:`RouteFiltersOperations` + * 2020-11-01: :class:`RouteFiltersOperations` + * 2021-02-01: :class:`RouteFiltersOperations` + * 2021-05-01: :class:`RouteFiltersOperations` + * 2021-08-01: :class:`RouteFiltersOperations` + """ + api_version = self._get_api_version('route_filters') + if api_version == '2016-12-01': + from .v2016_12_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import RouteFiltersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_filters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_tables(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`RouteTablesOperations` + * 2016-09-01: :class:`RouteTablesOperations` + * 2016-12-01: :class:`RouteTablesOperations` + * 2017-03-01: :class:`RouteTablesOperations` + * 2017-06-01: :class:`RouteTablesOperations` + * 2017-10-01: :class:`RouteTablesOperations` + * 2018-01-01: :class:`RouteTablesOperations` + * 2018-02-01: :class:`RouteTablesOperations` + * 2018-04-01: :class:`RouteTablesOperations` + * 2018-06-01: :class:`RouteTablesOperations` + * 2018-07-01: :class:`RouteTablesOperations` + * 2018-08-01: :class:`RouteTablesOperations` + * 2018-10-01: :class:`RouteTablesOperations` + * 2018-11-01: :class:`RouteTablesOperations` + * 2018-12-01: :class:`RouteTablesOperations` + * 2019-02-01: :class:`RouteTablesOperations` + * 2019-04-01: :class:`RouteTablesOperations` + * 2019-06-01: :class:`RouteTablesOperations` + * 2019-07-01: :class:`RouteTablesOperations` + * 2019-08-01: :class:`RouteTablesOperations` + * 2019-09-01: :class:`RouteTablesOperations` + * 2019-11-01: :class:`RouteTablesOperations` + * 2019-12-01: :class:`RouteTablesOperations` + * 2020-03-01: :class:`RouteTablesOperations` + * 2020-04-01: :class:`RouteTablesOperations` + * 2020-05-01: :class:`RouteTablesOperations` + * 2020-06-01: :class:`RouteTablesOperations` + * 2020-07-01: :class:`RouteTablesOperations` + * 2020-08-01: :class:`RouteTablesOperations` + * 2020-11-01: :class:`RouteTablesOperations` + * 2021-02-01: :class:`RouteTablesOperations` + * 2021-05-01: :class:`RouteTablesOperations` + * 2021-08-01: :class:`RouteTablesOperations` + """ + api_version = self._get_api_version('route_tables') + if api_version == '2015-06-15': + from .v2015_06_15.operations import RouteTablesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import RouteTablesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_tables'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def routes(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`RoutesOperations` + * 2016-09-01: :class:`RoutesOperations` + * 2016-12-01: :class:`RoutesOperations` + * 2017-03-01: :class:`RoutesOperations` + * 2017-06-01: :class:`RoutesOperations` + * 2017-10-01: :class:`RoutesOperations` + * 2018-01-01: :class:`RoutesOperations` + * 2018-02-01: :class:`RoutesOperations` + * 2018-04-01: :class:`RoutesOperations` + * 2018-06-01: :class:`RoutesOperations` + * 2018-07-01: :class:`RoutesOperations` + * 2018-08-01: :class:`RoutesOperations` + * 2018-10-01: :class:`RoutesOperations` + * 2018-11-01: :class:`RoutesOperations` + * 2018-12-01: :class:`RoutesOperations` + * 2019-02-01: :class:`RoutesOperations` + * 2019-04-01: :class:`RoutesOperations` + * 2019-06-01: :class:`RoutesOperations` + * 2019-07-01: :class:`RoutesOperations` + * 2019-08-01: :class:`RoutesOperations` + * 2019-09-01: :class:`RoutesOperations` + * 2019-11-01: :class:`RoutesOperations` + * 2019-12-01: :class:`RoutesOperations` + * 2020-03-01: :class:`RoutesOperations` + * 2020-04-01: :class:`RoutesOperations` + * 2020-05-01: :class:`RoutesOperations` + * 2020-06-01: :class:`RoutesOperations` + * 2020-07-01: :class:`RoutesOperations` + * 2020-08-01: :class:`RoutesOperations` + * 2020-11-01: :class:`RoutesOperations` + * 2021-02-01: :class:`RoutesOperations` + * 2021-05-01: :class:`RoutesOperations` + * 2021-08-01: :class:`RoutesOperations` + """ + api_version = self._get_api_version('routes') + if api_version == '2015-06-15': + from .v2015_06_15.operations import RoutesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import RoutesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import RoutesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import RoutesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import RoutesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import RoutesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import RoutesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import RoutesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import RoutesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import RoutesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import RoutesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import RoutesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'routes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def routing_intent(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`RoutingIntentOperations` + * 2021-08-01: :class:`RoutingIntentOperations` + """ + api_version = self._get_api_version('routing_intent') + if api_version == '2021-05-01': + from .v2021_05_01.operations import RoutingIntentOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import RoutingIntentOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'routing_intent'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_admin_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityAdminConfigurationsOperations` + """ + api_version = self._get_api_version('security_admin_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import SecurityAdminConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_admin_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_partner_providers(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`SecurityPartnerProvidersOperations` + * 2020-04-01: :class:`SecurityPartnerProvidersOperations` + * 2020-05-01: :class:`SecurityPartnerProvidersOperations` + * 2020-06-01: :class:`SecurityPartnerProvidersOperations` + * 2020-07-01: :class:`SecurityPartnerProvidersOperations` + * 2020-08-01: :class:`SecurityPartnerProvidersOperations` + * 2020-11-01: :class:`SecurityPartnerProvidersOperations` + * 2021-02-01: :class:`SecurityPartnerProvidersOperations` + * 2021-05-01: :class:`SecurityPartnerProvidersOperations` + * 2021-08-01: :class:`SecurityPartnerProvidersOperations` + """ + api_version = self._get_api_version('security_partner_providers') + if api_version == '2020-03-01': + from .v2020_03_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import SecurityPartnerProvidersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_partner_providers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_rules(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`SecurityRulesOperations` + * 2016-09-01: :class:`SecurityRulesOperations` + * 2016-12-01: :class:`SecurityRulesOperations` + * 2017-03-01: :class:`SecurityRulesOperations` + * 2017-06-01: :class:`SecurityRulesOperations` + * 2017-10-01: :class:`SecurityRulesOperations` + * 2018-01-01: :class:`SecurityRulesOperations` + * 2018-02-01: :class:`SecurityRulesOperations` + * 2018-04-01: :class:`SecurityRulesOperations` + * 2018-06-01: :class:`SecurityRulesOperations` + * 2018-07-01: :class:`SecurityRulesOperations` + * 2018-08-01: :class:`SecurityRulesOperations` + * 2018-10-01: :class:`SecurityRulesOperations` + * 2018-11-01: :class:`SecurityRulesOperations` + * 2018-12-01: :class:`SecurityRulesOperations` + * 2019-02-01: :class:`SecurityRulesOperations` + * 2019-04-01: :class:`SecurityRulesOperations` + * 2019-06-01: :class:`SecurityRulesOperations` + * 2019-07-01: :class:`SecurityRulesOperations` + * 2019-08-01: :class:`SecurityRulesOperations` + * 2019-09-01: :class:`SecurityRulesOperations` + * 2019-11-01: :class:`SecurityRulesOperations` + * 2019-12-01: :class:`SecurityRulesOperations` + * 2020-03-01: :class:`SecurityRulesOperations` + * 2020-04-01: :class:`SecurityRulesOperations` + * 2020-05-01: :class:`SecurityRulesOperations` + * 2020-06-01: :class:`SecurityRulesOperations` + * 2020-07-01: :class:`SecurityRulesOperations` + * 2020-08-01: :class:`SecurityRulesOperations` + * 2020-11-01: :class:`SecurityRulesOperations` + * 2021-02-01: :class:`SecurityRulesOperations` + * 2021-05-01: :class:`SecurityRulesOperations` + * 2021-08-01: :class:`SecurityRulesOperations` + """ + api_version = self._get_api_version('security_rules') + if api_version == '2015-06-15': + from .v2015_06_15.operations import SecurityRulesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import SecurityRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_user_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityUserConfigurationsOperations` + """ + api_version = self._get_api_version('security_user_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import SecurityUserConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_user_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_association_links(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`ServiceAssociationLinksOperations` + * 2019-04-01: :class:`ServiceAssociationLinksOperations` + * 2019-06-01: :class:`ServiceAssociationLinksOperations` + * 2019-07-01: :class:`ServiceAssociationLinksOperations` + * 2019-08-01: :class:`ServiceAssociationLinksOperations` + * 2019-09-01: :class:`ServiceAssociationLinksOperations` + * 2019-11-01: :class:`ServiceAssociationLinksOperations` + * 2019-12-01: :class:`ServiceAssociationLinksOperations` + * 2020-03-01: :class:`ServiceAssociationLinksOperations` + * 2020-04-01: :class:`ServiceAssociationLinksOperations` + * 2020-05-01: :class:`ServiceAssociationLinksOperations` + * 2020-06-01: :class:`ServiceAssociationLinksOperations` + * 2020-07-01: :class:`ServiceAssociationLinksOperations` + * 2020-08-01: :class:`ServiceAssociationLinksOperations` + * 2020-11-01: :class:`ServiceAssociationLinksOperations` + * 2021-02-01: :class:`ServiceAssociationLinksOperations` + * 2021-05-01: :class:`ServiceAssociationLinksOperations` + * 2021-08-01: :class:`ServiceAssociationLinksOperations` + """ + api_version = self._get_api_version('service_association_links') + if api_version == '2019-02-01': + from .v2019_02_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ServiceAssociationLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_association_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_endpoint_policies(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-10-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-12-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-02-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-04-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-06-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-09-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-12-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-03-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-04-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-05-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-06-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-02-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-05-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-08-01: :class:`ServiceEndpointPoliciesOperations` + """ + api_version = self._get_api_version('service_endpoint_policies') + if api_version == '2018-07-01': + from .v2018_07_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ServiceEndpointPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_endpoint_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_endpoint_policy_definitions(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-10-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-12-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-02-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-04-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-06-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-09-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-12-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-03-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-04-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-05-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-06-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-02-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-05-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + """ + api_version = self._get_api_version('service_endpoint_policy_definitions') + if api_version == '2018-07-01': + from .v2018_07_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_endpoint_policy_definitions'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_tag_information(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`ServiceTagInformationOperations` + * 2021-08-01: :class:`ServiceTagInformationOperations` + """ + api_version = self._get_api_version('service_tag_information') + if api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceTagInformationOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ServiceTagInformationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_tag_information'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_tags(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`ServiceTagsOperations` + * 2019-06-01: :class:`ServiceTagsOperations` + * 2019-07-01: :class:`ServiceTagsOperations` + * 2019-08-01: :class:`ServiceTagsOperations` + * 2019-09-01: :class:`ServiceTagsOperations` + * 2019-11-01: :class:`ServiceTagsOperations` + * 2019-12-01: :class:`ServiceTagsOperations` + * 2020-03-01: :class:`ServiceTagsOperations` + * 2020-04-01: :class:`ServiceTagsOperations` + * 2020-05-01: :class:`ServiceTagsOperations` + * 2020-06-01: :class:`ServiceTagsOperations` + * 2020-07-01: :class:`ServiceTagsOperations` + * 2020-08-01: :class:`ServiceTagsOperations` + * 2020-11-01: :class:`ServiceTagsOperations` + * 2021-02-01: :class:`ServiceTagsOperations` + * 2021-05-01: :class:`ServiceTagsOperations` + * 2021-08-01: :class:`ServiceTagsOperations` + """ + api_version = self._get_api_version('service_tags') + if api_version == '2019-04-01': + from .v2019_04_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import ServiceTagsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_tags'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def subnets(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`SubnetsOperations` + * 2016-09-01: :class:`SubnetsOperations` + * 2016-12-01: :class:`SubnetsOperations` + * 2017-03-01: :class:`SubnetsOperations` + * 2017-06-01: :class:`SubnetsOperations` + * 2017-10-01: :class:`SubnetsOperations` + * 2018-01-01: :class:`SubnetsOperations` + * 2018-02-01: :class:`SubnetsOperations` + * 2018-04-01: :class:`SubnetsOperations` + * 2018-06-01: :class:`SubnetsOperations` + * 2018-07-01: :class:`SubnetsOperations` + * 2018-08-01: :class:`SubnetsOperations` + * 2018-10-01: :class:`SubnetsOperations` + * 2018-11-01: :class:`SubnetsOperations` + * 2018-12-01: :class:`SubnetsOperations` + * 2019-02-01: :class:`SubnetsOperations` + * 2019-04-01: :class:`SubnetsOperations` + * 2019-06-01: :class:`SubnetsOperations` + * 2019-07-01: :class:`SubnetsOperations` + * 2019-08-01: :class:`SubnetsOperations` + * 2019-09-01: :class:`SubnetsOperations` + * 2019-11-01: :class:`SubnetsOperations` + * 2019-12-01: :class:`SubnetsOperations` + * 2020-03-01: :class:`SubnetsOperations` + * 2020-04-01: :class:`SubnetsOperations` + * 2020-05-01: :class:`SubnetsOperations` + * 2020-06-01: :class:`SubnetsOperations` + * 2020-07-01: :class:`SubnetsOperations` + * 2020-08-01: :class:`SubnetsOperations` + * 2020-11-01: :class:`SubnetsOperations` + * 2021-02-01: :class:`SubnetsOperations` + * 2021-05-01: :class:`SubnetsOperations` + * 2021-08-01: :class:`SubnetsOperations` + """ + api_version = self._get_api_version('subnets') + if api_version == '2015-06-15': + from .v2015_06_15.operations import SubnetsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import SubnetsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import SubnetsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import SubnetsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import SubnetsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import SubnetsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import SubnetsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import SubnetsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import SubnetsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import SubnetsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import SubnetsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import SubnetsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'subnets'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def usages(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`UsagesOperations` + * 2016-09-01: :class:`UsagesOperations` + * 2016-12-01: :class:`UsagesOperations` + * 2017-03-01: :class:`UsagesOperations` + * 2017-06-01: :class:`UsagesOperations` + * 2017-10-01: :class:`UsagesOperations` + * 2018-01-01: :class:`UsagesOperations` + * 2018-02-01: :class:`UsagesOperations` + * 2018-04-01: :class:`UsagesOperations` + * 2018-06-01: :class:`UsagesOperations` + * 2018-07-01: :class:`UsagesOperations` + * 2018-08-01: :class:`UsagesOperations` + * 2018-10-01: :class:`UsagesOperations` + * 2018-11-01: :class:`UsagesOperations` + * 2018-12-01: :class:`UsagesOperations` + * 2019-02-01: :class:`UsagesOperations` + * 2019-04-01: :class:`UsagesOperations` + * 2019-06-01: :class:`UsagesOperations` + * 2019-07-01: :class:`UsagesOperations` + * 2019-08-01: :class:`UsagesOperations` + * 2019-09-01: :class:`UsagesOperations` + * 2019-11-01: :class:`UsagesOperations` + * 2019-12-01: :class:`UsagesOperations` + * 2020-03-01: :class:`UsagesOperations` + * 2020-04-01: :class:`UsagesOperations` + * 2020-05-01: :class:`UsagesOperations` + * 2020-06-01: :class:`UsagesOperations` + * 2020-07-01: :class:`UsagesOperations` + * 2020-08-01: :class:`UsagesOperations` + * 2020-11-01: :class:`UsagesOperations` + * 2021-02-01: :class:`UsagesOperations` + * 2021-05-01: :class:`UsagesOperations` + * 2021-08-01: :class:`UsagesOperations` + """ + api_version = self._get_api_version('usages') + if api_version == '2015-06-15': + from .v2015_06_15.operations import UsagesOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import UsagesOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import UsagesOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import UsagesOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import UsagesOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import UsagesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import UsagesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import UsagesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import UsagesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import UsagesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'usages'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRuleCollectionsOperations` + """ + api_version = self._get_api_version('user_rule_collections') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import UserRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRulesOperations` + """ + api_version = self._get_api_version('user_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import UserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_appliance_sites(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualApplianceSitesOperations` + * 2020-06-01: :class:`VirtualApplianceSitesOperations` + * 2020-07-01: :class:`VirtualApplianceSitesOperations` + * 2020-08-01: :class:`VirtualApplianceSitesOperations` + * 2020-11-01: :class:`VirtualApplianceSitesOperations` + * 2021-02-01: :class:`VirtualApplianceSitesOperations` + * 2021-05-01: :class:`VirtualApplianceSitesOperations` + * 2021-08-01: :class:`VirtualApplianceSitesOperations` + """ + api_version = self._get_api_version('virtual_appliance_sites') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualApplianceSitesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_appliance_sites'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_appliance_skus(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualApplianceSkusOperations` + * 2020-06-01: :class:`VirtualApplianceSkusOperations` + * 2020-07-01: :class:`VirtualApplianceSkusOperations` + * 2020-08-01: :class:`VirtualApplianceSkusOperations` + * 2020-11-01: :class:`VirtualApplianceSkusOperations` + * 2021-02-01: :class:`VirtualApplianceSkusOperations` + * 2021-05-01: :class:`VirtualApplianceSkusOperations` + * 2021-08-01: :class:`VirtualApplianceSkusOperations` + """ + api_version = self._get_api_version('virtual_appliance_skus') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualApplianceSkusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_appliance_skus'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_bgp_connection(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-06-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-07-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-08-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-11-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-02-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-05-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-08-01: :class:`VirtualHubBgpConnectionOperations` + """ + api_version = self._get_api_version('virtual_hub_bgp_connection') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualHubBgpConnectionOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connection'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_bgp_connections(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-06-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-07-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-08-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-11-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-02-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-05-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-08-01: :class:`VirtualHubBgpConnectionsOperations` + """ + api_version = self._get_api_version('virtual_hub_bgp_connections') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_ip_configuration(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-06-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-07-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-08-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-11-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-02-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-05-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-08-01: :class:`VirtualHubIpConfigurationOperations` + """ + api_version = self._get_api_version('virtual_hub_ip_configuration') + if api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualHubIpConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_ip_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_route_table_v2_s(self): + """Instance depends on the API version: + + * 2019-09-01: :class:`VirtualHubRouteTableV2SOperations` + * 2019-11-01: :class:`VirtualHubRouteTableV2SOperations` + * 2019-12-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-03-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-04-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-05-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-06-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-07-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-08-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-11-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-02-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-05-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-08-01: :class:`VirtualHubRouteTableV2SOperations` + """ + api_version = self._get_api_version('virtual_hub_route_table_v2_s') + if api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_route_table_v2_s'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hubs(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VirtualHubsOperations` + * 2018-06-01: :class:`VirtualHubsOperations` + * 2018-07-01: :class:`VirtualHubsOperations` + * 2018-08-01: :class:`VirtualHubsOperations` + * 2018-10-01: :class:`VirtualHubsOperations` + * 2018-11-01: :class:`VirtualHubsOperations` + * 2018-12-01: :class:`VirtualHubsOperations` + * 2019-02-01: :class:`VirtualHubsOperations` + * 2019-04-01: :class:`VirtualHubsOperations` + * 2019-06-01: :class:`VirtualHubsOperations` + * 2019-07-01: :class:`VirtualHubsOperations` + * 2019-08-01: :class:`VirtualHubsOperations` + * 2019-09-01: :class:`VirtualHubsOperations` + * 2019-11-01: :class:`VirtualHubsOperations` + * 2019-12-01: :class:`VirtualHubsOperations` + * 2020-03-01: :class:`VirtualHubsOperations` + * 2020-04-01: :class:`VirtualHubsOperations` + * 2020-05-01: :class:`VirtualHubsOperations` + * 2020-06-01: :class:`VirtualHubsOperations` + * 2020-07-01: :class:`VirtualHubsOperations` + * 2020-08-01: :class:`VirtualHubsOperations` + * 2020-11-01: :class:`VirtualHubsOperations` + * 2021-02-01: :class:`VirtualHubsOperations` + * 2021-05-01: :class:`VirtualHubsOperations` + * 2021-08-01: :class:`VirtualHubsOperations` + """ + api_version = self._get_api_version('virtual_hubs') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualHubsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hubs'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateway_connections(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2016-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2016-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-01-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-05-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-05-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + """ + api_version = self._get_api_version('virtual_network_gateway_connections') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateway_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateway_nat_rules(self): + """Instance depends on the API version: + + * 2021-02-01: :class:`VirtualNetworkGatewayNatRulesOperations` + * 2021-05-01: :class:`VirtualNetworkGatewayNatRulesOperations` + * 2021-08-01: :class:`VirtualNetworkGatewayNatRulesOperations` + """ + api_version = self._get_api_version('virtual_network_gateway_nat_rules') + if api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateway_nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworkGatewaysOperations` + * 2016-09-01: :class:`VirtualNetworkGatewaysOperations` + * 2016-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-03-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-10-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-01-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-10-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-09-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-03-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-05-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-05-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-08-01: :class:`VirtualNetworkGatewaysOperations` + """ + api_version = self._get_api_version('virtual_network_gateways') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualNetworkGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_peerings(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`VirtualNetworkPeeringsOperations` + * 2016-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-03-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-10-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-01-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-10-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-09-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-03-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-05-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-05-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-08-01: :class:`VirtualNetworkPeeringsOperations` + """ + api_version = self._get_api_version('virtual_network_peerings') + if api_version == '2016-09-01': + from .v2016_09_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualNetworkPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_taps(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`VirtualNetworkTapsOperations` + * 2018-10-01: :class:`VirtualNetworkTapsOperations` + * 2018-11-01: :class:`VirtualNetworkTapsOperations` + * 2018-12-01: :class:`VirtualNetworkTapsOperations` + * 2019-02-01: :class:`VirtualNetworkTapsOperations` + * 2019-04-01: :class:`VirtualNetworkTapsOperations` + * 2019-06-01: :class:`VirtualNetworkTapsOperations` + * 2019-07-01: :class:`VirtualNetworkTapsOperations` + * 2019-08-01: :class:`VirtualNetworkTapsOperations` + * 2019-09-01: :class:`VirtualNetworkTapsOperations` + * 2019-11-01: :class:`VirtualNetworkTapsOperations` + * 2019-12-01: :class:`VirtualNetworkTapsOperations` + * 2020-03-01: :class:`VirtualNetworkTapsOperations` + * 2020-04-01: :class:`VirtualNetworkTapsOperations` + * 2020-05-01: :class:`VirtualNetworkTapsOperations` + * 2020-06-01: :class:`VirtualNetworkTapsOperations` + * 2020-07-01: :class:`VirtualNetworkTapsOperations` + * 2020-08-01: :class:`VirtualNetworkTapsOperations` + * 2020-11-01: :class:`VirtualNetworkTapsOperations` + * 2021-02-01: :class:`VirtualNetworkTapsOperations` + * 2021-05-01: :class:`VirtualNetworkTapsOperations` + * 2021-08-01: :class:`VirtualNetworkTapsOperations` + """ + api_version = self._get_api_version('virtual_network_taps') + if api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualNetworkTapsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_taps'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_networks(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworksOperations` + * 2016-09-01: :class:`VirtualNetworksOperations` + * 2016-12-01: :class:`VirtualNetworksOperations` + * 2017-03-01: :class:`VirtualNetworksOperations` + * 2017-06-01: :class:`VirtualNetworksOperations` + * 2017-10-01: :class:`VirtualNetworksOperations` + * 2018-01-01: :class:`VirtualNetworksOperations` + * 2018-02-01: :class:`VirtualNetworksOperations` + * 2018-04-01: :class:`VirtualNetworksOperations` + * 2018-06-01: :class:`VirtualNetworksOperations` + * 2018-07-01: :class:`VirtualNetworksOperations` + * 2018-08-01: :class:`VirtualNetworksOperations` + * 2018-10-01: :class:`VirtualNetworksOperations` + * 2018-11-01: :class:`VirtualNetworksOperations` + * 2018-12-01: :class:`VirtualNetworksOperations` + * 2019-02-01: :class:`VirtualNetworksOperations` + * 2019-04-01: :class:`VirtualNetworksOperations` + * 2019-06-01: :class:`VirtualNetworksOperations` + * 2019-07-01: :class:`VirtualNetworksOperations` + * 2019-08-01: :class:`VirtualNetworksOperations` + * 2019-09-01: :class:`VirtualNetworksOperations` + * 2019-11-01: :class:`VirtualNetworksOperations` + * 2019-12-01: :class:`VirtualNetworksOperations` + * 2020-03-01: :class:`VirtualNetworksOperations` + * 2020-04-01: :class:`VirtualNetworksOperations` + * 2020-05-01: :class:`VirtualNetworksOperations` + * 2020-06-01: :class:`VirtualNetworksOperations` + * 2020-07-01: :class:`VirtualNetworksOperations` + * 2020-08-01: :class:`VirtualNetworksOperations` + * 2020-11-01: :class:`VirtualNetworksOperations` + * 2021-02-01: :class:`VirtualNetworksOperations` + * 2021-05-01: :class:`VirtualNetworksOperations` + * 2021-08-01: :class:`VirtualNetworksOperations` + """ + api_version = self._get_api_version('virtual_networks') + if api_version == '2015-06-15': + from .v2015_06_15.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_router_peerings(self): + """Instance depends on the API version: + + * 2019-07-01: :class:`VirtualRouterPeeringsOperations` + * 2019-08-01: :class:`VirtualRouterPeeringsOperations` + * 2019-09-01: :class:`VirtualRouterPeeringsOperations` + * 2019-11-01: :class:`VirtualRouterPeeringsOperations` + * 2019-12-01: :class:`VirtualRouterPeeringsOperations` + * 2020-03-01: :class:`VirtualRouterPeeringsOperations` + * 2020-04-01: :class:`VirtualRouterPeeringsOperations` + * 2020-05-01: :class:`VirtualRouterPeeringsOperations` + * 2020-06-01: :class:`VirtualRouterPeeringsOperations` + * 2020-07-01: :class:`VirtualRouterPeeringsOperations` + * 2020-08-01: :class:`VirtualRouterPeeringsOperations` + * 2020-11-01: :class:`VirtualRouterPeeringsOperations` + * 2021-02-01: :class:`VirtualRouterPeeringsOperations` + * 2021-05-01: :class:`VirtualRouterPeeringsOperations` + * 2021-08-01: :class:`VirtualRouterPeeringsOperations` + """ + api_version = self._get_api_version('virtual_router_peerings') + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualRouterPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_router_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_routers(self): + """Instance depends on the API version: + + * 2019-07-01: :class:`VirtualRoutersOperations` + * 2019-08-01: :class:`VirtualRoutersOperations` + * 2019-09-01: :class:`VirtualRoutersOperations` + * 2019-11-01: :class:`VirtualRoutersOperations` + * 2019-12-01: :class:`VirtualRoutersOperations` + * 2020-03-01: :class:`VirtualRoutersOperations` + * 2020-04-01: :class:`VirtualRoutersOperations` + * 2020-05-01: :class:`VirtualRoutersOperations` + * 2020-06-01: :class:`VirtualRoutersOperations` + * 2020-07-01: :class:`VirtualRoutersOperations` + * 2020-08-01: :class:`VirtualRoutersOperations` + * 2020-11-01: :class:`VirtualRoutersOperations` + * 2021-02-01: :class:`VirtualRoutersOperations` + * 2021-05-01: :class:`VirtualRoutersOperations` + * 2021-08-01: :class:`VirtualRoutersOperations` + """ + api_version = self._get_api_version('virtual_routers') + if api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualRoutersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_routers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_wans(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VirtualWANsOperations` + * 2018-06-01: :class:`VirtualWANsOperations` + * 2018-07-01: :class:`VirtualWANsOperations` + * 2018-08-01: :class:`VirtualWansOperations` + * 2018-10-01: :class:`VirtualWansOperations` + * 2018-11-01: :class:`VirtualWansOperations` + * 2018-12-01: :class:`VirtualWansOperations` + * 2019-02-01: :class:`VirtualWansOperations` + * 2019-04-01: :class:`VirtualWansOperations` + * 2019-06-01: :class:`VirtualWansOperations` + * 2019-07-01: :class:`VirtualWansOperations` + * 2019-08-01: :class:`VirtualWansOperations` + * 2019-09-01: :class:`VirtualWansOperations` + * 2019-11-01: :class:`VirtualWansOperations` + * 2019-12-01: :class:`VirtualWansOperations` + * 2020-03-01: :class:`VirtualWansOperations` + * 2020-04-01: :class:`VirtualWansOperations` + * 2020-05-01: :class:`VirtualWansOperations` + * 2020-06-01: :class:`VirtualWansOperations` + * 2020-07-01: :class:`VirtualWansOperations` + * 2020-08-01: :class:`VirtualWansOperations` + * 2020-11-01: :class:`VirtualWansOperations` + * 2021-02-01: :class:`VirtualWansOperations` + * 2021-05-01: :class:`VirtualWansOperations` + * 2021-08-01: :class:`VirtualWansOperations` + """ + api_version = self._get_api_version('virtual_wans') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VirtualWansOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_wans'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_connections(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnConnectionsOperations` + * 2018-06-01: :class:`VpnConnectionsOperations` + * 2018-07-01: :class:`VpnConnectionsOperations` + * 2018-08-01: :class:`VpnConnectionsOperations` + * 2018-10-01: :class:`VpnConnectionsOperations` + * 2018-11-01: :class:`VpnConnectionsOperations` + * 2018-12-01: :class:`VpnConnectionsOperations` + * 2019-02-01: :class:`VpnConnectionsOperations` + * 2019-04-01: :class:`VpnConnectionsOperations` + * 2019-06-01: :class:`VpnConnectionsOperations` + * 2019-07-01: :class:`VpnConnectionsOperations` + * 2019-08-01: :class:`VpnConnectionsOperations` + * 2019-09-01: :class:`VpnConnectionsOperations` + * 2019-11-01: :class:`VpnConnectionsOperations` + * 2019-12-01: :class:`VpnConnectionsOperations` + * 2020-03-01: :class:`VpnConnectionsOperations` + * 2020-04-01: :class:`VpnConnectionsOperations` + * 2020-05-01: :class:`VpnConnectionsOperations` + * 2020-06-01: :class:`VpnConnectionsOperations` + * 2020-07-01: :class:`VpnConnectionsOperations` + * 2020-08-01: :class:`VpnConnectionsOperations` + * 2020-11-01: :class:`VpnConnectionsOperations` + * 2021-02-01: :class:`VpnConnectionsOperations` + * 2021-05-01: :class:`VpnConnectionsOperations` + * 2021-08-01: :class:`VpnConnectionsOperations` + """ + api_version = self._get_api_version('vpn_connections') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_gateways(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnGatewaysOperations` + * 2018-06-01: :class:`VpnGatewaysOperations` + * 2018-07-01: :class:`VpnGatewaysOperations` + * 2018-08-01: :class:`VpnGatewaysOperations` + * 2018-10-01: :class:`VpnGatewaysOperations` + * 2018-11-01: :class:`VpnGatewaysOperations` + * 2018-12-01: :class:`VpnGatewaysOperations` + * 2019-02-01: :class:`VpnGatewaysOperations` + * 2019-04-01: :class:`VpnGatewaysOperations` + * 2019-06-01: :class:`VpnGatewaysOperations` + * 2019-07-01: :class:`VpnGatewaysOperations` + * 2019-08-01: :class:`VpnGatewaysOperations` + * 2019-09-01: :class:`VpnGatewaysOperations` + * 2019-11-01: :class:`VpnGatewaysOperations` + * 2019-12-01: :class:`VpnGatewaysOperations` + * 2020-03-01: :class:`VpnGatewaysOperations` + * 2020-04-01: :class:`VpnGatewaysOperations` + * 2020-05-01: :class:`VpnGatewaysOperations` + * 2020-06-01: :class:`VpnGatewaysOperations` + * 2020-07-01: :class:`VpnGatewaysOperations` + * 2020-08-01: :class:`VpnGatewaysOperations` + * 2020-11-01: :class:`VpnGatewaysOperations` + * 2021-02-01: :class:`VpnGatewaysOperations` + * 2021-05-01: :class:`VpnGatewaysOperations` + * 2021-08-01: :class:`VpnGatewaysOperations` + """ + api_version = self._get_api_version('vpn_gateways') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_link_connections(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnLinkConnectionsOperations` + * 2019-07-01: :class:`VpnLinkConnectionsOperations` + * 2019-08-01: :class:`VpnLinkConnectionsOperations` + * 2019-09-01: :class:`VpnLinkConnectionsOperations` + * 2019-11-01: :class:`VpnLinkConnectionsOperations` + * 2019-12-01: :class:`VpnLinkConnectionsOperations` + * 2020-03-01: :class:`VpnLinkConnectionsOperations` + * 2020-04-01: :class:`VpnLinkConnectionsOperations` + * 2020-05-01: :class:`VpnLinkConnectionsOperations` + * 2020-06-01: :class:`VpnLinkConnectionsOperations` + * 2020-07-01: :class:`VpnLinkConnectionsOperations` + * 2020-08-01: :class:`VpnLinkConnectionsOperations` + * 2020-11-01: :class:`VpnLinkConnectionsOperations` + * 2021-02-01: :class:`VpnLinkConnectionsOperations` + * 2021-05-01: :class:`VpnLinkConnectionsOperations` + * 2021-08-01: :class:`VpnLinkConnectionsOperations` + """ + api_version = self._get_api_version('vpn_link_connections') + if api_version == '2019-06-01': + from .v2019_06_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnLinkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_link_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_server_configurations(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`VpnServerConfigurationsOperations` + * 2019-09-01: :class:`VpnServerConfigurationsOperations` + * 2019-11-01: :class:`VpnServerConfigurationsOperations` + * 2019-12-01: :class:`VpnServerConfigurationsOperations` + * 2020-03-01: :class:`VpnServerConfigurationsOperations` + * 2020-04-01: :class:`VpnServerConfigurationsOperations` + * 2020-05-01: :class:`VpnServerConfigurationsOperations` + * 2020-06-01: :class:`VpnServerConfigurationsOperations` + * 2020-07-01: :class:`VpnServerConfigurationsOperations` + * 2020-08-01: :class:`VpnServerConfigurationsOperations` + * 2020-11-01: :class:`VpnServerConfigurationsOperations` + * 2021-02-01: :class:`VpnServerConfigurationsOperations` + * 2021-05-01: :class:`VpnServerConfigurationsOperations` + * 2021-08-01: :class:`VpnServerConfigurationsOperations` + """ + api_version = self._get_api_version('vpn_server_configurations') + if api_version == '2019-08-01': + from .v2019_08_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnServerConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_server_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_server_configurations_associated_with_virtual_wan(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-09-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-11-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-12-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-03-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-04-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-05-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-06-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-07-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-11-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-02-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-05-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + """ + api_version = self._get_api_version('vpn_server_configurations_associated_with_virtual_wan') + if api_version == '2019-08-01': + from .v2019_08_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_server_configurations_associated_with_virtual_wan'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_site_link_connections(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-07-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-08-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-09-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-11-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-12-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-03-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-04-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-05-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-06-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-07-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-08-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-11-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-02-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-05-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-08-01: :class:`VpnSiteLinkConnectionsOperations` + """ + api_version = self._get_api_version('vpn_site_link_connections') + if api_version == '2019-06-01': + from .v2019_06_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_site_link_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_site_links(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnSiteLinksOperations` + * 2019-07-01: :class:`VpnSiteLinksOperations` + * 2019-08-01: :class:`VpnSiteLinksOperations` + * 2019-09-01: :class:`VpnSiteLinksOperations` + * 2019-11-01: :class:`VpnSiteLinksOperations` + * 2019-12-01: :class:`VpnSiteLinksOperations` + * 2020-03-01: :class:`VpnSiteLinksOperations` + * 2020-04-01: :class:`VpnSiteLinksOperations` + * 2020-05-01: :class:`VpnSiteLinksOperations` + * 2020-06-01: :class:`VpnSiteLinksOperations` + * 2020-07-01: :class:`VpnSiteLinksOperations` + * 2020-08-01: :class:`VpnSiteLinksOperations` + * 2020-11-01: :class:`VpnSiteLinksOperations` + * 2021-02-01: :class:`VpnSiteLinksOperations` + * 2021-05-01: :class:`VpnSiteLinksOperations` + * 2021-08-01: :class:`VpnSiteLinksOperations` + """ + api_version = self._get_api_version('vpn_site_links') + if api_version == '2019-06-01': + from .v2019_06_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnSiteLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_site_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_sites(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnSitesOperations` + * 2018-06-01: :class:`VpnSitesOperations` + * 2018-07-01: :class:`VpnSitesOperations` + * 2018-08-01: :class:`VpnSitesOperations` + * 2018-10-01: :class:`VpnSitesOperations` + * 2018-11-01: :class:`VpnSitesOperations` + * 2018-12-01: :class:`VpnSitesOperations` + * 2019-02-01: :class:`VpnSitesOperations` + * 2019-04-01: :class:`VpnSitesOperations` + * 2019-06-01: :class:`VpnSitesOperations` + * 2019-07-01: :class:`VpnSitesOperations` + * 2019-08-01: :class:`VpnSitesOperations` + * 2019-09-01: :class:`VpnSitesOperations` + * 2019-11-01: :class:`VpnSitesOperations` + * 2019-12-01: :class:`VpnSitesOperations` + * 2020-03-01: :class:`VpnSitesOperations` + * 2020-04-01: :class:`VpnSitesOperations` + * 2020-05-01: :class:`VpnSitesOperations` + * 2020-06-01: :class:`VpnSitesOperations` + * 2020-07-01: :class:`VpnSitesOperations` + * 2020-08-01: :class:`VpnSitesOperations` + * 2020-11-01: :class:`VpnSitesOperations` + * 2021-02-01: :class:`VpnSitesOperations` + * 2021-05-01: :class:`VpnSitesOperations` + * 2021-08-01: :class:`VpnSitesOperations` + """ + api_version = self._get_api_version('vpn_sites') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnSitesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_sites'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_sites_configuration(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnSitesConfigurationOperations` + * 2018-06-01: :class:`VpnSitesConfigurationOperations` + * 2018-07-01: :class:`VpnSitesConfigurationOperations` + * 2018-08-01: :class:`VpnSitesConfigurationOperations` + * 2018-10-01: :class:`VpnSitesConfigurationOperations` + * 2018-11-01: :class:`VpnSitesConfigurationOperations` + * 2018-12-01: :class:`VpnSitesConfigurationOperations` + * 2019-02-01: :class:`VpnSitesConfigurationOperations` + * 2019-04-01: :class:`VpnSitesConfigurationOperations` + * 2019-06-01: :class:`VpnSitesConfigurationOperations` + * 2019-07-01: :class:`VpnSitesConfigurationOperations` + * 2019-08-01: :class:`VpnSitesConfigurationOperations` + * 2019-09-01: :class:`VpnSitesConfigurationOperations` + * 2019-11-01: :class:`VpnSitesConfigurationOperations` + * 2019-12-01: :class:`VpnSitesConfigurationOperations` + * 2020-03-01: :class:`VpnSitesConfigurationOperations` + * 2020-04-01: :class:`VpnSitesConfigurationOperations` + * 2020-05-01: :class:`VpnSitesConfigurationOperations` + * 2020-06-01: :class:`VpnSitesConfigurationOperations` + * 2020-07-01: :class:`VpnSitesConfigurationOperations` + * 2020-08-01: :class:`VpnSitesConfigurationOperations` + * 2020-11-01: :class:`VpnSitesConfigurationOperations` + * 2021-02-01: :class:`VpnSitesConfigurationOperations` + * 2021-05-01: :class:`VpnSitesConfigurationOperations` + * 2021-08-01: :class:`VpnSitesConfigurationOperations` + """ + api_version = self._get_api_version('vpn_sites_configuration') + if api_version == '2018-04-01': + from .v2018_04_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import VpnSitesConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_sites_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def web_application_firewall_policies(self): + """Instance depends on the API version: + + * 2018-12-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-02-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-04-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-06-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-07-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-08-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-09-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-11-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-12-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-03-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-04-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-05-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-06-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-07-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-08-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-11-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-02-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-05-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-08-01: :class:`WebApplicationFirewallPoliciesOperations` + """ + api_version = self._get_api_version('web_application_firewall_policies') + if api_version == '2018-12-01': + from .v2018_12_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'web_application_firewall_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def web_categories(self): + """Instance depends on the API version: + + * 2020-07-01: :class:`WebCategoriesOperations` + * 2020-08-01: :class:`WebCategoriesOperations` + * 2020-11-01: :class:`WebCategoriesOperations` + * 2021-02-01: :class:`WebCategoriesOperations` + * 2021-05-01: :class:`WebCategoriesOperations` + * 2021-08-01: :class:`WebCategoriesOperations` + """ + api_version = self._get_api_version('web_categories') + if api_version == '2020-07-01': + from .v2020_07_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import WebCategoriesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'web_categories'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + def close(self): + self._client.close() + def __enter__(self): + self._client.__enter__() + return self + def __exit__(self, *exc_details): + self._client.__exit__(*exc_details) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_operations_mixin.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_operations_mixin.py new file mode 100644 index 00000000000..42895401832 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_operations_mixin.py @@ -0,0 +1,613 @@ +# 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 import Serializer, Deserializer +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + from azure.core.paging import ItemPaged + from azure.core.polling import LROPoller + + +class NetworkManagementClientOperationsMixin(object): + + def begin_delete_bastion_shareable_link( # pylint: disable=inconsistent-return-statements + self, + resource_group_name, # type: str + bastion_host_name, # type: str + bsl_request, # type: "_models.BastionShareableLinkListRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('begin_delete_bastion_shareable_link') + if api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_delete_bastion_shareable_link'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_delete_bastion_shareable_link(resource_group_name, bastion_host_name, bsl_request, **kwargs) + + def begin_generatevirtualwanvpnserverconfigurationvpnprofile( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + vpn_client_params, # type: "_models.VirtualWanVpnProfileParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnProfileResponse"] + """Generates a unique VPN profile for P2S clients for VirtualWan and associated + VpnServerConfiguration combination in the specified resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation + operation. + :type vpn_client_params: ~azure.mgmt.network.v2021_08_01.models.VirtualWanVpnProfileParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnProfileResponse or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnProfileResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('begin_generatevirtualwanvpnserverconfigurationvpnprofile') + if api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_generatevirtualwanvpnserverconfigurationvpnprofile'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_generatevirtualwanvpnserverconfigurationvpnprofile(resource_group_name, virtual_wan_name, vpn_client_params, **kwargs) + + def begin_get_active_sessions( + self, + resource_group_name, # type: str + bastion_host_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[ItemPaged["_models.BastionActiveSessionListResult"]] + """Returns the list of currently active sessions on the Bastion. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + BastionActiveSessionListResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionActiveSessionListResult]] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('begin_get_active_sessions') + if api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_get_active_sessions'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_get_active_sessions(resource_group_name, bastion_host_name, **kwargs) + + def begin_put_bastion_shareable_link( + self, + resource_group_name, # type: str + bastion_host_name, # type: str + bsl_request, # type: "_models.BastionShareableLinkListRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[ItemPaged["_models.BastionShareableLinkListResult"]] + """Creates a Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + BastionShareableLinkListResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListResult]] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('begin_put_bastion_shareable_link') + if api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_put_bastion_shareable_link'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_put_bastion_shareable_link(resource_group_name, bastion_host_name, bsl_request, **kwargs) + + def check_dns_name_availability( + self, + location, # type: str + domain_name_label, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DnsNameAvailabilityResult" + """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + + :param location: The location of the domain name. + :type location: str + :param domain_name_label: The domain name to be verified. It must conform to the following + regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + :type domain_name_label: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DnsNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DnsNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('check_dns_name_availability') + if api_version == '2015-06-15': + from .v2015_06_15.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2016-09-01': + from .v2016_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2016-12-01': + from .v2016_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2017-03-01': + from .v2017_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2017-06-01': + from .v2017_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2017-10-01': + from .v2017_10_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-01-01': + from .v2018_01_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from .v2018_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-04-01': + from .v2018_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-06-01': + from .v2018_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-07-01': + from .v2018_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'check_dns_name_availability'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.check_dns_name_availability(location, domain_name_label, **kwargs) + + def disconnect_active_sessions( + self, + resource_group_name, # type: str + bastion_host_name, # type: str + session_ids, # type: "_models.SessionIds" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BastionSessionDeleteResult"] + """Returns the list of currently active sessions on the Bastion. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param session_ids: The list of sessionids to disconnect. + :type session_ids: ~azure.mgmt.network.v2021_08_01.models.SessionIds + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionSessionDeleteResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionSessionDeleteResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('disconnect_active_sessions') + if api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'disconnect_active_sessions'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.disconnect_active_sessions(resource_group_name, bastion_host_name, session_ids, **kwargs) + + def get_bastion_shareable_link( + self, + resource_group_name, # type: str + bastion_host_name, # type: str + bsl_request, # type: "_models.BastionShareableLinkListRequest" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BastionShareableLinkListResult"] + """Return the Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionShareableLinkListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('get_bastion_shareable_link') + if api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'get_bastion_shareable_link'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.get_bastion_shareable_link(resource_group_name, bastion_host_name, bsl_request, **kwargs) + + def supported_security_providers( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualWanSecurityProviders" + """Gives the supported security providers for the virtual wan. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN for which supported security providers are + needed. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWanSecurityProviders, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProviders + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('supported_security_providers') + if api_version == '2018-08-01': + from .v2018_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-10-01': + from .v2018_10_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-12-01': + from .v2018_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-02-01': + from .v2019_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-06-01': + from .v2019_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-07-01': + from .v2019_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from .v2019_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-09-01': + from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from .v2019_12_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from .v2020_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from .v2020_04_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from .v2020_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from .v2020_07_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from .v2020_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from .v2021_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'supported_security_providers'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.supported_security_providers(resource_group_name, virtual_wan_name, **kwargs) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_version.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_version.py new file mode 100644 index 00000000000..dcd3f89f57a --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/_version.py @@ -0,0 +1,8 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "19.3.0" diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/__init__.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/__init__.py new file mode 100644 index 00000000000..1c78defcf22 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/__init__.py @@ -0,0 +1,10 @@ +# 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 ._network_management_client import NetworkManagementClient +__all__ = ['NetworkManagementClient'] diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_configuration.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_configuration.py new file mode 100644 index 00000000000..b1fe05cba1e --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# 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 typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class NetworkManagementClientConfiguration(Configuration): + """Configuration for NetworkManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs # type: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(NetworkManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-network/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_network_management_client.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_network_management_client.py new file mode 100644 index 00000000000..ccbbafae050 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_network_management_client.py @@ -0,0 +1,8825 @@ +# 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 typing import Any, Optional, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.mgmt.core import AsyncARMPipelineClient +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin + +from ._configuration import NetworkManagementClientConfiguration +from ._operations_mixin import NetworkManagementClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + from azure.core.credentials_async import AsyncTokenCredential + +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass + +class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): + """Network Client. + + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + DEFAULT_API_VERSION = '2021-08-01' + _PROFILE_TAG = "azure.mgmt.network.NetworkManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + 'active_connectivity_configurations': '2021-02-01-preview', + 'active_security_admin_rules': '2021-02-01-preview', + 'active_security_user_rules': '2021-02-01-preview', + 'admin_rule_collections': '2021-02-01-preview', + 'admin_rules': '2021-02-01-preview', + 'connectivity_configurations': '2021-02-01-preview', + 'effective_connectivity_configurations': '2021-02-01-preview', + 'effective_virtual_networks': '2021-02-01-preview', + 'firewall_policy_rule_groups': '2020-04-01', + 'interface_endpoints': '2019-02-01', + 'network_groups': '2021-02-01-preview', + 'network_manager_commits': '2021-02-01-preview', + 'network_manager_deployment_status': '2021-02-01-preview', + 'network_manager_effective_security_admin_rules': '2021-02-01-preview', + 'network_managers': '2021-02-01-preview', + 'network_security_perimeters': '2021-02-01-preview', + 'nsp_access_rules': '2021-02-01-preview', + 'nsp_associations': '2021-02-01-preview', + 'nsp_profiles': '2021-02-01-preview', + 'p2_svpn_server_configurations': '2019-07-01', + 'perimeter_associable_resource_types': '2021-02-01-preview', + 'security_admin_configurations': '2021-02-01-preview', + 'security_user_configurations': '2021-02-01-preview', + 'user_rule_collections': '2021-02-01-preview', + 'user_rules': '2021-02-01-preview', + }}, + _PROFILE_TAG + " latest" + ) + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + api_version: Optional[str] = None, + base_url: str = "https://management.azure.com", + profile: KnownProfiles = KnownProfiles.default, + **kwargs # type: Any + ) -> None: + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + super(NetworkManagementClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2015-06-15: :mod:`v2015_06_15.models` + * 2016-09-01: :mod:`v2016_09_01.models` + * 2016-12-01: :mod:`v2016_12_01.models` + * 2017-03-01: :mod:`v2017_03_01.models` + * 2017-06-01: :mod:`v2017_06_01.models` + * 2017-10-01: :mod:`v2017_10_01.models` + * 2018-01-01: :mod:`v2018_01_01.models` + * 2018-02-01: :mod:`v2018_02_01.models` + * 2018-04-01: :mod:`v2018_04_01.models` + * 2018-06-01: :mod:`v2018_06_01.models` + * 2018-07-01: :mod:`v2018_07_01.models` + * 2018-08-01: :mod:`v2018_08_01.models` + * 2018-10-01: :mod:`v2018_10_01.models` + * 2018-11-01: :mod:`v2018_11_01.models` + * 2018-12-01: :mod:`v2018_12_01.models` + * 2019-02-01: :mod:`v2019_02_01.models` + * 2019-04-01: :mod:`v2019_04_01.models` + * 2019-06-01: :mod:`v2019_06_01.models` + * 2019-07-01: :mod:`v2019_07_01.models` + * 2019-08-01: :mod:`v2019_08_01.models` + * 2019-09-01: :mod:`v2019_09_01.models` + * 2019-11-01: :mod:`v2019_11_01.models` + * 2019-12-01: :mod:`v2019_12_01.models` + * 2020-03-01: :mod:`v2020_03_01.models` + * 2020-04-01: :mod:`v2020_04_01.models` + * 2020-05-01: :mod:`v2020_05_01.models` + * 2020-06-01: :mod:`v2020_06_01.models` + * 2020-07-01: :mod:`v2020_07_01.models` + * 2020-08-01: :mod:`v2020_08_01.models` + * 2020-11-01: :mod:`v2020_11_01.models` + * 2021-02-01: :mod:`v2021_02_01.models` + * 2021-02-01-preview: :mod:`v2021_02_01_preview.models` + * 2021-05-01: :mod:`v2021_05_01.models` + * 2021-08-01: :mod:`v2021_08_01.models` + """ + if api_version == '2015-06-15': + from ..v2015_06_15 import models + return models + elif api_version == '2016-09-01': + from ..v2016_09_01 import models + return models + elif api_version == '2016-12-01': + from ..v2016_12_01 import models + return models + elif api_version == '2017-03-01': + from ..v2017_03_01 import models + return models + elif api_version == '2017-06-01': + from ..v2017_06_01 import models + return models + elif api_version == '2017-10-01': + from ..v2017_10_01 import models + return models + elif api_version == '2018-01-01': + from ..v2018_01_01 import models + return models + elif api_version == '2018-02-01': + from ..v2018_02_01 import models + return models + elif api_version == '2018-04-01': + from ..v2018_04_01 import models + return models + elif api_version == '2018-06-01': + from ..v2018_06_01 import models + return models + elif api_version == '2018-07-01': + from ..v2018_07_01 import models + return models + elif api_version == '2018-08-01': + from ..v2018_08_01 import models + return models + elif api_version == '2018-10-01': + from ..v2018_10_01 import models + return models + elif api_version == '2018-11-01': + from ..v2018_11_01 import models + return models + elif api_version == '2018-12-01': + from ..v2018_12_01 import models + return models + elif api_version == '2019-02-01': + from ..v2019_02_01 import models + return models + elif api_version == '2019-04-01': + from ..v2019_04_01 import models + return models + elif api_version == '2019-06-01': + from ..v2019_06_01 import models + return models + elif api_version == '2019-07-01': + from ..v2019_07_01 import models + return models + elif api_version == '2019-08-01': + from ..v2019_08_01 import models + return models + elif api_version == '2019-09-01': + from ..v2019_09_01 import models + return models + elif api_version == '2019-11-01': + from ..v2019_11_01 import models + return models + elif api_version == '2019-12-01': + from ..v2019_12_01 import models + return models + elif api_version == '2020-03-01': + from ..v2020_03_01 import models + return models + elif api_version == '2020-04-01': + from ..v2020_04_01 import models + return models + elif api_version == '2020-05-01': + from ..v2020_05_01 import models + return models + elif api_version == '2020-06-01': + from ..v2020_06_01 import models + return models + elif api_version == '2020-07-01': + from ..v2020_07_01 import models + return models + elif api_version == '2020-08-01': + from ..v2020_08_01 import models + return models + elif api_version == '2020-11-01': + from ..v2020_11_01 import models + return models + elif api_version == '2021-02-01': + from ..v2021_02_01 import models + return models + elif api_version == '2021-02-01-preview': + from ..v2021_02_01_preview import models + return models + elif api_version == '2021-05-01': + from ..v2021_05_01 import models + return models + elif api_version == '2021-08-01': + from ..v2021_08_01 import models + return models + raise ValueError("API version {} is not available".format(api_version)) + + @property + def active_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('active_connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('active_security_admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityUserRulesOperations` + """ + api_version = self._get_api_version('active_security_user_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveSecurityUserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRuleCollectionsOperations` + """ + api_version = self._get_api_version('admin_rule_collections') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import AdminRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRulesOperations` + """ + api_version = self._get_api_version('admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import AdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateway_private_endpoint_connections(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-06-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-07-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-08-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2020-11-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-02-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-05-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-08-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + """ + api_version = self._get_api_version('application_gateway_private_endpoint_connections') + if api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateway_private_endpoint_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateway_private_link_resources(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-06-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-07-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-08-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2020-11-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-02-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-05-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-08-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + """ + api_version = self._get_api_version('application_gateway_private_link_resources') + if api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateway_private_link_resources'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ApplicationGatewaysOperations` + * 2016-09-01: :class:`ApplicationGatewaysOperations` + * 2016-12-01: :class:`ApplicationGatewaysOperations` + * 2017-03-01: :class:`ApplicationGatewaysOperations` + * 2017-06-01: :class:`ApplicationGatewaysOperations` + * 2017-10-01: :class:`ApplicationGatewaysOperations` + * 2018-01-01: :class:`ApplicationGatewaysOperations` + * 2018-02-01: :class:`ApplicationGatewaysOperations` + * 2018-04-01: :class:`ApplicationGatewaysOperations` + * 2018-06-01: :class:`ApplicationGatewaysOperations` + * 2018-07-01: :class:`ApplicationGatewaysOperations` + * 2018-08-01: :class:`ApplicationGatewaysOperations` + * 2018-10-01: :class:`ApplicationGatewaysOperations` + * 2018-11-01: :class:`ApplicationGatewaysOperations` + * 2018-12-01: :class:`ApplicationGatewaysOperations` + * 2019-02-01: :class:`ApplicationGatewaysOperations` + * 2019-04-01: :class:`ApplicationGatewaysOperations` + * 2019-06-01: :class:`ApplicationGatewaysOperations` + * 2019-07-01: :class:`ApplicationGatewaysOperations` + * 2019-08-01: :class:`ApplicationGatewaysOperations` + * 2019-09-01: :class:`ApplicationGatewaysOperations` + * 2019-11-01: :class:`ApplicationGatewaysOperations` + * 2019-12-01: :class:`ApplicationGatewaysOperations` + * 2020-03-01: :class:`ApplicationGatewaysOperations` + * 2020-04-01: :class:`ApplicationGatewaysOperations` + * 2020-05-01: :class:`ApplicationGatewaysOperations` + * 2020-06-01: :class:`ApplicationGatewaysOperations` + * 2020-07-01: :class:`ApplicationGatewaysOperations` + * 2020-08-01: :class:`ApplicationGatewaysOperations` + * 2020-11-01: :class:`ApplicationGatewaysOperations` + * 2021-02-01: :class:`ApplicationGatewaysOperations` + * 2021-05-01: :class:`ApplicationGatewaysOperations` + * 2021-08-01: :class:`ApplicationGatewaysOperations` + """ + api_version = self._get_api_version('application_gateways') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ApplicationGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def application_security_groups(self): + """Instance depends on the API version: + + * 2017-10-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-01-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-10-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2018-12-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-09-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2019-12-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-03-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-04-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-05-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-06-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-07-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-08-01: :class:`ApplicationSecurityGroupsOperations` + * 2020-11-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-02-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-05-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-08-01: :class:`ApplicationSecurityGroupsOperations` + """ + api_version = self._get_api_version('application_security_groups') + if api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'application_security_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_delegations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AvailableDelegationsOperations` + * 2018-10-01: :class:`AvailableDelegationsOperations` + * 2018-11-01: :class:`AvailableDelegationsOperations` + * 2018-12-01: :class:`AvailableDelegationsOperations` + * 2019-02-01: :class:`AvailableDelegationsOperations` + * 2019-04-01: :class:`AvailableDelegationsOperations` + * 2019-06-01: :class:`AvailableDelegationsOperations` + * 2019-07-01: :class:`AvailableDelegationsOperations` + * 2019-08-01: :class:`AvailableDelegationsOperations` + * 2019-09-01: :class:`AvailableDelegationsOperations` + * 2019-11-01: :class:`AvailableDelegationsOperations` + * 2019-12-01: :class:`AvailableDelegationsOperations` + * 2020-03-01: :class:`AvailableDelegationsOperations` + * 2020-04-01: :class:`AvailableDelegationsOperations` + * 2020-05-01: :class:`AvailableDelegationsOperations` + * 2020-06-01: :class:`AvailableDelegationsOperations` + * 2020-07-01: :class:`AvailableDelegationsOperations` + * 2020-08-01: :class:`AvailableDelegationsOperations` + * 2020-11-01: :class:`AvailableDelegationsOperations` + * 2021-02-01: :class:`AvailableDelegationsOperations` + * 2021-05-01: :class:`AvailableDelegationsOperations` + * 2021-08-01: :class:`AvailableDelegationsOperations` + """ + api_version = self._get_api_version('available_delegations') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import AvailableDelegationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_delegations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_endpoint_services(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`AvailableEndpointServicesOperations` + * 2017-10-01: :class:`AvailableEndpointServicesOperations` + * 2018-01-01: :class:`AvailableEndpointServicesOperations` + * 2018-02-01: :class:`AvailableEndpointServicesOperations` + * 2018-04-01: :class:`AvailableEndpointServicesOperations` + * 2018-06-01: :class:`AvailableEndpointServicesOperations` + * 2018-07-01: :class:`AvailableEndpointServicesOperations` + * 2018-08-01: :class:`AvailableEndpointServicesOperations` + * 2018-10-01: :class:`AvailableEndpointServicesOperations` + * 2018-11-01: :class:`AvailableEndpointServicesOperations` + * 2018-12-01: :class:`AvailableEndpointServicesOperations` + * 2019-02-01: :class:`AvailableEndpointServicesOperations` + * 2019-04-01: :class:`AvailableEndpointServicesOperations` + * 2019-06-01: :class:`AvailableEndpointServicesOperations` + * 2019-07-01: :class:`AvailableEndpointServicesOperations` + * 2019-08-01: :class:`AvailableEndpointServicesOperations` + * 2019-09-01: :class:`AvailableEndpointServicesOperations` + * 2019-11-01: :class:`AvailableEndpointServicesOperations` + * 2019-12-01: :class:`AvailableEndpointServicesOperations` + * 2020-03-01: :class:`AvailableEndpointServicesOperations` + * 2020-04-01: :class:`AvailableEndpointServicesOperations` + * 2020-05-01: :class:`AvailableEndpointServicesOperations` + * 2020-06-01: :class:`AvailableEndpointServicesOperations` + * 2020-07-01: :class:`AvailableEndpointServicesOperations` + * 2020-08-01: :class:`AvailableEndpointServicesOperations` + * 2020-11-01: :class:`AvailableEndpointServicesOperations` + * 2021-02-01: :class:`AvailableEndpointServicesOperations` + * 2021-05-01: :class:`AvailableEndpointServicesOperations` + * 2021-08-01: :class:`AvailableEndpointServicesOperations` + """ + api_version = self._get_api_version('available_endpoint_services') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_endpoint_services'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_private_endpoint_types(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-06-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-07-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-08-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-09-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-11-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2019-12-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-03-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-04-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-05-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-06-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-07-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-08-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2020-11-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-02-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-05-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-08-01: :class:`AvailablePrivateEndpointTypesOperations` + """ + api_version = self._get_api_version('available_private_endpoint_types') + if api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_private_endpoint_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_resource_group_delegations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-10-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2018-12-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-02-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-04-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-06-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-07-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-09-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2019-12-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-03-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-04-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-05-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-06-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-07-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-08-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2020-11-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-02-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-05-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-08-01: :class:`AvailableResourceGroupDelegationsOperations` + """ + api_version = self._get_api_version('available_resource_group_delegations') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_resource_group_delegations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def available_service_aliases(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`AvailableServiceAliasesOperations` + * 2019-09-01: :class:`AvailableServiceAliasesOperations` + * 2019-11-01: :class:`AvailableServiceAliasesOperations` + * 2019-12-01: :class:`AvailableServiceAliasesOperations` + * 2020-03-01: :class:`AvailableServiceAliasesOperations` + * 2020-04-01: :class:`AvailableServiceAliasesOperations` + * 2020-05-01: :class:`AvailableServiceAliasesOperations` + * 2020-06-01: :class:`AvailableServiceAliasesOperations` + * 2020-07-01: :class:`AvailableServiceAliasesOperations` + * 2020-08-01: :class:`AvailableServiceAliasesOperations` + * 2020-11-01: :class:`AvailableServiceAliasesOperations` + * 2021-02-01: :class:`AvailableServiceAliasesOperations` + * 2021-05-01: :class:`AvailableServiceAliasesOperations` + * 2021-08-01: :class:`AvailableServiceAliasesOperations` + """ + api_version = self._get_api_version('available_service_aliases') + if api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'available_service_aliases'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def azure_firewall_fqdn_tags(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-10-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2018-12-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-02-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-04-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-06-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-07-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-09-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2019-12-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-03-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-04-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-05-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-06-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-07-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-08-01: :class:`AzureFirewallFqdnTagsOperations` + * 2020-11-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-02-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-05-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-08-01: :class:`AzureFirewallFqdnTagsOperations` + """ + api_version = self._get_api_version('azure_firewall_fqdn_tags') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'azure_firewall_fqdn_tags'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def azure_firewalls(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`AzureFirewallsOperations` + * 2018-06-01: :class:`AzureFirewallsOperations` + * 2018-07-01: :class:`AzureFirewallsOperations` + * 2018-08-01: :class:`AzureFirewallsOperations` + * 2018-10-01: :class:`AzureFirewallsOperations` + * 2018-11-01: :class:`AzureFirewallsOperations` + * 2018-12-01: :class:`AzureFirewallsOperations` + * 2019-02-01: :class:`AzureFirewallsOperations` + * 2019-04-01: :class:`AzureFirewallsOperations` + * 2019-06-01: :class:`AzureFirewallsOperations` + * 2019-07-01: :class:`AzureFirewallsOperations` + * 2019-08-01: :class:`AzureFirewallsOperations` + * 2019-09-01: :class:`AzureFirewallsOperations` + * 2019-11-01: :class:`AzureFirewallsOperations` + * 2019-12-01: :class:`AzureFirewallsOperations` + * 2020-03-01: :class:`AzureFirewallsOperations` + * 2020-04-01: :class:`AzureFirewallsOperations` + * 2020-05-01: :class:`AzureFirewallsOperations` + * 2020-06-01: :class:`AzureFirewallsOperations` + * 2020-07-01: :class:`AzureFirewallsOperations` + * 2020-08-01: :class:`AzureFirewallsOperations` + * 2020-11-01: :class:`AzureFirewallsOperations` + * 2021-02-01: :class:`AzureFirewallsOperations` + * 2021-05-01: :class:`AzureFirewallsOperations` + * 2021-08-01: :class:`AzureFirewallsOperations` + """ + api_version = self._get_api_version('azure_firewalls') + if api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import AzureFirewallsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'azure_firewalls'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def bastion_hosts(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`BastionHostsOperations` + * 2019-06-01: :class:`BastionHostsOperations` + * 2019-07-01: :class:`BastionHostsOperations` + * 2019-08-01: :class:`BastionHostsOperations` + * 2019-09-01: :class:`BastionHostsOperations` + * 2019-11-01: :class:`BastionHostsOperations` + * 2019-12-01: :class:`BastionHostsOperations` + * 2020-03-01: :class:`BastionHostsOperations` + * 2020-04-01: :class:`BastionHostsOperations` + * 2020-05-01: :class:`BastionHostsOperations` + * 2020-06-01: :class:`BastionHostsOperations` + * 2020-07-01: :class:`BastionHostsOperations` + * 2020-08-01: :class:`BastionHostsOperations` + * 2020-11-01: :class:`BastionHostsOperations` + * 2021-02-01: :class:`BastionHostsOperations` + * 2021-05-01: :class:`BastionHostsOperations` + * 2021-08-01: :class:`BastionHostsOperations` + """ + api_version = self._get_api_version('bastion_hosts') + if api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import BastionHostsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'bastion_hosts'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def bgp_service_communities(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`BgpServiceCommunitiesOperations` + * 2017-03-01: :class:`BgpServiceCommunitiesOperations` + * 2017-06-01: :class:`BgpServiceCommunitiesOperations` + * 2017-10-01: :class:`BgpServiceCommunitiesOperations` + * 2018-01-01: :class:`BgpServiceCommunitiesOperations` + * 2018-02-01: :class:`BgpServiceCommunitiesOperations` + * 2018-04-01: :class:`BgpServiceCommunitiesOperations` + * 2018-06-01: :class:`BgpServiceCommunitiesOperations` + * 2018-07-01: :class:`BgpServiceCommunitiesOperations` + * 2018-08-01: :class:`BgpServiceCommunitiesOperations` + * 2018-10-01: :class:`BgpServiceCommunitiesOperations` + * 2018-11-01: :class:`BgpServiceCommunitiesOperations` + * 2018-12-01: :class:`BgpServiceCommunitiesOperations` + * 2019-02-01: :class:`BgpServiceCommunitiesOperations` + * 2019-04-01: :class:`BgpServiceCommunitiesOperations` + * 2019-06-01: :class:`BgpServiceCommunitiesOperations` + * 2019-07-01: :class:`BgpServiceCommunitiesOperations` + * 2019-08-01: :class:`BgpServiceCommunitiesOperations` + * 2019-09-01: :class:`BgpServiceCommunitiesOperations` + * 2019-11-01: :class:`BgpServiceCommunitiesOperations` + * 2019-12-01: :class:`BgpServiceCommunitiesOperations` + * 2020-03-01: :class:`BgpServiceCommunitiesOperations` + * 2020-04-01: :class:`BgpServiceCommunitiesOperations` + * 2020-05-01: :class:`BgpServiceCommunitiesOperations` + * 2020-06-01: :class:`BgpServiceCommunitiesOperations` + * 2020-07-01: :class:`BgpServiceCommunitiesOperations` + * 2020-08-01: :class:`BgpServiceCommunitiesOperations` + * 2020-11-01: :class:`BgpServiceCommunitiesOperations` + * 2021-02-01: :class:`BgpServiceCommunitiesOperations` + * 2021-05-01: :class:`BgpServiceCommunitiesOperations` + * 2021-08-01: :class:`BgpServiceCommunitiesOperations` + """ + api_version = self._get_api_version('bgp_service_communities') + if api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'bgp_service_communities'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def configuration_policy_groups(self): + """Instance depends on the API version: + + * 2021-08-01: :class:`ConfigurationPolicyGroupsOperations` + """ + api_version = self._get_api_version('configuration_policy_groups') + if api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ConfigurationPolicyGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'configuration_policy_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def connection_monitors(self): + """Instance depends on the API version: + + * 2017-10-01: :class:`ConnectionMonitorsOperations` + * 2018-01-01: :class:`ConnectionMonitorsOperations` + * 2018-02-01: :class:`ConnectionMonitorsOperations` + * 2018-04-01: :class:`ConnectionMonitorsOperations` + * 2018-06-01: :class:`ConnectionMonitorsOperations` + * 2018-07-01: :class:`ConnectionMonitorsOperations` + * 2018-08-01: :class:`ConnectionMonitorsOperations` + * 2018-10-01: :class:`ConnectionMonitorsOperations` + * 2018-11-01: :class:`ConnectionMonitorsOperations` + * 2018-12-01: :class:`ConnectionMonitorsOperations` + * 2019-02-01: :class:`ConnectionMonitorsOperations` + * 2019-04-01: :class:`ConnectionMonitorsOperations` + * 2019-06-01: :class:`ConnectionMonitorsOperations` + * 2019-07-01: :class:`ConnectionMonitorsOperations` + * 2019-08-01: :class:`ConnectionMonitorsOperations` + * 2019-09-01: :class:`ConnectionMonitorsOperations` + * 2019-11-01: :class:`ConnectionMonitorsOperations` + * 2019-12-01: :class:`ConnectionMonitorsOperations` + * 2020-03-01: :class:`ConnectionMonitorsOperations` + * 2020-04-01: :class:`ConnectionMonitorsOperations` + * 2020-05-01: :class:`ConnectionMonitorsOperations` + * 2020-06-01: :class:`ConnectionMonitorsOperations` + * 2020-07-01: :class:`ConnectionMonitorsOperations` + * 2020-08-01: :class:`ConnectionMonitorsOperations` + * 2020-11-01: :class:`ConnectionMonitorsOperations` + * 2021-02-01: :class:`ConnectionMonitorsOperations` + * 2021-05-01: :class:`ConnectionMonitorsOperations` + * 2021-08-01: :class:`ConnectionMonitorsOperations` + """ + api_version = self._get_api_version('connection_monitors') + if api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ConnectionMonitorsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connection_monitors'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def custom_ip_prefixes(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`CustomIPPrefixesOperations` + * 2020-07-01: :class:`CustomIPPrefixesOperations` + * 2020-08-01: :class:`CustomIPPrefixesOperations` + * 2020-11-01: :class:`CustomIPPrefixesOperations` + * 2021-02-01: :class:`CustomIPPrefixesOperations` + * 2021-05-01: :class:`CustomIPPrefixesOperations` + * 2021-08-01: :class:`CustomIPPrefixesOperations` + """ + api_version = self._get_api_version('custom_ip_prefixes') + if api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import CustomIPPrefixesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'custom_ip_prefixes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ddos_custom_policies(self): + """Instance depends on the API version: + + * 2018-11-01: :class:`DdosCustomPoliciesOperations` + * 2018-12-01: :class:`DdosCustomPoliciesOperations` + * 2019-02-01: :class:`DdosCustomPoliciesOperations` + * 2019-04-01: :class:`DdosCustomPoliciesOperations` + * 2019-06-01: :class:`DdosCustomPoliciesOperations` + * 2019-07-01: :class:`DdosCustomPoliciesOperations` + * 2019-08-01: :class:`DdosCustomPoliciesOperations` + * 2019-09-01: :class:`DdosCustomPoliciesOperations` + * 2019-11-01: :class:`DdosCustomPoliciesOperations` + * 2019-12-01: :class:`DdosCustomPoliciesOperations` + * 2020-03-01: :class:`DdosCustomPoliciesOperations` + * 2020-04-01: :class:`DdosCustomPoliciesOperations` + * 2020-05-01: :class:`DdosCustomPoliciesOperations` + * 2020-06-01: :class:`DdosCustomPoliciesOperations` + * 2020-07-01: :class:`DdosCustomPoliciesOperations` + * 2020-08-01: :class:`DdosCustomPoliciesOperations` + * 2020-11-01: :class:`DdosCustomPoliciesOperations` + * 2021-02-01: :class:`DdosCustomPoliciesOperations` + * 2021-05-01: :class:`DdosCustomPoliciesOperations` + * 2021-08-01: :class:`DdosCustomPoliciesOperations` + """ + api_version = self._get_api_version('ddos_custom_policies') + if api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ddos_custom_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ddos_protection_plans(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`DdosProtectionPlansOperations` + * 2018-04-01: :class:`DdosProtectionPlansOperations` + * 2018-06-01: :class:`DdosProtectionPlansOperations` + * 2018-07-01: :class:`DdosProtectionPlansOperations` + * 2018-08-01: :class:`DdosProtectionPlansOperations` + * 2018-10-01: :class:`DdosProtectionPlansOperations` + * 2018-11-01: :class:`DdosProtectionPlansOperations` + * 2018-12-01: :class:`DdosProtectionPlansOperations` + * 2019-02-01: :class:`DdosProtectionPlansOperations` + * 2019-04-01: :class:`DdosProtectionPlansOperations` + * 2019-06-01: :class:`DdosProtectionPlansOperations` + * 2019-07-01: :class:`DdosProtectionPlansOperations` + * 2019-08-01: :class:`DdosProtectionPlansOperations` + * 2019-09-01: :class:`DdosProtectionPlansOperations` + * 2019-11-01: :class:`DdosProtectionPlansOperations` + * 2019-12-01: :class:`DdosProtectionPlansOperations` + * 2020-03-01: :class:`DdosProtectionPlansOperations` + * 2020-04-01: :class:`DdosProtectionPlansOperations` + * 2020-05-01: :class:`DdosProtectionPlansOperations` + * 2020-06-01: :class:`DdosProtectionPlansOperations` + * 2020-07-01: :class:`DdosProtectionPlansOperations` + * 2020-08-01: :class:`DdosProtectionPlansOperations` + * 2020-11-01: :class:`DdosProtectionPlansOperations` + * 2021-02-01: :class:`DdosProtectionPlansOperations` + * 2021-05-01: :class:`DdosProtectionPlansOperations` + * 2021-08-01: :class:`DdosProtectionPlansOperations` + """ + api_version = self._get_api_version('ddos_protection_plans') + if api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import DdosProtectionPlansOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ddos_protection_plans'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def default_security_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`DefaultSecurityRulesOperations` + * 2017-10-01: :class:`DefaultSecurityRulesOperations` + * 2018-01-01: :class:`DefaultSecurityRulesOperations` + * 2018-02-01: :class:`DefaultSecurityRulesOperations` + * 2018-04-01: :class:`DefaultSecurityRulesOperations` + * 2018-06-01: :class:`DefaultSecurityRulesOperations` + * 2018-07-01: :class:`DefaultSecurityRulesOperations` + * 2018-08-01: :class:`DefaultSecurityRulesOperations` + * 2018-10-01: :class:`DefaultSecurityRulesOperations` + * 2018-11-01: :class:`DefaultSecurityRulesOperations` + * 2018-12-01: :class:`DefaultSecurityRulesOperations` + * 2019-02-01: :class:`DefaultSecurityRulesOperations` + * 2019-04-01: :class:`DefaultSecurityRulesOperations` + * 2019-06-01: :class:`DefaultSecurityRulesOperations` + * 2019-07-01: :class:`DefaultSecurityRulesOperations` + * 2019-08-01: :class:`DefaultSecurityRulesOperations` + * 2019-09-01: :class:`DefaultSecurityRulesOperations` + * 2019-11-01: :class:`DefaultSecurityRulesOperations` + * 2019-12-01: :class:`DefaultSecurityRulesOperations` + * 2020-03-01: :class:`DefaultSecurityRulesOperations` + * 2020-04-01: :class:`DefaultSecurityRulesOperations` + * 2020-05-01: :class:`DefaultSecurityRulesOperations` + * 2020-06-01: :class:`DefaultSecurityRulesOperations` + * 2020-07-01: :class:`DefaultSecurityRulesOperations` + * 2020-08-01: :class:`DefaultSecurityRulesOperations` + * 2020-11-01: :class:`DefaultSecurityRulesOperations` + * 2021-02-01: :class:`DefaultSecurityRulesOperations` + * 2021-05-01: :class:`DefaultSecurityRulesOperations` + * 2021-08-01: :class:`DefaultSecurityRulesOperations` + """ + api_version = self._get_api_version('default_security_rules') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'default_security_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def dscp_configuration(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`DscpConfigurationOperations` + * 2020-07-01: :class:`DscpConfigurationOperations` + * 2020-08-01: :class:`DscpConfigurationOperations` + * 2020-11-01: :class:`DscpConfigurationOperations` + * 2021-02-01: :class:`DscpConfigurationOperations` + * 2021-05-01: :class:`DscpConfigurationOperations` + * 2021-08-01: :class:`DscpConfigurationOperations` + """ + api_version = self._get_api_version('dscp_configuration') + if api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import DscpConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'dscp_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('effective_connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import EffectiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_virtual_networks(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveVirtualNetworksOperations` + """ + api_version = self._get_api_version('effective_virtual_networks') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import EffectiveVirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_authorizations(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + """ + api_version = self._get_api_version('express_route_circuit_authorizations') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_authorizations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_connections(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-08-01: :class:`ExpressRouteCircuitConnectionsOperations` + """ + api_version = self._get_api_version('express_route_circuit_connections') + if api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuit_peerings(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitPeeringsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-08-01: :class:`ExpressRouteCircuitPeeringsOperations` + """ + api_version = self._get_api_version('express_route_circuit_peerings') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuit_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_circuits(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteCircuitsOperations` + * 2016-09-01: :class:`ExpressRouteCircuitsOperations` + * 2016-12-01: :class:`ExpressRouteCircuitsOperations` + * 2017-03-01: :class:`ExpressRouteCircuitsOperations` + * 2017-06-01: :class:`ExpressRouteCircuitsOperations` + * 2017-10-01: :class:`ExpressRouteCircuitsOperations` + * 2018-01-01: :class:`ExpressRouteCircuitsOperations` + * 2018-02-01: :class:`ExpressRouteCircuitsOperations` + * 2018-04-01: :class:`ExpressRouteCircuitsOperations` + * 2018-06-01: :class:`ExpressRouteCircuitsOperations` + * 2018-07-01: :class:`ExpressRouteCircuitsOperations` + * 2018-08-01: :class:`ExpressRouteCircuitsOperations` + * 2018-10-01: :class:`ExpressRouteCircuitsOperations` + * 2018-11-01: :class:`ExpressRouteCircuitsOperations` + * 2018-12-01: :class:`ExpressRouteCircuitsOperations` + * 2019-02-01: :class:`ExpressRouteCircuitsOperations` + * 2019-04-01: :class:`ExpressRouteCircuitsOperations` + * 2019-06-01: :class:`ExpressRouteCircuitsOperations` + * 2019-07-01: :class:`ExpressRouteCircuitsOperations` + * 2019-08-01: :class:`ExpressRouteCircuitsOperations` + * 2019-09-01: :class:`ExpressRouteCircuitsOperations` + * 2019-11-01: :class:`ExpressRouteCircuitsOperations` + * 2019-12-01: :class:`ExpressRouteCircuitsOperations` + * 2020-03-01: :class:`ExpressRouteCircuitsOperations` + * 2020-04-01: :class:`ExpressRouteCircuitsOperations` + * 2020-05-01: :class:`ExpressRouteCircuitsOperations` + * 2020-06-01: :class:`ExpressRouteCircuitsOperations` + * 2020-07-01: :class:`ExpressRouteCircuitsOperations` + * 2020-08-01: :class:`ExpressRouteCircuitsOperations` + * 2020-11-01: :class:`ExpressRouteCircuitsOperations` + * 2021-02-01: :class:`ExpressRouteCircuitsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitsOperations` + * 2021-08-01: :class:`ExpressRouteCircuitsOperations` + """ + api_version = self._get_api_version('express_route_circuits') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_circuits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_connections(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteConnectionsOperations` + * 2021-08-01: :class:`ExpressRouteConnectionsOperations` + """ + api_version = self._get_api_version('express_route_connections') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_cross_connection_peerings(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-10-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2018-12-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-09-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2019-12-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-03-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-04-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-05-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-06-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-07-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2020-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-05-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + """ + api_version = self._get_api_version('express_route_cross_connection_peerings') + if api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_cross_connection_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_cross_connections(self): + """Instance depends on the API version: + + * 2018-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-10-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2018-12-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-09-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2019-12-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-03-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-04-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-05-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-06-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-07-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-08-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2020-11-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-02-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-08-01: :class:`ExpressRouteCrossConnectionsOperations` + """ + api_version = self._get_api_version('express_route_cross_connections') + if api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_cross_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_gateways(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteGatewaysOperations` + * 2018-10-01: :class:`ExpressRouteGatewaysOperations` + * 2018-11-01: :class:`ExpressRouteGatewaysOperations` + * 2018-12-01: :class:`ExpressRouteGatewaysOperations` + * 2019-02-01: :class:`ExpressRouteGatewaysOperations` + * 2019-04-01: :class:`ExpressRouteGatewaysOperations` + * 2019-06-01: :class:`ExpressRouteGatewaysOperations` + * 2019-07-01: :class:`ExpressRouteGatewaysOperations` + * 2019-08-01: :class:`ExpressRouteGatewaysOperations` + * 2019-09-01: :class:`ExpressRouteGatewaysOperations` + * 2019-11-01: :class:`ExpressRouteGatewaysOperations` + * 2019-12-01: :class:`ExpressRouteGatewaysOperations` + * 2020-03-01: :class:`ExpressRouteGatewaysOperations` + * 2020-04-01: :class:`ExpressRouteGatewaysOperations` + * 2020-05-01: :class:`ExpressRouteGatewaysOperations` + * 2020-06-01: :class:`ExpressRouteGatewaysOperations` + * 2020-07-01: :class:`ExpressRouteGatewaysOperations` + * 2020-08-01: :class:`ExpressRouteGatewaysOperations` + * 2020-11-01: :class:`ExpressRouteGatewaysOperations` + * 2021-02-01: :class:`ExpressRouteGatewaysOperations` + * 2021-05-01: :class:`ExpressRouteGatewaysOperations` + * 2021-08-01: :class:`ExpressRouteGatewaysOperations` + """ + api_version = self._get_api_version('express_route_gateways') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_links(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRouteLinksOperations` + * 2018-10-01: :class:`ExpressRouteLinksOperations` + * 2018-11-01: :class:`ExpressRouteLinksOperations` + * 2018-12-01: :class:`ExpressRouteLinksOperations` + * 2019-02-01: :class:`ExpressRouteLinksOperations` + * 2019-04-01: :class:`ExpressRouteLinksOperations` + * 2019-06-01: :class:`ExpressRouteLinksOperations` + * 2019-07-01: :class:`ExpressRouteLinksOperations` + * 2019-08-01: :class:`ExpressRouteLinksOperations` + * 2019-09-01: :class:`ExpressRouteLinksOperations` + * 2019-11-01: :class:`ExpressRouteLinksOperations` + * 2019-12-01: :class:`ExpressRouteLinksOperations` + * 2020-03-01: :class:`ExpressRouteLinksOperations` + * 2020-04-01: :class:`ExpressRouteLinksOperations` + * 2020-05-01: :class:`ExpressRouteLinksOperations` + * 2020-06-01: :class:`ExpressRouteLinksOperations` + * 2020-07-01: :class:`ExpressRouteLinksOperations` + * 2020-08-01: :class:`ExpressRouteLinksOperations` + * 2020-11-01: :class:`ExpressRouteLinksOperations` + * 2021-02-01: :class:`ExpressRouteLinksOperations` + * 2021-05-01: :class:`ExpressRouteLinksOperations` + * 2021-08-01: :class:`ExpressRouteLinksOperations` + """ + api_version = self._get_api_version('express_route_links') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_port_authorizations(self): + """Instance depends on the API version: + + * 2021-08-01: :class:`ExpressRoutePortAuthorizationsOperations` + """ + api_version = self._get_api_version('express_route_port_authorizations') + if api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRoutePortAuthorizationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_port_authorizations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_ports(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRoutePortsOperations` + * 2018-10-01: :class:`ExpressRoutePortsOperations` + * 2018-11-01: :class:`ExpressRoutePortsOperations` + * 2018-12-01: :class:`ExpressRoutePortsOperations` + * 2019-02-01: :class:`ExpressRoutePortsOperations` + * 2019-04-01: :class:`ExpressRoutePortsOperations` + * 2019-06-01: :class:`ExpressRoutePortsOperations` + * 2019-07-01: :class:`ExpressRoutePortsOperations` + * 2019-08-01: :class:`ExpressRoutePortsOperations` + * 2019-09-01: :class:`ExpressRoutePortsOperations` + * 2019-11-01: :class:`ExpressRoutePortsOperations` + * 2019-12-01: :class:`ExpressRoutePortsOperations` + * 2020-03-01: :class:`ExpressRoutePortsOperations` + * 2020-04-01: :class:`ExpressRoutePortsOperations` + * 2020-05-01: :class:`ExpressRoutePortsOperations` + * 2020-06-01: :class:`ExpressRoutePortsOperations` + * 2020-07-01: :class:`ExpressRoutePortsOperations` + * 2020-08-01: :class:`ExpressRoutePortsOperations` + * 2020-11-01: :class:`ExpressRoutePortsOperations` + * 2021-02-01: :class:`ExpressRoutePortsOperations` + * 2021-05-01: :class:`ExpressRoutePortsOperations` + * 2021-08-01: :class:`ExpressRoutePortsOperations` + """ + api_version = self._get_api_version('express_route_ports') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRoutePortsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_ports'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_ports_locations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-10-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2018-12-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-02-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-04-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-06-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-07-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-09-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2019-12-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-03-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-04-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-05-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-06-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-07-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-08-01: :class:`ExpressRoutePortsLocationsOperations` + * 2020-11-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-02-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-05-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-08-01: :class:`ExpressRoutePortsLocationsOperations` + """ + api_version = self._get_api_version('express_route_ports_locations') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_ports_locations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def express_route_service_providers(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`ExpressRouteServiceProvidersOperations` + * 2016-09-01: :class:`ExpressRouteServiceProvidersOperations` + * 2016-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-03-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2017-10-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-01-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-10-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2018-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-09-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2019-12-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-03-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-04-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-05-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-06-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-07-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-08-01: :class:`ExpressRouteServiceProvidersOperations` + * 2020-11-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-02-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-05-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-08-01: :class:`ExpressRouteServiceProvidersOperations` + """ + api_version = self._get_api_version('express_route_service_providers') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'express_route_service_providers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policies(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`FirewallPoliciesOperations` + * 2019-07-01: :class:`FirewallPoliciesOperations` + * 2019-08-01: :class:`FirewallPoliciesOperations` + * 2019-09-01: :class:`FirewallPoliciesOperations` + * 2019-11-01: :class:`FirewallPoliciesOperations` + * 2019-12-01: :class:`FirewallPoliciesOperations` + * 2020-03-01: :class:`FirewallPoliciesOperations` + * 2020-04-01: :class:`FirewallPoliciesOperations` + * 2020-05-01: :class:`FirewallPoliciesOperations` + * 2020-06-01: :class:`FirewallPoliciesOperations` + * 2020-07-01: :class:`FirewallPoliciesOperations` + * 2020-08-01: :class:`FirewallPoliciesOperations` + * 2020-11-01: :class:`FirewallPoliciesOperations` + * 2021-02-01: :class:`FirewallPoliciesOperations` + * 2021-05-01: :class:`FirewallPoliciesOperations` + * 2021-08-01: :class:`FirewallPoliciesOperations` + """ + api_version = self._get_api_version('firewall_policies') + if api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import FirewallPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesOperations` + * 2021-08-01: :class:`FirewallPolicyIdpsSignaturesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPolicyIdpsSignaturesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import FirewallPolicyIdpsSignaturesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures_filter_values(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesFilterValuesOperations` + * 2021-08-01: :class:`FirewallPolicyIdpsSignaturesFilterValuesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures_filter_values') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPolicyIdpsSignaturesFilterValuesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import FirewallPolicyIdpsSignaturesFilterValuesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures_filter_values'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures_overrides(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesOverridesOperations` + * 2021-08-01: :class:`FirewallPolicyIdpsSignaturesOverridesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures_overrides') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPolicyIdpsSignaturesOverridesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import FirewallPolicyIdpsSignaturesOverridesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures_overrides'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_rule_collection_groups(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-06-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-07-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-08-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2020-11-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-02-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-05-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-08-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + """ + api_version = self._get_api_version('firewall_policy_rule_collection_groups') + if api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_rule_collection_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_rule_groups(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-07-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-08-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-09-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-11-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2019-12-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2020-03-01: :class:`FirewallPolicyRuleGroupsOperations` + * 2020-04-01: :class:`FirewallPolicyRuleGroupsOperations` + """ + api_version = self._get_api_version('firewall_policy_rule_groups') + if api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import FirewallPolicyRuleGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import FirewallPolicyRuleGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_rule_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def flow_logs(self): + """Instance depends on the API version: + + * 2019-11-01: :class:`FlowLogsOperations` + * 2019-12-01: :class:`FlowLogsOperations` + * 2020-03-01: :class:`FlowLogsOperations` + * 2020-04-01: :class:`FlowLogsOperations` + * 2020-05-01: :class:`FlowLogsOperations` + * 2020-06-01: :class:`FlowLogsOperations` + * 2020-07-01: :class:`FlowLogsOperations` + * 2020-08-01: :class:`FlowLogsOperations` + * 2020-11-01: :class:`FlowLogsOperations` + * 2021-02-01: :class:`FlowLogsOperations` + * 2021-05-01: :class:`FlowLogsOperations` + * 2021-08-01: :class:`FlowLogsOperations` + """ + api_version = self._get_api_version('flow_logs') + if api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import FlowLogsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'flow_logs'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def hub_route_tables(self): + """Instance depends on the API version: + + * 2020-04-01: :class:`HubRouteTablesOperations` + * 2020-05-01: :class:`HubRouteTablesOperations` + * 2020-06-01: :class:`HubRouteTablesOperations` + * 2020-07-01: :class:`HubRouteTablesOperations` + * 2020-08-01: :class:`HubRouteTablesOperations` + * 2020-11-01: :class:`HubRouteTablesOperations` + * 2021-02-01: :class:`HubRouteTablesOperations` + * 2021-05-01: :class:`HubRouteTablesOperations` + * 2021-08-01: :class:`HubRouteTablesOperations` + """ + api_version = self._get_api_version('hub_route_tables') + if api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import HubRouteTablesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'hub_route_tables'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def hub_virtual_network_connections(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-10-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2018-12-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-02-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-09-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2019-12-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-03-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-04-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-05-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-06-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-07-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-08-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2020-11-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-02-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-05-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-08-01: :class:`HubVirtualNetworkConnectionsOperations` + """ + api_version = self._get_api_version('hub_virtual_network_connections') + if api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'hub_virtual_network_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def inbound_nat_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`InboundNatRulesOperations` + * 2017-10-01: :class:`InboundNatRulesOperations` + * 2018-01-01: :class:`InboundNatRulesOperations` + * 2018-02-01: :class:`InboundNatRulesOperations` + * 2018-04-01: :class:`InboundNatRulesOperations` + * 2018-06-01: :class:`InboundNatRulesOperations` + * 2018-07-01: :class:`InboundNatRulesOperations` + * 2018-08-01: :class:`InboundNatRulesOperations` + * 2018-10-01: :class:`InboundNatRulesOperations` + * 2018-11-01: :class:`InboundNatRulesOperations` + * 2018-12-01: :class:`InboundNatRulesOperations` + * 2019-02-01: :class:`InboundNatRulesOperations` + * 2019-04-01: :class:`InboundNatRulesOperations` + * 2019-06-01: :class:`InboundNatRulesOperations` + * 2019-07-01: :class:`InboundNatRulesOperations` + * 2019-08-01: :class:`InboundNatRulesOperations` + * 2019-09-01: :class:`InboundNatRulesOperations` + * 2019-11-01: :class:`InboundNatRulesOperations` + * 2019-12-01: :class:`InboundNatRulesOperations` + * 2020-03-01: :class:`InboundNatRulesOperations` + * 2020-04-01: :class:`InboundNatRulesOperations` + * 2020-05-01: :class:`InboundNatRulesOperations` + * 2020-06-01: :class:`InboundNatRulesOperations` + * 2020-07-01: :class:`InboundNatRulesOperations` + * 2020-08-01: :class:`InboundNatRulesOperations` + * 2020-11-01: :class:`InboundNatRulesOperations` + * 2021-02-01: :class:`InboundNatRulesOperations` + * 2021-05-01: :class:`InboundNatRulesOperations` + * 2021-08-01: :class:`InboundNatRulesOperations` + """ + api_version = self._get_api_version('inbound_nat_rules') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import InboundNatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'inbound_nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def inbound_security_rule(self): + """Instance depends on the API version: + + * 2020-06-01: :class:`InboundSecurityRuleOperations` + * 2020-07-01: :class:`InboundSecurityRuleOperations` + * 2020-08-01: :class:`InboundSecurityRuleOperations` + * 2020-11-01: :class:`InboundSecurityRuleOperations` + * 2021-02-01: :class:`InboundSecurityRuleOperations` + * 2021-05-01: :class:`InboundSecurityRuleOperations` + * 2021-08-01: :class:`InboundSecurityRuleOperations` + """ + api_version = self._get_api_version('inbound_security_rule') + if api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import InboundSecurityRuleOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'inbound_security_rule'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def interface_endpoints(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`InterfaceEndpointsOperations` + * 2018-10-01: :class:`InterfaceEndpointsOperations` + * 2018-11-01: :class:`InterfaceEndpointsOperations` + * 2018-12-01: :class:`InterfaceEndpointsOperations` + * 2019-02-01: :class:`InterfaceEndpointsOperations` + """ + api_version = self._get_api_version('interface_endpoints') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import InterfaceEndpointsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import InterfaceEndpointsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'interface_endpoints'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ip_allocations(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`IpAllocationsOperations` + * 2020-04-01: :class:`IpAllocationsOperations` + * 2020-05-01: :class:`IpAllocationsOperations` + * 2020-06-01: :class:`IpAllocationsOperations` + * 2020-07-01: :class:`IpAllocationsOperations` + * 2020-08-01: :class:`IpAllocationsOperations` + * 2020-11-01: :class:`IpAllocationsOperations` + * 2021-02-01: :class:`IpAllocationsOperations` + * 2021-05-01: :class:`IpAllocationsOperations` + * 2021-08-01: :class:`IpAllocationsOperations` + """ + api_version = self._get_api_version('ip_allocations') + if api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import IpAllocationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ip_allocations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def ip_groups(self): + """Instance depends on the API version: + + * 2019-09-01: :class:`IpGroupsOperations` + * 2019-11-01: :class:`IpGroupsOperations` + * 2019-12-01: :class:`IpGroupsOperations` + * 2020-03-01: :class:`IpGroupsOperations` + * 2020-04-01: :class:`IpGroupsOperations` + * 2020-05-01: :class:`IpGroupsOperations` + * 2020-06-01: :class:`IpGroupsOperations` + * 2020-07-01: :class:`IpGroupsOperations` + * 2020-08-01: :class:`IpGroupsOperations` + * 2020-11-01: :class:`IpGroupsOperations` + * 2021-02-01: :class:`IpGroupsOperations` + * 2021-05-01: :class:`IpGroupsOperations` + * 2021-08-01: :class:`IpGroupsOperations` + """ + api_version = self._get_api_version('ip_groups') + if api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import IpGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'ip_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_backend_address_pools(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2017-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-01-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2018-12-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-09-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2019-12-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-03-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-05-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-07-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2020-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-05-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` + """ + api_version = self._get_api_version('load_balancer_backend_address_pools') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_backend_address_pools'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_frontend_ip_configurations(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2017-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-01-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2018-12-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-09-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2019-12-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-03-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-05-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-07-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2020-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-05-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + """ + api_version = self._get_api_version('load_balancer_frontend_ip_configurations') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_frontend_ip_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_load_balancing_rules(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2017-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-01-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2018-12-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-09-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2019-12-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-03-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-05-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-07-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2020-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-05-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` + """ + api_version = self._get_api_version('load_balancer_load_balancing_rules') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_load_balancing_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_network_interfaces(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2017-10-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-01-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-10-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2018-12-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-09-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2019-12-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-03-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-04-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-05-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-06-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-07-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2020-11-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-02-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-05-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-08-01: :class:`LoadBalancerNetworkInterfacesOperations` + """ + api_version = self._get_api_version('load_balancer_network_interfaces') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_network_interfaces'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_outbound_rules(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-10-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2018-12-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-02-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-04-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-06-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-07-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-09-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2019-12-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-03-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-04-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-05-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-06-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-07-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-08-01: :class:`LoadBalancerOutboundRulesOperations` + * 2020-11-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-02-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-05-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-08-01: :class:`LoadBalancerOutboundRulesOperations` + """ + api_version = self._get_api_version('load_balancer_outbound_rules') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_outbound_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancer_probes(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`LoadBalancerProbesOperations` + * 2017-10-01: :class:`LoadBalancerProbesOperations` + * 2018-01-01: :class:`LoadBalancerProbesOperations` + * 2018-02-01: :class:`LoadBalancerProbesOperations` + * 2018-04-01: :class:`LoadBalancerProbesOperations` + * 2018-06-01: :class:`LoadBalancerProbesOperations` + * 2018-07-01: :class:`LoadBalancerProbesOperations` + * 2018-08-01: :class:`LoadBalancerProbesOperations` + * 2018-10-01: :class:`LoadBalancerProbesOperations` + * 2018-11-01: :class:`LoadBalancerProbesOperations` + * 2018-12-01: :class:`LoadBalancerProbesOperations` + * 2019-02-01: :class:`LoadBalancerProbesOperations` + * 2019-04-01: :class:`LoadBalancerProbesOperations` + * 2019-06-01: :class:`LoadBalancerProbesOperations` + * 2019-07-01: :class:`LoadBalancerProbesOperations` + * 2019-08-01: :class:`LoadBalancerProbesOperations` + * 2019-09-01: :class:`LoadBalancerProbesOperations` + * 2019-11-01: :class:`LoadBalancerProbesOperations` + * 2019-12-01: :class:`LoadBalancerProbesOperations` + * 2020-03-01: :class:`LoadBalancerProbesOperations` + * 2020-04-01: :class:`LoadBalancerProbesOperations` + * 2020-05-01: :class:`LoadBalancerProbesOperations` + * 2020-06-01: :class:`LoadBalancerProbesOperations` + * 2020-07-01: :class:`LoadBalancerProbesOperations` + * 2020-08-01: :class:`LoadBalancerProbesOperations` + * 2020-11-01: :class:`LoadBalancerProbesOperations` + * 2021-02-01: :class:`LoadBalancerProbesOperations` + * 2021-05-01: :class:`LoadBalancerProbesOperations` + * 2021-08-01: :class:`LoadBalancerProbesOperations` + """ + api_version = self._get_api_version('load_balancer_probes') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import LoadBalancerProbesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancer_probes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def load_balancers(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`LoadBalancersOperations` + * 2016-09-01: :class:`LoadBalancersOperations` + * 2016-12-01: :class:`LoadBalancersOperations` + * 2017-03-01: :class:`LoadBalancersOperations` + * 2017-06-01: :class:`LoadBalancersOperations` + * 2017-10-01: :class:`LoadBalancersOperations` + * 2018-01-01: :class:`LoadBalancersOperations` + * 2018-02-01: :class:`LoadBalancersOperations` + * 2018-04-01: :class:`LoadBalancersOperations` + * 2018-06-01: :class:`LoadBalancersOperations` + * 2018-07-01: :class:`LoadBalancersOperations` + * 2018-08-01: :class:`LoadBalancersOperations` + * 2018-10-01: :class:`LoadBalancersOperations` + * 2018-11-01: :class:`LoadBalancersOperations` + * 2018-12-01: :class:`LoadBalancersOperations` + * 2019-02-01: :class:`LoadBalancersOperations` + * 2019-04-01: :class:`LoadBalancersOperations` + * 2019-06-01: :class:`LoadBalancersOperations` + * 2019-07-01: :class:`LoadBalancersOperations` + * 2019-08-01: :class:`LoadBalancersOperations` + * 2019-09-01: :class:`LoadBalancersOperations` + * 2019-11-01: :class:`LoadBalancersOperations` + * 2019-12-01: :class:`LoadBalancersOperations` + * 2020-03-01: :class:`LoadBalancersOperations` + * 2020-04-01: :class:`LoadBalancersOperations` + * 2020-05-01: :class:`LoadBalancersOperations` + * 2020-06-01: :class:`LoadBalancersOperations` + * 2020-07-01: :class:`LoadBalancersOperations` + * 2020-08-01: :class:`LoadBalancersOperations` + * 2020-11-01: :class:`LoadBalancersOperations` + * 2021-02-01: :class:`LoadBalancersOperations` + * 2021-05-01: :class:`LoadBalancersOperations` + * 2021-08-01: :class:`LoadBalancersOperations` + """ + api_version = self._get_api_version('load_balancers') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import LoadBalancersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'load_balancers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def local_network_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`LocalNetworkGatewaysOperations` + * 2016-09-01: :class:`LocalNetworkGatewaysOperations` + * 2016-12-01: :class:`LocalNetworkGatewaysOperations` + * 2017-03-01: :class:`LocalNetworkGatewaysOperations` + * 2017-06-01: :class:`LocalNetworkGatewaysOperations` + * 2017-10-01: :class:`LocalNetworkGatewaysOperations` + * 2018-01-01: :class:`LocalNetworkGatewaysOperations` + * 2018-02-01: :class:`LocalNetworkGatewaysOperations` + * 2018-04-01: :class:`LocalNetworkGatewaysOperations` + * 2018-06-01: :class:`LocalNetworkGatewaysOperations` + * 2018-07-01: :class:`LocalNetworkGatewaysOperations` + * 2018-08-01: :class:`LocalNetworkGatewaysOperations` + * 2018-10-01: :class:`LocalNetworkGatewaysOperations` + * 2018-11-01: :class:`LocalNetworkGatewaysOperations` + * 2018-12-01: :class:`LocalNetworkGatewaysOperations` + * 2019-02-01: :class:`LocalNetworkGatewaysOperations` + * 2019-04-01: :class:`LocalNetworkGatewaysOperations` + * 2019-06-01: :class:`LocalNetworkGatewaysOperations` + * 2019-07-01: :class:`LocalNetworkGatewaysOperations` + * 2019-08-01: :class:`LocalNetworkGatewaysOperations` + * 2019-09-01: :class:`LocalNetworkGatewaysOperations` + * 2019-11-01: :class:`LocalNetworkGatewaysOperations` + * 2019-12-01: :class:`LocalNetworkGatewaysOperations` + * 2020-03-01: :class:`LocalNetworkGatewaysOperations` + * 2020-04-01: :class:`LocalNetworkGatewaysOperations` + * 2020-05-01: :class:`LocalNetworkGatewaysOperations` + * 2020-06-01: :class:`LocalNetworkGatewaysOperations` + * 2020-07-01: :class:`LocalNetworkGatewaysOperations` + * 2020-08-01: :class:`LocalNetworkGatewaysOperations` + * 2020-11-01: :class:`LocalNetworkGatewaysOperations` + * 2021-02-01: :class:`LocalNetworkGatewaysOperations` + * 2021-05-01: :class:`LocalNetworkGatewaysOperations` + * 2021-08-01: :class:`LocalNetworkGatewaysOperations` + """ + api_version = self._get_api_version('local_network_gateways') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'local_network_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nat_gateways(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`NatGatewaysOperations` + * 2019-04-01: :class:`NatGatewaysOperations` + * 2019-06-01: :class:`NatGatewaysOperations` + * 2019-07-01: :class:`NatGatewaysOperations` + * 2019-08-01: :class:`NatGatewaysOperations` + * 2019-09-01: :class:`NatGatewaysOperations` + * 2019-11-01: :class:`NatGatewaysOperations` + * 2019-12-01: :class:`NatGatewaysOperations` + * 2020-03-01: :class:`NatGatewaysOperations` + * 2020-04-01: :class:`NatGatewaysOperations` + * 2020-05-01: :class:`NatGatewaysOperations` + * 2020-06-01: :class:`NatGatewaysOperations` + * 2020-07-01: :class:`NatGatewaysOperations` + * 2020-08-01: :class:`NatGatewaysOperations` + * 2020-11-01: :class:`NatGatewaysOperations` + * 2021-02-01: :class:`NatGatewaysOperations` + * 2021-05-01: :class:`NatGatewaysOperations` + * 2021-08-01: :class:`NatGatewaysOperations` + """ + api_version = self._get_api_version('nat_gateways') + if api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NatGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nat_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nat_rules(self): + """Instance depends on the API version: + + * 2020-08-01: :class:`NatRulesOperations` + * 2020-11-01: :class:`NatRulesOperations` + * 2021-02-01: :class:`NatRulesOperations` + * 2021-05-01: :class:`NatRulesOperations` + * 2021-08-01: :class:`NatRulesOperations` + """ + api_version = self._get_api_version('nat_rules') + if api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NatRulesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NatRulesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NatRulesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_groups(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkGroupsOperations` + """ + api_version = self._get_api_version('network_groups') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_ip_configurations(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2017-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-01-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2018-12-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-09-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2019-12-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-03-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-05-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-07-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2020-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-05-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` + """ + api_version = self._get_api_version('network_interface_ip_configurations') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_ip_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_load_balancers(self): + """Instance depends on the API version: + + * 2017-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2017-10-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-01-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-10-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2018-12-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-09-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2019-12-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-03-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-04-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-05-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-06-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-07-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2020-11-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-02-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-05-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-08-01: :class:`NetworkInterfaceLoadBalancersOperations` + """ + api_version = self._get_api_version('network_interface_load_balancers') + if api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_load_balancers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interface_tap_configurations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-10-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2018-12-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-02-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-04-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-06-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-07-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-09-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2019-12-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-03-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-04-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-05-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-06-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-07-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2020-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-02-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-05-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` + """ + api_version = self._get_api_version('network_interface_tap_configurations') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interface_tap_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_interfaces(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`NetworkInterfacesOperations` + * 2016-09-01: :class:`NetworkInterfacesOperations` + * 2016-12-01: :class:`NetworkInterfacesOperations` + * 2017-03-01: :class:`NetworkInterfacesOperations` + * 2017-06-01: :class:`NetworkInterfacesOperations` + * 2017-10-01: :class:`NetworkInterfacesOperations` + * 2018-01-01: :class:`NetworkInterfacesOperations` + * 2018-02-01: :class:`NetworkInterfacesOperations` + * 2018-04-01: :class:`NetworkInterfacesOperations` + * 2018-06-01: :class:`NetworkInterfacesOperations` + * 2018-07-01: :class:`NetworkInterfacesOperations` + * 2018-08-01: :class:`NetworkInterfacesOperations` + * 2018-10-01: :class:`NetworkInterfacesOperations` + * 2018-11-01: :class:`NetworkInterfacesOperations` + * 2018-12-01: :class:`NetworkInterfacesOperations` + * 2019-02-01: :class:`NetworkInterfacesOperations` + * 2019-04-01: :class:`NetworkInterfacesOperations` + * 2019-06-01: :class:`NetworkInterfacesOperations` + * 2019-07-01: :class:`NetworkInterfacesOperations` + * 2019-08-01: :class:`NetworkInterfacesOperations` + * 2019-09-01: :class:`NetworkInterfacesOperations` + * 2019-11-01: :class:`NetworkInterfacesOperations` + * 2019-12-01: :class:`NetworkInterfacesOperations` + * 2020-03-01: :class:`NetworkInterfacesOperations` + * 2020-04-01: :class:`NetworkInterfacesOperations` + * 2020-05-01: :class:`NetworkInterfacesOperations` + * 2020-06-01: :class:`NetworkInterfacesOperations` + * 2020-07-01: :class:`NetworkInterfacesOperations` + * 2020-08-01: :class:`NetworkInterfacesOperations` + * 2020-11-01: :class:`NetworkInterfacesOperations` + * 2021-02-01: :class:`NetworkInterfacesOperations` + * 2021-05-01: :class:`NetworkInterfacesOperations` + * 2021-08-01: :class:`NetworkInterfacesOperations` + """ + api_version = self._get_api_version('network_interfaces') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkInterfacesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_interfaces'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_commits(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerCommitsOperations` + """ + api_version = self._get_api_version('network_manager_commits') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerCommitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_commits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_deployment_status(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerDeploymentStatusOperations` + """ + api_version = self._get_api_version('network_manager_deployment_status') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerDeploymentStatusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_deployment_status'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_effective_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerEffectiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('network_manager_effective_security_admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerEffectiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_effective_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_managers(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagersOperations` + """ + api_version = self._get_api_version('network_managers') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_managers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_profiles(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`NetworkProfilesOperations` + * 2018-10-01: :class:`NetworkProfilesOperations` + * 2018-11-01: :class:`NetworkProfilesOperations` + * 2018-12-01: :class:`NetworkProfilesOperations` + * 2019-02-01: :class:`NetworkProfilesOperations` + * 2019-04-01: :class:`NetworkProfilesOperations` + * 2019-06-01: :class:`NetworkProfilesOperations` + * 2019-07-01: :class:`NetworkProfilesOperations` + * 2019-08-01: :class:`NetworkProfilesOperations` + * 2019-09-01: :class:`NetworkProfilesOperations` + * 2019-11-01: :class:`NetworkProfilesOperations` + * 2019-12-01: :class:`NetworkProfilesOperations` + * 2020-03-01: :class:`NetworkProfilesOperations` + * 2020-04-01: :class:`NetworkProfilesOperations` + * 2020-05-01: :class:`NetworkProfilesOperations` + * 2020-06-01: :class:`NetworkProfilesOperations` + * 2020-07-01: :class:`NetworkProfilesOperations` + * 2020-08-01: :class:`NetworkProfilesOperations` + * 2020-11-01: :class:`NetworkProfilesOperations` + * 2021-02-01: :class:`NetworkProfilesOperations` + * 2021-05-01: :class:`NetworkProfilesOperations` + * 2021-08-01: :class:`NetworkProfilesOperations` + """ + api_version = self._get_api_version('network_profiles') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkProfilesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_profiles'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_security_groups(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`NetworkSecurityGroupsOperations` + * 2016-09-01: :class:`NetworkSecurityGroupsOperations` + * 2016-12-01: :class:`NetworkSecurityGroupsOperations` + * 2017-03-01: :class:`NetworkSecurityGroupsOperations` + * 2017-06-01: :class:`NetworkSecurityGroupsOperations` + * 2017-10-01: :class:`NetworkSecurityGroupsOperations` + * 2018-01-01: :class:`NetworkSecurityGroupsOperations` + * 2018-02-01: :class:`NetworkSecurityGroupsOperations` + * 2018-04-01: :class:`NetworkSecurityGroupsOperations` + * 2018-06-01: :class:`NetworkSecurityGroupsOperations` + * 2018-07-01: :class:`NetworkSecurityGroupsOperations` + * 2018-08-01: :class:`NetworkSecurityGroupsOperations` + * 2018-10-01: :class:`NetworkSecurityGroupsOperations` + * 2018-11-01: :class:`NetworkSecurityGroupsOperations` + * 2018-12-01: :class:`NetworkSecurityGroupsOperations` + * 2019-02-01: :class:`NetworkSecurityGroupsOperations` + * 2019-04-01: :class:`NetworkSecurityGroupsOperations` + * 2019-06-01: :class:`NetworkSecurityGroupsOperations` + * 2019-07-01: :class:`NetworkSecurityGroupsOperations` + * 2019-08-01: :class:`NetworkSecurityGroupsOperations` + * 2019-09-01: :class:`NetworkSecurityGroupsOperations` + * 2019-11-01: :class:`NetworkSecurityGroupsOperations` + * 2019-12-01: :class:`NetworkSecurityGroupsOperations` + * 2020-03-01: :class:`NetworkSecurityGroupsOperations` + * 2020-04-01: :class:`NetworkSecurityGroupsOperations` + * 2020-05-01: :class:`NetworkSecurityGroupsOperations` + * 2020-06-01: :class:`NetworkSecurityGroupsOperations` + * 2020-07-01: :class:`NetworkSecurityGroupsOperations` + * 2020-08-01: :class:`NetworkSecurityGroupsOperations` + * 2020-11-01: :class:`NetworkSecurityGroupsOperations` + * 2021-02-01: :class:`NetworkSecurityGroupsOperations` + * 2021-05-01: :class:`NetworkSecurityGroupsOperations` + * 2021-08-01: :class:`NetworkSecurityGroupsOperations` + """ + api_version = self._get_api_version('network_security_groups') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_security_perimeters(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkSecurityPerimetersOperations` + """ + api_version = self._get_api_version('network_security_perimeters') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkSecurityPerimetersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_perimeters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_virtual_appliances(self): + """Instance depends on the API version: + + * 2019-12-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-03-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-04-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-05-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-06-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-07-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-08-01: :class:`NetworkVirtualAppliancesOperations` + * 2020-11-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-02-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-05-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-08-01: :class:`NetworkVirtualAppliancesOperations` + """ + api_version = self._get_api_version('network_virtual_appliances') + if api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_virtual_appliances'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_watchers(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`NetworkWatchersOperations` + * 2016-12-01: :class:`NetworkWatchersOperations` + * 2017-03-01: :class:`NetworkWatchersOperations` + * 2017-06-01: :class:`NetworkWatchersOperations` + * 2017-10-01: :class:`NetworkWatchersOperations` + * 2018-01-01: :class:`NetworkWatchersOperations` + * 2018-02-01: :class:`NetworkWatchersOperations` + * 2018-04-01: :class:`NetworkWatchersOperations` + * 2018-06-01: :class:`NetworkWatchersOperations` + * 2018-07-01: :class:`NetworkWatchersOperations` + * 2018-08-01: :class:`NetworkWatchersOperations` + * 2018-10-01: :class:`NetworkWatchersOperations` + * 2018-11-01: :class:`NetworkWatchersOperations` + * 2018-12-01: :class:`NetworkWatchersOperations` + * 2019-02-01: :class:`NetworkWatchersOperations` + * 2019-04-01: :class:`NetworkWatchersOperations` + * 2019-06-01: :class:`NetworkWatchersOperations` + * 2019-07-01: :class:`NetworkWatchersOperations` + * 2019-08-01: :class:`NetworkWatchersOperations` + * 2019-09-01: :class:`NetworkWatchersOperations` + * 2019-11-01: :class:`NetworkWatchersOperations` + * 2019-12-01: :class:`NetworkWatchersOperations` + * 2020-03-01: :class:`NetworkWatchersOperations` + * 2020-04-01: :class:`NetworkWatchersOperations` + * 2020-05-01: :class:`NetworkWatchersOperations` + * 2020-06-01: :class:`NetworkWatchersOperations` + * 2020-07-01: :class:`NetworkWatchersOperations` + * 2020-08-01: :class:`NetworkWatchersOperations` + * 2020-11-01: :class:`NetworkWatchersOperations` + * 2021-02-01: :class:`NetworkWatchersOperations` + * 2021-05-01: :class:`NetworkWatchersOperations` + * 2021-08-01: :class:`NetworkWatchersOperations` + """ + api_version = self._get_api_version('network_watchers') + if api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkWatchersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_watchers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nsp_access_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NspAccessRulesOperations` + """ + api_version = self._get_api_version('nsp_access_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NspAccessRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nsp_access_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nsp_associations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NspAssociationsOperations` + """ + api_version = self._get_api_version('nsp_associations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NspAssociationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nsp_associations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def nsp_profiles(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NspProfilesOperations` + """ + api_version = self._get_api_version('nsp_profiles') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NspProfilesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'nsp_profiles'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def operations(self): + """Instance depends on the API version: + + * 2017-10-01: :class:`Operations` + * 2018-01-01: :class:`Operations` + * 2018-02-01: :class:`Operations` + * 2018-04-01: :class:`Operations` + * 2018-06-01: :class:`Operations` + * 2018-07-01: :class:`Operations` + * 2018-08-01: :class:`Operations` + * 2018-10-01: :class:`Operations` + * 2018-11-01: :class:`Operations` + * 2018-12-01: :class:`Operations` + * 2019-02-01: :class:`Operations` + * 2019-04-01: :class:`Operations` + * 2019-06-01: :class:`Operations` + * 2019-07-01: :class:`Operations` + * 2019-08-01: :class:`Operations` + * 2019-09-01: :class:`Operations` + * 2019-11-01: :class:`Operations` + * 2019-12-01: :class:`Operations` + * 2020-03-01: :class:`Operations` + * 2020-04-01: :class:`Operations` + * 2020-05-01: :class:`Operations` + * 2020-06-01: :class:`Operations` + * 2020-07-01: :class:`Operations` + * 2020-08-01: :class:`Operations` + * 2020-11-01: :class:`Operations` + * 2021-02-01: :class:`Operations` + * 2021-05-01: :class:`Operations` + * 2021-08-01: :class:`Operations` + """ + api_version = self._get_api_version('operations') + if api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import Operations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import Operations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import Operations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import Operations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import Operations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import Operations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import Operations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import Operations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import Operations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import Operations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import Operations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import Operations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import Operations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import Operations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import Operations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import Operations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import Operations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import Operations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import Operations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import Operations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import Operations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import Operations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import Operations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import Operations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import Operations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import Operations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import Operations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import Operations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def p2_svpn_gateways(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`P2SVpnGatewaysOperations` + * 2018-10-01: :class:`P2SVpnGatewaysOperations` + * 2018-11-01: :class:`P2SVpnGatewaysOperations` + * 2018-12-01: :class:`P2SVpnGatewaysOperations` + * 2019-02-01: :class:`P2SVpnGatewaysOperations` + * 2019-04-01: :class:`P2SVpnGatewaysOperations` + * 2019-06-01: :class:`P2SVpnGatewaysOperations` + * 2019-07-01: :class:`P2SVpnGatewaysOperations` + * 2019-08-01: :class:`P2SVpnGatewaysOperations` + * 2019-09-01: :class:`P2SVpnGatewaysOperations` + * 2019-11-01: :class:`P2SVpnGatewaysOperations` + * 2019-12-01: :class:`P2SVpnGatewaysOperations` + * 2020-03-01: :class:`P2SVpnGatewaysOperations` + * 2020-04-01: :class:`P2SVpnGatewaysOperations` + * 2020-05-01: :class:`P2SVpnGatewaysOperations` + * 2020-06-01: :class:`P2SVpnGatewaysOperations` + * 2020-07-01: :class:`P2SVpnGatewaysOperations` + * 2020-08-01: :class:`P2SVpnGatewaysOperations` + * 2020-11-01: :class:`P2SVpnGatewaysOperations` + * 2021-02-01: :class:`P2SVpnGatewaysOperations` + * 2021-05-01: :class:`P2SVpnGatewaysOperations` + * 2021-08-01: :class:`P2SVpnGatewaysOperations` + """ + api_version = self._get_api_version('p2_svpn_gateways') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'p2_svpn_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def p2_svpn_server_configurations(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-10-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-11-01: :class:`P2SVpnServerConfigurationsOperations` + * 2018-12-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-02-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-04-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-06-01: :class:`P2SVpnServerConfigurationsOperations` + * 2019-07-01: :class:`P2SVpnServerConfigurationsOperations` + """ + api_version = self._get_api_version('p2_svpn_server_configurations') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import P2SVpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import P2SVpnServerConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'p2_svpn_server_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def packet_captures(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`PacketCapturesOperations` + * 2016-12-01: :class:`PacketCapturesOperations` + * 2017-03-01: :class:`PacketCapturesOperations` + * 2017-06-01: :class:`PacketCapturesOperations` + * 2017-10-01: :class:`PacketCapturesOperations` + * 2018-01-01: :class:`PacketCapturesOperations` + * 2018-02-01: :class:`PacketCapturesOperations` + * 2018-04-01: :class:`PacketCapturesOperations` + * 2018-06-01: :class:`PacketCapturesOperations` + * 2018-07-01: :class:`PacketCapturesOperations` + * 2018-08-01: :class:`PacketCapturesOperations` + * 2018-10-01: :class:`PacketCapturesOperations` + * 2018-11-01: :class:`PacketCapturesOperations` + * 2018-12-01: :class:`PacketCapturesOperations` + * 2019-02-01: :class:`PacketCapturesOperations` + * 2019-04-01: :class:`PacketCapturesOperations` + * 2019-06-01: :class:`PacketCapturesOperations` + * 2019-07-01: :class:`PacketCapturesOperations` + * 2019-08-01: :class:`PacketCapturesOperations` + * 2019-09-01: :class:`PacketCapturesOperations` + * 2019-11-01: :class:`PacketCapturesOperations` + * 2019-12-01: :class:`PacketCapturesOperations` + * 2020-03-01: :class:`PacketCapturesOperations` + * 2020-04-01: :class:`PacketCapturesOperations` + * 2020-05-01: :class:`PacketCapturesOperations` + * 2020-06-01: :class:`PacketCapturesOperations` + * 2020-07-01: :class:`PacketCapturesOperations` + * 2020-08-01: :class:`PacketCapturesOperations` + * 2020-11-01: :class:`PacketCapturesOperations` + * 2021-02-01: :class:`PacketCapturesOperations` + * 2021-05-01: :class:`PacketCapturesOperations` + * 2021-08-01: :class:`PacketCapturesOperations` + """ + api_version = self._get_api_version('packet_captures') + if api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import PacketCapturesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'packet_captures'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def peer_express_route_circuit_connections(self): + """Instance depends on the API version: + + * 2018-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-04-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-06-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-07-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-09-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-11-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2019-12-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-03-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-04-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-05-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-06-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-07-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2020-11-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-05-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + """ + api_version = self._get_api_version('peer_express_route_circuit_connections') + if api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'peer_express_route_circuit_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def perimeter_associable_resource_types(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`PerimeterAssociableResourceTypesOperations` + """ + api_version = self._get_api_version('perimeter_associable_resource_types') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import PerimeterAssociableResourceTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'perimeter_associable_resource_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_dns_zone_groups(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-04-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-05-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-06-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-07-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-08-01: :class:`PrivateDnsZoneGroupsOperations` + * 2020-11-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-02-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-05-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-08-01: :class:`PrivateDnsZoneGroupsOperations` + """ + api_version = self._get_api_version('private_dns_zone_groups') + if api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_dns_zone_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_endpoints(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`PrivateEndpointsOperations` + * 2019-06-01: :class:`PrivateEndpointsOperations` + * 2019-07-01: :class:`PrivateEndpointsOperations` + * 2019-08-01: :class:`PrivateEndpointsOperations` + * 2019-09-01: :class:`PrivateEndpointsOperations` + * 2019-11-01: :class:`PrivateEndpointsOperations` + * 2019-12-01: :class:`PrivateEndpointsOperations` + * 2020-03-01: :class:`PrivateEndpointsOperations` + * 2020-04-01: :class:`PrivateEndpointsOperations` + * 2020-05-01: :class:`PrivateEndpointsOperations` + * 2020-06-01: :class:`PrivateEndpointsOperations` + * 2020-07-01: :class:`PrivateEndpointsOperations` + * 2020-08-01: :class:`PrivateEndpointsOperations` + * 2020-11-01: :class:`PrivateEndpointsOperations` + * 2021-02-01: :class:`PrivateEndpointsOperations` + * 2021-05-01: :class:`PrivateEndpointsOperations` + * 2021-08-01: :class:`PrivateEndpointsOperations` + """ + api_version = self._get_api_version('private_endpoints') + if api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import PrivateEndpointsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_endpoints'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def private_link_services(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`PrivateLinkServicesOperations` + * 2019-06-01: :class:`PrivateLinkServicesOperations` + * 2019-07-01: :class:`PrivateLinkServicesOperations` + * 2019-08-01: :class:`PrivateLinkServicesOperations` + * 2019-09-01: :class:`PrivateLinkServicesOperations` + * 2019-11-01: :class:`PrivateLinkServicesOperations` + * 2019-12-01: :class:`PrivateLinkServicesOperations` + * 2020-03-01: :class:`PrivateLinkServicesOperations` + * 2020-04-01: :class:`PrivateLinkServicesOperations` + * 2020-05-01: :class:`PrivateLinkServicesOperations` + * 2020-06-01: :class:`PrivateLinkServicesOperations` + * 2020-07-01: :class:`PrivateLinkServicesOperations` + * 2020-08-01: :class:`PrivateLinkServicesOperations` + * 2020-11-01: :class:`PrivateLinkServicesOperations` + * 2021-02-01: :class:`PrivateLinkServicesOperations` + * 2021-05-01: :class:`PrivateLinkServicesOperations` + * 2021-08-01: :class:`PrivateLinkServicesOperations` + """ + api_version = self._get_api_version('private_link_services') + if api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import PrivateLinkServicesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'private_link_services'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def public_ip_addresses(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`PublicIPAddressesOperations` + * 2016-09-01: :class:`PublicIPAddressesOperations` + * 2016-12-01: :class:`PublicIPAddressesOperations` + * 2017-03-01: :class:`PublicIPAddressesOperations` + * 2017-06-01: :class:`PublicIPAddressesOperations` + * 2017-10-01: :class:`PublicIPAddressesOperations` + * 2018-01-01: :class:`PublicIPAddressesOperations` + * 2018-02-01: :class:`PublicIPAddressesOperations` + * 2018-04-01: :class:`PublicIPAddressesOperations` + * 2018-06-01: :class:`PublicIPAddressesOperations` + * 2018-07-01: :class:`PublicIPAddressesOperations` + * 2018-08-01: :class:`PublicIPAddressesOperations` + * 2018-10-01: :class:`PublicIPAddressesOperations` + * 2018-11-01: :class:`PublicIPAddressesOperations` + * 2018-12-01: :class:`PublicIPAddressesOperations` + * 2019-02-01: :class:`PublicIPAddressesOperations` + * 2019-04-01: :class:`PublicIPAddressesOperations` + * 2019-06-01: :class:`PublicIPAddressesOperations` + * 2019-07-01: :class:`PublicIPAddressesOperations` + * 2019-08-01: :class:`PublicIPAddressesOperations` + * 2019-09-01: :class:`PublicIPAddressesOperations` + * 2019-11-01: :class:`PublicIPAddressesOperations` + * 2019-12-01: :class:`PublicIPAddressesOperations` + * 2020-03-01: :class:`PublicIPAddressesOperations` + * 2020-04-01: :class:`PublicIPAddressesOperations` + * 2020-05-01: :class:`PublicIPAddressesOperations` + * 2020-06-01: :class:`PublicIPAddressesOperations` + * 2020-07-01: :class:`PublicIPAddressesOperations` + * 2020-08-01: :class:`PublicIPAddressesOperations` + * 2020-11-01: :class:`PublicIPAddressesOperations` + * 2021-02-01: :class:`PublicIPAddressesOperations` + * 2021-05-01: :class:`PublicIPAddressesOperations` + * 2021-08-01: :class:`PublicIPAddressesOperations` + """ + api_version = self._get_api_version('public_ip_addresses') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import PublicIPAddressesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'public_ip_addresses'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def public_ip_prefixes(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`PublicIPPrefixesOperations` + * 2018-08-01: :class:`PublicIPPrefixesOperations` + * 2018-10-01: :class:`PublicIPPrefixesOperations` + * 2018-11-01: :class:`PublicIPPrefixesOperations` + * 2018-12-01: :class:`PublicIPPrefixesOperations` + * 2019-02-01: :class:`PublicIPPrefixesOperations` + * 2019-04-01: :class:`PublicIPPrefixesOperations` + * 2019-06-01: :class:`PublicIPPrefixesOperations` + * 2019-07-01: :class:`PublicIPPrefixesOperations` + * 2019-08-01: :class:`PublicIPPrefixesOperations` + * 2019-09-01: :class:`PublicIPPrefixesOperations` + * 2019-11-01: :class:`PublicIPPrefixesOperations` + * 2019-12-01: :class:`PublicIPPrefixesOperations` + * 2020-03-01: :class:`PublicIPPrefixesOperations` + * 2020-04-01: :class:`PublicIPPrefixesOperations` + * 2020-05-01: :class:`PublicIPPrefixesOperations` + * 2020-06-01: :class:`PublicIPPrefixesOperations` + * 2020-07-01: :class:`PublicIPPrefixesOperations` + * 2020-08-01: :class:`PublicIPPrefixesOperations` + * 2020-11-01: :class:`PublicIPPrefixesOperations` + * 2021-02-01: :class:`PublicIPPrefixesOperations` + * 2021-05-01: :class:`PublicIPPrefixesOperations` + * 2021-08-01: :class:`PublicIPPrefixesOperations` + """ + api_version = self._get_api_version('public_ip_prefixes') + if api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import PublicIPPrefixesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'public_ip_prefixes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def resource_navigation_links(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`ResourceNavigationLinksOperations` + * 2019-04-01: :class:`ResourceNavigationLinksOperations` + * 2019-06-01: :class:`ResourceNavigationLinksOperations` + * 2019-07-01: :class:`ResourceNavigationLinksOperations` + * 2019-08-01: :class:`ResourceNavigationLinksOperations` + * 2019-09-01: :class:`ResourceNavigationLinksOperations` + * 2019-11-01: :class:`ResourceNavigationLinksOperations` + * 2019-12-01: :class:`ResourceNavigationLinksOperations` + * 2020-03-01: :class:`ResourceNavigationLinksOperations` + * 2020-04-01: :class:`ResourceNavigationLinksOperations` + * 2020-05-01: :class:`ResourceNavigationLinksOperations` + * 2020-06-01: :class:`ResourceNavigationLinksOperations` + * 2020-07-01: :class:`ResourceNavigationLinksOperations` + * 2020-08-01: :class:`ResourceNavigationLinksOperations` + * 2020-11-01: :class:`ResourceNavigationLinksOperations` + * 2021-02-01: :class:`ResourceNavigationLinksOperations` + * 2021-05-01: :class:`ResourceNavigationLinksOperations` + * 2021-08-01: :class:`ResourceNavigationLinksOperations` + """ + api_version = self._get_api_version('resource_navigation_links') + if api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'resource_navigation_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_filter_rules(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`RouteFilterRulesOperations` + * 2017-03-01: :class:`RouteFilterRulesOperations` + * 2017-06-01: :class:`RouteFilterRulesOperations` + * 2017-10-01: :class:`RouteFilterRulesOperations` + * 2018-01-01: :class:`RouteFilterRulesOperations` + * 2018-02-01: :class:`RouteFilterRulesOperations` + * 2018-04-01: :class:`RouteFilterRulesOperations` + * 2018-06-01: :class:`RouteFilterRulesOperations` + * 2018-07-01: :class:`RouteFilterRulesOperations` + * 2018-08-01: :class:`RouteFilterRulesOperations` + * 2018-10-01: :class:`RouteFilterRulesOperations` + * 2018-11-01: :class:`RouteFilterRulesOperations` + * 2018-12-01: :class:`RouteFilterRulesOperations` + * 2019-02-01: :class:`RouteFilterRulesOperations` + * 2019-04-01: :class:`RouteFilterRulesOperations` + * 2019-06-01: :class:`RouteFilterRulesOperations` + * 2019-07-01: :class:`RouteFilterRulesOperations` + * 2019-08-01: :class:`RouteFilterRulesOperations` + * 2019-09-01: :class:`RouteFilterRulesOperations` + * 2019-11-01: :class:`RouteFilterRulesOperations` + * 2019-12-01: :class:`RouteFilterRulesOperations` + * 2020-03-01: :class:`RouteFilterRulesOperations` + * 2020-04-01: :class:`RouteFilterRulesOperations` + * 2020-05-01: :class:`RouteFilterRulesOperations` + * 2020-06-01: :class:`RouteFilterRulesOperations` + * 2020-07-01: :class:`RouteFilterRulesOperations` + * 2020-08-01: :class:`RouteFilterRulesOperations` + * 2020-11-01: :class:`RouteFilterRulesOperations` + * 2021-02-01: :class:`RouteFilterRulesOperations` + * 2021-05-01: :class:`RouteFilterRulesOperations` + * 2021-08-01: :class:`RouteFilterRulesOperations` + """ + api_version = self._get_api_version('route_filter_rules') + if api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import RouteFilterRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_filter_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_filters(self): + """Instance depends on the API version: + + * 2016-12-01: :class:`RouteFiltersOperations` + * 2017-03-01: :class:`RouteFiltersOperations` + * 2017-06-01: :class:`RouteFiltersOperations` + * 2017-10-01: :class:`RouteFiltersOperations` + * 2018-01-01: :class:`RouteFiltersOperations` + * 2018-02-01: :class:`RouteFiltersOperations` + * 2018-04-01: :class:`RouteFiltersOperations` + * 2018-06-01: :class:`RouteFiltersOperations` + * 2018-07-01: :class:`RouteFiltersOperations` + * 2018-08-01: :class:`RouteFiltersOperations` + * 2018-10-01: :class:`RouteFiltersOperations` + * 2018-11-01: :class:`RouteFiltersOperations` + * 2018-12-01: :class:`RouteFiltersOperations` + * 2019-02-01: :class:`RouteFiltersOperations` + * 2019-04-01: :class:`RouteFiltersOperations` + * 2019-06-01: :class:`RouteFiltersOperations` + * 2019-07-01: :class:`RouteFiltersOperations` + * 2019-08-01: :class:`RouteFiltersOperations` + * 2019-09-01: :class:`RouteFiltersOperations` + * 2019-11-01: :class:`RouteFiltersOperations` + * 2019-12-01: :class:`RouteFiltersOperations` + * 2020-03-01: :class:`RouteFiltersOperations` + * 2020-04-01: :class:`RouteFiltersOperations` + * 2020-05-01: :class:`RouteFiltersOperations` + * 2020-06-01: :class:`RouteFiltersOperations` + * 2020-07-01: :class:`RouteFiltersOperations` + * 2020-08-01: :class:`RouteFiltersOperations` + * 2020-11-01: :class:`RouteFiltersOperations` + * 2021-02-01: :class:`RouteFiltersOperations` + * 2021-05-01: :class:`RouteFiltersOperations` + * 2021-08-01: :class:`RouteFiltersOperations` + """ + api_version = self._get_api_version('route_filters') + if api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import RouteFiltersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_filters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def route_tables(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`RouteTablesOperations` + * 2016-09-01: :class:`RouteTablesOperations` + * 2016-12-01: :class:`RouteTablesOperations` + * 2017-03-01: :class:`RouteTablesOperations` + * 2017-06-01: :class:`RouteTablesOperations` + * 2017-10-01: :class:`RouteTablesOperations` + * 2018-01-01: :class:`RouteTablesOperations` + * 2018-02-01: :class:`RouteTablesOperations` + * 2018-04-01: :class:`RouteTablesOperations` + * 2018-06-01: :class:`RouteTablesOperations` + * 2018-07-01: :class:`RouteTablesOperations` + * 2018-08-01: :class:`RouteTablesOperations` + * 2018-10-01: :class:`RouteTablesOperations` + * 2018-11-01: :class:`RouteTablesOperations` + * 2018-12-01: :class:`RouteTablesOperations` + * 2019-02-01: :class:`RouteTablesOperations` + * 2019-04-01: :class:`RouteTablesOperations` + * 2019-06-01: :class:`RouteTablesOperations` + * 2019-07-01: :class:`RouteTablesOperations` + * 2019-08-01: :class:`RouteTablesOperations` + * 2019-09-01: :class:`RouteTablesOperations` + * 2019-11-01: :class:`RouteTablesOperations` + * 2019-12-01: :class:`RouteTablesOperations` + * 2020-03-01: :class:`RouteTablesOperations` + * 2020-04-01: :class:`RouteTablesOperations` + * 2020-05-01: :class:`RouteTablesOperations` + * 2020-06-01: :class:`RouteTablesOperations` + * 2020-07-01: :class:`RouteTablesOperations` + * 2020-08-01: :class:`RouteTablesOperations` + * 2020-11-01: :class:`RouteTablesOperations` + * 2021-02-01: :class:`RouteTablesOperations` + * 2021-05-01: :class:`RouteTablesOperations` + * 2021-08-01: :class:`RouteTablesOperations` + """ + api_version = self._get_api_version('route_tables') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import RouteTablesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'route_tables'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def routes(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`RoutesOperations` + * 2016-09-01: :class:`RoutesOperations` + * 2016-12-01: :class:`RoutesOperations` + * 2017-03-01: :class:`RoutesOperations` + * 2017-06-01: :class:`RoutesOperations` + * 2017-10-01: :class:`RoutesOperations` + * 2018-01-01: :class:`RoutesOperations` + * 2018-02-01: :class:`RoutesOperations` + * 2018-04-01: :class:`RoutesOperations` + * 2018-06-01: :class:`RoutesOperations` + * 2018-07-01: :class:`RoutesOperations` + * 2018-08-01: :class:`RoutesOperations` + * 2018-10-01: :class:`RoutesOperations` + * 2018-11-01: :class:`RoutesOperations` + * 2018-12-01: :class:`RoutesOperations` + * 2019-02-01: :class:`RoutesOperations` + * 2019-04-01: :class:`RoutesOperations` + * 2019-06-01: :class:`RoutesOperations` + * 2019-07-01: :class:`RoutesOperations` + * 2019-08-01: :class:`RoutesOperations` + * 2019-09-01: :class:`RoutesOperations` + * 2019-11-01: :class:`RoutesOperations` + * 2019-12-01: :class:`RoutesOperations` + * 2020-03-01: :class:`RoutesOperations` + * 2020-04-01: :class:`RoutesOperations` + * 2020-05-01: :class:`RoutesOperations` + * 2020-06-01: :class:`RoutesOperations` + * 2020-07-01: :class:`RoutesOperations` + * 2020-08-01: :class:`RoutesOperations` + * 2020-11-01: :class:`RoutesOperations` + * 2021-02-01: :class:`RoutesOperations` + * 2021-05-01: :class:`RoutesOperations` + * 2021-08-01: :class:`RoutesOperations` + """ + api_version = self._get_api_version('routes') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import RoutesOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import RoutesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'routes'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def routing_intent(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`RoutingIntentOperations` + * 2021-08-01: :class:`RoutingIntentOperations` + """ + api_version = self._get_api_version('routing_intent') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RoutingIntentOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import RoutingIntentOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'routing_intent'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_admin_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityAdminConfigurationsOperations` + """ + api_version = self._get_api_version('security_admin_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import SecurityAdminConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_admin_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_partner_providers(self): + """Instance depends on the API version: + + * 2020-03-01: :class:`SecurityPartnerProvidersOperations` + * 2020-04-01: :class:`SecurityPartnerProvidersOperations` + * 2020-05-01: :class:`SecurityPartnerProvidersOperations` + * 2020-06-01: :class:`SecurityPartnerProvidersOperations` + * 2020-07-01: :class:`SecurityPartnerProvidersOperations` + * 2020-08-01: :class:`SecurityPartnerProvidersOperations` + * 2020-11-01: :class:`SecurityPartnerProvidersOperations` + * 2021-02-01: :class:`SecurityPartnerProvidersOperations` + * 2021-05-01: :class:`SecurityPartnerProvidersOperations` + * 2021-08-01: :class:`SecurityPartnerProvidersOperations` + """ + api_version = self._get_api_version('security_partner_providers') + if api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_partner_providers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_rules(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`SecurityRulesOperations` + * 2016-09-01: :class:`SecurityRulesOperations` + * 2016-12-01: :class:`SecurityRulesOperations` + * 2017-03-01: :class:`SecurityRulesOperations` + * 2017-06-01: :class:`SecurityRulesOperations` + * 2017-10-01: :class:`SecurityRulesOperations` + * 2018-01-01: :class:`SecurityRulesOperations` + * 2018-02-01: :class:`SecurityRulesOperations` + * 2018-04-01: :class:`SecurityRulesOperations` + * 2018-06-01: :class:`SecurityRulesOperations` + * 2018-07-01: :class:`SecurityRulesOperations` + * 2018-08-01: :class:`SecurityRulesOperations` + * 2018-10-01: :class:`SecurityRulesOperations` + * 2018-11-01: :class:`SecurityRulesOperations` + * 2018-12-01: :class:`SecurityRulesOperations` + * 2019-02-01: :class:`SecurityRulesOperations` + * 2019-04-01: :class:`SecurityRulesOperations` + * 2019-06-01: :class:`SecurityRulesOperations` + * 2019-07-01: :class:`SecurityRulesOperations` + * 2019-08-01: :class:`SecurityRulesOperations` + * 2019-09-01: :class:`SecurityRulesOperations` + * 2019-11-01: :class:`SecurityRulesOperations` + * 2019-12-01: :class:`SecurityRulesOperations` + * 2020-03-01: :class:`SecurityRulesOperations` + * 2020-04-01: :class:`SecurityRulesOperations` + * 2020-05-01: :class:`SecurityRulesOperations` + * 2020-06-01: :class:`SecurityRulesOperations` + * 2020-07-01: :class:`SecurityRulesOperations` + * 2020-08-01: :class:`SecurityRulesOperations` + * 2020-11-01: :class:`SecurityRulesOperations` + * 2021-02-01: :class:`SecurityRulesOperations` + * 2021-05-01: :class:`SecurityRulesOperations` + * 2021-08-01: :class:`SecurityRulesOperations` + """ + api_version = self._get_api_version('security_rules') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import SecurityRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_user_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityUserConfigurationsOperations` + """ + api_version = self._get_api_version('security_user_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import SecurityUserConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_user_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_association_links(self): + """Instance depends on the API version: + + * 2019-02-01: :class:`ServiceAssociationLinksOperations` + * 2019-04-01: :class:`ServiceAssociationLinksOperations` + * 2019-06-01: :class:`ServiceAssociationLinksOperations` + * 2019-07-01: :class:`ServiceAssociationLinksOperations` + * 2019-08-01: :class:`ServiceAssociationLinksOperations` + * 2019-09-01: :class:`ServiceAssociationLinksOperations` + * 2019-11-01: :class:`ServiceAssociationLinksOperations` + * 2019-12-01: :class:`ServiceAssociationLinksOperations` + * 2020-03-01: :class:`ServiceAssociationLinksOperations` + * 2020-04-01: :class:`ServiceAssociationLinksOperations` + * 2020-05-01: :class:`ServiceAssociationLinksOperations` + * 2020-06-01: :class:`ServiceAssociationLinksOperations` + * 2020-07-01: :class:`ServiceAssociationLinksOperations` + * 2020-08-01: :class:`ServiceAssociationLinksOperations` + * 2020-11-01: :class:`ServiceAssociationLinksOperations` + * 2021-02-01: :class:`ServiceAssociationLinksOperations` + * 2021-05-01: :class:`ServiceAssociationLinksOperations` + * 2021-08-01: :class:`ServiceAssociationLinksOperations` + """ + api_version = self._get_api_version('service_association_links') + if api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_association_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_endpoint_policies(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-10-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2018-12-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-02-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-04-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-06-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-09-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2019-12-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-03-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-04-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-05-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-06-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-07-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-08-01: :class:`ServiceEndpointPoliciesOperations` + * 2020-11-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-02-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-05-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-08-01: :class:`ServiceEndpointPoliciesOperations` + """ + api_version = self._get_api_version('service_endpoint_policies') + if api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_endpoint_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_endpoint_policy_definitions(self): + """Instance depends on the API version: + + * 2018-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-10-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2018-12-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-02-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-04-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-06-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-09-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2019-12-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-03-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-04-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-05-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-06-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-07-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2020-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-02-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-05-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + """ + api_version = self._get_api_version('service_endpoint_policy_definitions') + if api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_endpoint_policy_definitions'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_tag_information(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`ServiceTagInformationOperations` + * 2021-08-01: :class:`ServiceTagInformationOperations` + """ + api_version = self._get_api_version('service_tag_information') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceTagInformationOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ServiceTagInformationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_tag_information'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def service_tags(self): + """Instance depends on the API version: + + * 2019-04-01: :class:`ServiceTagsOperations` + * 2019-06-01: :class:`ServiceTagsOperations` + * 2019-07-01: :class:`ServiceTagsOperations` + * 2019-08-01: :class:`ServiceTagsOperations` + * 2019-09-01: :class:`ServiceTagsOperations` + * 2019-11-01: :class:`ServiceTagsOperations` + * 2019-12-01: :class:`ServiceTagsOperations` + * 2020-03-01: :class:`ServiceTagsOperations` + * 2020-04-01: :class:`ServiceTagsOperations` + * 2020-05-01: :class:`ServiceTagsOperations` + * 2020-06-01: :class:`ServiceTagsOperations` + * 2020-07-01: :class:`ServiceTagsOperations` + * 2020-08-01: :class:`ServiceTagsOperations` + * 2020-11-01: :class:`ServiceTagsOperations` + * 2021-02-01: :class:`ServiceTagsOperations` + * 2021-05-01: :class:`ServiceTagsOperations` + * 2021-08-01: :class:`ServiceTagsOperations` + """ + api_version = self._get_api_version('service_tags') + if api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import ServiceTagsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'service_tags'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def subnets(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`SubnetsOperations` + * 2016-09-01: :class:`SubnetsOperations` + * 2016-12-01: :class:`SubnetsOperations` + * 2017-03-01: :class:`SubnetsOperations` + * 2017-06-01: :class:`SubnetsOperations` + * 2017-10-01: :class:`SubnetsOperations` + * 2018-01-01: :class:`SubnetsOperations` + * 2018-02-01: :class:`SubnetsOperations` + * 2018-04-01: :class:`SubnetsOperations` + * 2018-06-01: :class:`SubnetsOperations` + * 2018-07-01: :class:`SubnetsOperations` + * 2018-08-01: :class:`SubnetsOperations` + * 2018-10-01: :class:`SubnetsOperations` + * 2018-11-01: :class:`SubnetsOperations` + * 2018-12-01: :class:`SubnetsOperations` + * 2019-02-01: :class:`SubnetsOperations` + * 2019-04-01: :class:`SubnetsOperations` + * 2019-06-01: :class:`SubnetsOperations` + * 2019-07-01: :class:`SubnetsOperations` + * 2019-08-01: :class:`SubnetsOperations` + * 2019-09-01: :class:`SubnetsOperations` + * 2019-11-01: :class:`SubnetsOperations` + * 2019-12-01: :class:`SubnetsOperations` + * 2020-03-01: :class:`SubnetsOperations` + * 2020-04-01: :class:`SubnetsOperations` + * 2020-05-01: :class:`SubnetsOperations` + * 2020-06-01: :class:`SubnetsOperations` + * 2020-07-01: :class:`SubnetsOperations` + * 2020-08-01: :class:`SubnetsOperations` + * 2020-11-01: :class:`SubnetsOperations` + * 2021-02-01: :class:`SubnetsOperations` + * 2021-05-01: :class:`SubnetsOperations` + * 2021-08-01: :class:`SubnetsOperations` + """ + api_version = self._get_api_version('subnets') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import SubnetsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'subnets'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def usages(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`UsagesOperations` + * 2016-09-01: :class:`UsagesOperations` + * 2016-12-01: :class:`UsagesOperations` + * 2017-03-01: :class:`UsagesOperations` + * 2017-06-01: :class:`UsagesOperations` + * 2017-10-01: :class:`UsagesOperations` + * 2018-01-01: :class:`UsagesOperations` + * 2018-02-01: :class:`UsagesOperations` + * 2018-04-01: :class:`UsagesOperations` + * 2018-06-01: :class:`UsagesOperations` + * 2018-07-01: :class:`UsagesOperations` + * 2018-08-01: :class:`UsagesOperations` + * 2018-10-01: :class:`UsagesOperations` + * 2018-11-01: :class:`UsagesOperations` + * 2018-12-01: :class:`UsagesOperations` + * 2019-02-01: :class:`UsagesOperations` + * 2019-04-01: :class:`UsagesOperations` + * 2019-06-01: :class:`UsagesOperations` + * 2019-07-01: :class:`UsagesOperations` + * 2019-08-01: :class:`UsagesOperations` + * 2019-09-01: :class:`UsagesOperations` + * 2019-11-01: :class:`UsagesOperations` + * 2019-12-01: :class:`UsagesOperations` + * 2020-03-01: :class:`UsagesOperations` + * 2020-04-01: :class:`UsagesOperations` + * 2020-05-01: :class:`UsagesOperations` + * 2020-06-01: :class:`UsagesOperations` + * 2020-07-01: :class:`UsagesOperations` + * 2020-08-01: :class:`UsagesOperations` + * 2020-11-01: :class:`UsagesOperations` + * 2021-02-01: :class:`UsagesOperations` + * 2021-05-01: :class:`UsagesOperations` + * 2021-08-01: :class:`UsagesOperations` + """ + api_version = self._get_api_version('usages') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import UsagesOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import UsagesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'usages'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRuleCollectionsOperations` + """ + api_version = self._get_api_version('user_rule_collections') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import UserRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRulesOperations` + """ + api_version = self._get_api_version('user_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import UserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_appliance_sites(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualApplianceSitesOperations` + * 2020-06-01: :class:`VirtualApplianceSitesOperations` + * 2020-07-01: :class:`VirtualApplianceSitesOperations` + * 2020-08-01: :class:`VirtualApplianceSitesOperations` + * 2020-11-01: :class:`VirtualApplianceSitesOperations` + * 2021-02-01: :class:`VirtualApplianceSitesOperations` + * 2021-05-01: :class:`VirtualApplianceSitesOperations` + * 2021-08-01: :class:`VirtualApplianceSitesOperations` + """ + api_version = self._get_api_version('virtual_appliance_sites') + if api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_appliance_sites'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_appliance_skus(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualApplianceSkusOperations` + * 2020-06-01: :class:`VirtualApplianceSkusOperations` + * 2020-07-01: :class:`VirtualApplianceSkusOperations` + * 2020-08-01: :class:`VirtualApplianceSkusOperations` + * 2020-11-01: :class:`VirtualApplianceSkusOperations` + * 2021-02-01: :class:`VirtualApplianceSkusOperations` + * 2021-05-01: :class:`VirtualApplianceSkusOperations` + * 2021-08-01: :class:`VirtualApplianceSkusOperations` + """ + api_version = self._get_api_version('virtual_appliance_skus') + if api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_appliance_skus'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_bgp_connection(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-06-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-07-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-08-01: :class:`VirtualHubBgpConnectionOperations` + * 2020-11-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-02-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-05-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-08-01: :class:`VirtualHubBgpConnectionOperations` + """ + api_version = self._get_api_version('virtual_hub_bgp_connection') + if api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connection'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_bgp_connections(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-06-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-07-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-08-01: :class:`VirtualHubBgpConnectionsOperations` + * 2020-11-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-02-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-05-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-08-01: :class:`VirtualHubBgpConnectionsOperations` + """ + api_version = self._get_api_version('virtual_hub_bgp_connections') + if api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_ip_configuration(self): + """Instance depends on the API version: + + * 2020-05-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-06-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-07-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-08-01: :class:`VirtualHubIpConfigurationOperations` + * 2020-11-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-02-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-05-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-08-01: :class:`VirtualHubIpConfigurationOperations` + """ + api_version = self._get_api_version('virtual_hub_ip_configuration') + if api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_ip_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hub_route_table_v2_s(self): + """Instance depends on the API version: + + * 2019-09-01: :class:`VirtualHubRouteTableV2SOperations` + * 2019-11-01: :class:`VirtualHubRouteTableV2SOperations` + * 2019-12-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-03-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-04-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-05-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-06-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-07-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-08-01: :class:`VirtualHubRouteTableV2SOperations` + * 2020-11-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-02-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-05-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-08-01: :class:`VirtualHubRouteTableV2SOperations` + """ + api_version = self._get_api_version('virtual_hub_route_table_v2_s') + if api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hub_route_table_v2_s'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_hubs(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VirtualHubsOperations` + * 2018-06-01: :class:`VirtualHubsOperations` + * 2018-07-01: :class:`VirtualHubsOperations` + * 2018-08-01: :class:`VirtualHubsOperations` + * 2018-10-01: :class:`VirtualHubsOperations` + * 2018-11-01: :class:`VirtualHubsOperations` + * 2018-12-01: :class:`VirtualHubsOperations` + * 2019-02-01: :class:`VirtualHubsOperations` + * 2019-04-01: :class:`VirtualHubsOperations` + * 2019-06-01: :class:`VirtualHubsOperations` + * 2019-07-01: :class:`VirtualHubsOperations` + * 2019-08-01: :class:`VirtualHubsOperations` + * 2019-09-01: :class:`VirtualHubsOperations` + * 2019-11-01: :class:`VirtualHubsOperations` + * 2019-12-01: :class:`VirtualHubsOperations` + * 2020-03-01: :class:`VirtualHubsOperations` + * 2020-04-01: :class:`VirtualHubsOperations` + * 2020-05-01: :class:`VirtualHubsOperations` + * 2020-06-01: :class:`VirtualHubsOperations` + * 2020-07-01: :class:`VirtualHubsOperations` + * 2020-08-01: :class:`VirtualHubsOperations` + * 2020-11-01: :class:`VirtualHubsOperations` + * 2021-02-01: :class:`VirtualHubsOperations` + * 2021-05-01: :class:`VirtualHubsOperations` + * 2021-08-01: :class:`VirtualHubsOperations` + """ + api_version = self._get_api_version('virtual_hubs') + if api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualHubsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_hubs'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateway_connections(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2016-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2016-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2017-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-01-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2018-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2019-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-05-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-07-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2020-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-05-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` + """ + api_version = self._get_api_version('virtual_network_gateway_connections') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateway_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateway_nat_rules(self): + """Instance depends on the API version: + + * 2021-02-01: :class:`VirtualNetworkGatewayNatRulesOperations` + * 2021-05-01: :class:`VirtualNetworkGatewayNatRulesOperations` + * 2021-08-01: :class:`VirtualNetworkGatewayNatRulesOperations` + """ + api_version = self._get_api_version('virtual_network_gateway_nat_rules') + if api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateway_nat_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_gateways(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworkGatewaysOperations` + * 2016-09-01: :class:`VirtualNetworkGatewaysOperations` + * 2016-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-03-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2017-10-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-01-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-10-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2018-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-09-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2019-12-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-03-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-04-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-05-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-06-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-07-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-08-01: :class:`VirtualNetworkGatewaysOperations` + * 2020-11-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-02-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-05-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-08-01: :class:`VirtualNetworkGatewaysOperations` + """ + api_version = self._get_api_version('virtual_network_gateways') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_peerings(self): + """Instance depends on the API version: + + * 2016-09-01: :class:`VirtualNetworkPeeringsOperations` + * 2016-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-03-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2017-10-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-01-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-10-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2018-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-09-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2019-12-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-03-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-04-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-05-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-06-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-07-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-08-01: :class:`VirtualNetworkPeeringsOperations` + * 2020-11-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-02-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-05-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-08-01: :class:`VirtualNetworkPeeringsOperations` + """ + api_version = self._get_api_version('virtual_network_peerings') + if api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_network_taps(self): + """Instance depends on the API version: + + * 2018-08-01: :class:`VirtualNetworkTapsOperations` + * 2018-10-01: :class:`VirtualNetworkTapsOperations` + * 2018-11-01: :class:`VirtualNetworkTapsOperations` + * 2018-12-01: :class:`VirtualNetworkTapsOperations` + * 2019-02-01: :class:`VirtualNetworkTapsOperations` + * 2019-04-01: :class:`VirtualNetworkTapsOperations` + * 2019-06-01: :class:`VirtualNetworkTapsOperations` + * 2019-07-01: :class:`VirtualNetworkTapsOperations` + * 2019-08-01: :class:`VirtualNetworkTapsOperations` + * 2019-09-01: :class:`VirtualNetworkTapsOperations` + * 2019-11-01: :class:`VirtualNetworkTapsOperations` + * 2019-12-01: :class:`VirtualNetworkTapsOperations` + * 2020-03-01: :class:`VirtualNetworkTapsOperations` + * 2020-04-01: :class:`VirtualNetworkTapsOperations` + * 2020-05-01: :class:`VirtualNetworkTapsOperations` + * 2020-06-01: :class:`VirtualNetworkTapsOperations` + * 2020-07-01: :class:`VirtualNetworkTapsOperations` + * 2020-08-01: :class:`VirtualNetworkTapsOperations` + * 2020-11-01: :class:`VirtualNetworkTapsOperations` + * 2021-02-01: :class:`VirtualNetworkTapsOperations` + * 2021-05-01: :class:`VirtualNetworkTapsOperations` + * 2021-08-01: :class:`VirtualNetworkTapsOperations` + """ + api_version = self._get_api_version('virtual_network_taps') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_network_taps'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_networks(self): + """Instance depends on the API version: + + * 2015-06-15: :class:`VirtualNetworksOperations` + * 2016-09-01: :class:`VirtualNetworksOperations` + * 2016-12-01: :class:`VirtualNetworksOperations` + * 2017-03-01: :class:`VirtualNetworksOperations` + * 2017-06-01: :class:`VirtualNetworksOperations` + * 2017-10-01: :class:`VirtualNetworksOperations` + * 2018-01-01: :class:`VirtualNetworksOperations` + * 2018-02-01: :class:`VirtualNetworksOperations` + * 2018-04-01: :class:`VirtualNetworksOperations` + * 2018-06-01: :class:`VirtualNetworksOperations` + * 2018-07-01: :class:`VirtualNetworksOperations` + * 2018-08-01: :class:`VirtualNetworksOperations` + * 2018-10-01: :class:`VirtualNetworksOperations` + * 2018-11-01: :class:`VirtualNetworksOperations` + * 2018-12-01: :class:`VirtualNetworksOperations` + * 2019-02-01: :class:`VirtualNetworksOperations` + * 2019-04-01: :class:`VirtualNetworksOperations` + * 2019-06-01: :class:`VirtualNetworksOperations` + * 2019-07-01: :class:`VirtualNetworksOperations` + * 2019-08-01: :class:`VirtualNetworksOperations` + * 2019-09-01: :class:`VirtualNetworksOperations` + * 2019-11-01: :class:`VirtualNetworksOperations` + * 2019-12-01: :class:`VirtualNetworksOperations` + * 2020-03-01: :class:`VirtualNetworksOperations` + * 2020-04-01: :class:`VirtualNetworksOperations` + * 2020-05-01: :class:`VirtualNetworksOperations` + * 2020-06-01: :class:`VirtualNetworksOperations` + * 2020-07-01: :class:`VirtualNetworksOperations` + * 2020-08-01: :class:`VirtualNetworksOperations` + * 2020-11-01: :class:`VirtualNetworksOperations` + * 2021-02-01: :class:`VirtualNetworksOperations` + * 2021-05-01: :class:`VirtualNetworksOperations` + * 2021-08-01: :class:`VirtualNetworksOperations` + """ + api_version = self._get_api_version('virtual_networks') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_router_peerings(self): + """Instance depends on the API version: + + * 2019-07-01: :class:`VirtualRouterPeeringsOperations` + * 2019-08-01: :class:`VirtualRouterPeeringsOperations` + * 2019-09-01: :class:`VirtualRouterPeeringsOperations` + * 2019-11-01: :class:`VirtualRouterPeeringsOperations` + * 2019-12-01: :class:`VirtualRouterPeeringsOperations` + * 2020-03-01: :class:`VirtualRouterPeeringsOperations` + * 2020-04-01: :class:`VirtualRouterPeeringsOperations` + * 2020-05-01: :class:`VirtualRouterPeeringsOperations` + * 2020-06-01: :class:`VirtualRouterPeeringsOperations` + * 2020-07-01: :class:`VirtualRouterPeeringsOperations` + * 2020-08-01: :class:`VirtualRouterPeeringsOperations` + * 2020-11-01: :class:`VirtualRouterPeeringsOperations` + * 2021-02-01: :class:`VirtualRouterPeeringsOperations` + * 2021-05-01: :class:`VirtualRouterPeeringsOperations` + * 2021-08-01: :class:`VirtualRouterPeeringsOperations` + """ + api_version = self._get_api_version('virtual_router_peerings') + if api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_router_peerings'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_routers(self): + """Instance depends on the API version: + + * 2019-07-01: :class:`VirtualRoutersOperations` + * 2019-08-01: :class:`VirtualRoutersOperations` + * 2019-09-01: :class:`VirtualRoutersOperations` + * 2019-11-01: :class:`VirtualRoutersOperations` + * 2019-12-01: :class:`VirtualRoutersOperations` + * 2020-03-01: :class:`VirtualRoutersOperations` + * 2020-04-01: :class:`VirtualRoutersOperations` + * 2020-05-01: :class:`VirtualRoutersOperations` + * 2020-06-01: :class:`VirtualRoutersOperations` + * 2020-07-01: :class:`VirtualRoutersOperations` + * 2020-08-01: :class:`VirtualRoutersOperations` + * 2020-11-01: :class:`VirtualRoutersOperations` + * 2021-02-01: :class:`VirtualRoutersOperations` + * 2021-05-01: :class:`VirtualRoutersOperations` + * 2021-08-01: :class:`VirtualRoutersOperations` + """ + api_version = self._get_api_version('virtual_routers') + if api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualRoutersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_routers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def virtual_wans(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VirtualWANsOperations` + * 2018-06-01: :class:`VirtualWANsOperations` + * 2018-07-01: :class:`VirtualWANsOperations` + * 2018-08-01: :class:`VirtualWansOperations` + * 2018-10-01: :class:`VirtualWansOperations` + * 2018-11-01: :class:`VirtualWansOperations` + * 2018-12-01: :class:`VirtualWansOperations` + * 2019-02-01: :class:`VirtualWansOperations` + * 2019-04-01: :class:`VirtualWansOperations` + * 2019-06-01: :class:`VirtualWansOperations` + * 2019-07-01: :class:`VirtualWansOperations` + * 2019-08-01: :class:`VirtualWansOperations` + * 2019-09-01: :class:`VirtualWansOperations` + * 2019-11-01: :class:`VirtualWansOperations` + * 2019-12-01: :class:`VirtualWansOperations` + * 2020-03-01: :class:`VirtualWansOperations` + * 2020-04-01: :class:`VirtualWansOperations` + * 2020-05-01: :class:`VirtualWansOperations` + * 2020-06-01: :class:`VirtualWansOperations` + * 2020-07-01: :class:`VirtualWansOperations` + * 2020-08-01: :class:`VirtualWansOperations` + * 2020-11-01: :class:`VirtualWansOperations` + * 2021-02-01: :class:`VirtualWansOperations` + * 2021-05-01: :class:`VirtualWansOperations` + * 2021-08-01: :class:`VirtualWansOperations` + """ + api_version = self._get_api_version('virtual_wans') + if api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VirtualWANsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VirtualWansOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'virtual_wans'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_connections(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnConnectionsOperations` + * 2018-06-01: :class:`VpnConnectionsOperations` + * 2018-07-01: :class:`VpnConnectionsOperations` + * 2018-08-01: :class:`VpnConnectionsOperations` + * 2018-10-01: :class:`VpnConnectionsOperations` + * 2018-11-01: :class:`VpnConnectionsOperations` + * 2018-12-01: :class:`VpnConnectionsOperations` + * 2019-02-01: :class:`VpnConnectionsOperations` + * 2019-04-01: :class:`VpnConnectionsOperations` + * 2019-06-01: :class:`VpnConnectionsOperations` + * 2019-07-01: :class:`VpnConnectionsOperations` + * 2019-08-01: :class:`VpnConnectionsOperations` + * 2019-09-01: :class:`VpnConnectionsOperations` + * 2019-11-01: :class:`VpnConnectionsOperations` + * 2019-12-01: :class:`VpnConnectionsOperations` + * 2020-03-01: :class:`VpnConnectionsOperations` + * 2020-04-01: :class:`VpnConnectionsOperations` + * 2020-05-01: :class:`VpnConnectionsOperations` + * 2020-06-01: :class:`VpnConnectionsOperations` + * 2020-07-01: :class:`VpnConnectionsOperations` + * 2020-08-01: :class:`VpnConnectionsOperations` + * 2020-11-01: :class:`VpnConnectionsOperations` + * 2021-02-01: :class:`VpnConnectionsOperations` + * 2021-05-01: :class:`VpnConnectionsOperations` + * 2021-08-01: :class:`VpnConnectionsOperations` + """ + api_version = self._get_api_version('vpn_connections') + if api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_gateways(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnGatewaysOperations` + * 2018-06-01: :class:`VpnGatewaysOperations` + * 2018-07-01: :class:`VpnGatewaysOperations` + * 2018-08-01: :class:`VpnGatewaysOperations` + * 2018-10-01: :class:`VpnGatewaysOperations` + * 2018-11-01: :class:`VpnGatewaysOperations` + * 2018-12-01: :class:`VpnGatewaysOperations` + * 2019-02-01: :class:`VpnGatewaysOperations` + * 2019-04-01: :class:`VpnGatewaysOperations` + * 2019-06-01: :class:`VpnGatewaysOperations` + * 2019-07-01: :class:`VpnGatewaysOperations` + * 2019-08-01: :class:`VpnGatewaysOperations` + * 2019-09-01: :class:`VpnGatewaysOperations` + * 2019-11-01: :class:`VpnGatewaysOperations` + * 2019-12-01: :class:`VpnGatewaysOperations` + * 2020-03-01: :class:`VpnGatewaysOperations` + * 2020-04-01: :class:`VpnGatewaysOperations` + * 2020-05-01: :class:`VpnGatewaysOperations` + * 2020-06-01: :class:`VpnGatewaysOperations` + * 2020-07-01: :class:`VpnGatewaysOperations` + * 2020-08-01: :class:`VpnGatewaysOperations` + * 2020-11-01: :class:`VpnGatewaysOperations` + * 2021-02-01: :class:`VpnGatewaysOperations` + * 2021-05-01: :class:`VpnGatewaysOperations` + * 2021-08-01: :class:`VpnGatewaysOperations` + """ + api_version = self._get_api_version('vpn_gateways') + if api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnGatewaysOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_gateways'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_link_connections(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnLinkConnectionsOperations` + * 2019-07-01: :class:`VpnLinkConnectionsOperations` + * 2019-08-01: :class:`VpnLinkConnectionsOperations` + * 2019-09-01: :class:`VpnLinkConnectionsOperations` + * 2019-11-01: :class:`VpnLinkConnectionsOperations` + * 2019-12-01: :class:`VpnLinkConnectionsOperations` + * 2020-03-01: :class:`VpnLinkConnectionsOperations` + * 2020-04-01: :class:`VpnLinkConnectionsOperations` + * 2020-05-01: :class:`VpnLinkConnectionsOperations` + * 2020-06-01: :class:`VpnLinkConnectionsOperations` + * 2020-07-01: :class:`VpnLinkConnectionsOperations` + * 2020-08-01: :class:`VpnLinkConnectionsOperations` + * 2020-11-01: :class:`VpnLinkConnectionsOperations` + * 2021-02-01: :class:`VpnLinkConnectionsOperations` + * 2021-05-01: :class:`VpnLinkConnectionsOperations` + * 2021-08-01: :class:`VpnLinkConnectionsOperations` + """ + api_version = self._get_api_version('vpn_link_connections') + if api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_link_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_server_configurations(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`VpnServerConfigurationsOperations` + * 2019-09-01: :class:`VpnServerConfigurationsOperations` + * 2019-11-01: :class:`VpnServerConfigurationsOperations` + * 2019-12-01: :class:`VpnServerConfigurationsOperations` + * 2020-03-01: :class:`VpnServerConfigurationsOperations` + * 2020-04-01: :class:`VpnServerConfigurationsOperations` + * 2020-05-01: :class:`VpnServerConfigurationsOperations` + * 2020-06-01: :class:`VpnServerConfigurationsOperations` + * 2020-07-01: :class:`VpnServerConfigurationsOperations` + * 2020-08-01: :class:`VpnServerConfigurationsOperations` + * 2020-11-01: :class:`VpnServerConfigurationsOperations` + * 2021-02-01: :class:`VpnServerConfigurationsOperations` + * 2021-05-01: :class:`VpnServerConfigurationsOperations` + * 2021-08-01: :class:`VpnServerConfigurationsOperations` + """ + api_version = self._get_api_version('vpn_server_configurations') + if api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_server_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_server_configurations_associated_with_virtual_wan(self): + """Instance depends on the API version: + + * 2019-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-09-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-11-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2019-12-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-03-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-04-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-05-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-06-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-07-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2020-11-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-02-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-05-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + """ + api_version = self._get_api_version('vpn_server_configurations_associated_with_virtual_wan') + if api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_server_configurations_associated_with_virtual_wan'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_site_link_connections(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-07-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-08-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-09-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-11-01: :class:`VpnSiteLinkConnectionsOperations` + * 2019-12-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-03-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-04-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-05-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-06-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-07-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-08-01: :class:`VpnSiteLinkConnectionsOperations` + * 2020-11-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-02-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-05-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-08-01: :class:`VpnSiteLinkConnectionsOperations` + """ + api_version = self._get_api_version('vpn_site_link_connections') + if api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_site_link_connections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_site_links(self): + """Instance depends on the API version: + + * 2019-06-01: :class:`VpnSiteLinksOperations` + * 2019-07-01: :class:`VpnSiteLinksOperations` + * 2019-08-01: :class:`VpnSiteLinksOperations` + * 2019-09-01: :class:`VpnSiteLinksOperations` + * 2019-11-01: :class:`VpnSiteLinksOperations` + * 2019-12-01: :class:`VpnSiteLinksOperations` + * 2020-03-01: :class:`VpnSiteLinksOperations` + * 2020-04-01: :class:`VpnSiteLinksOperations` + * 2020-05-01: :class:`VpnSiteLinksOperations` + * 2020-06-01: :class:`VpnSiteLinksOperations` + * 2020-07-01: :class:`VpnSiteLinksOperations` + * 2020-08-01: :class:`VpnSiteLinksOperations` + * 2020-11-01: :class:`VpnSiteLinksOperations` + * 2021-02-01: :class:`VpnSiteLinksOperations` + * 2021-05-01: :class:`VpnSiteLinksOperations` + * 2021-08-01: :class:`VpnSiteLinksOperations` + """ + api_version = self._get_api_version('vpn_site_links') + if api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnSiteLinksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_site_links'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_sites(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnSitesOperations` + * 2018-06-01: :class:`VpnSitesOperations` + * 2018-07-01: :class:`VpnSitesOperations` + * 2018-08-01: :class:`VpnSitesOperations` + * 2018-10-01: :class:`VpnSitesOperations` + * 2018-11-01: :class:`VpnSitesOperations` + * 2018-12-01: :class:`VpnSitesOperations` + * 2019-02-01: :class:`VpnSitesOperations` + * 2019-04-01: :class:`VpnSitesOperations` + * 2019-06-01: :class:`VpnSitesOperations` + * 2019-07-01: :class:`VpnSitesOperations` + * 2019-08-01: :class:`VpnSitesOperations` + * 2019-09-01: :class:`VpnSitesOperations` + * 2019-11-01: :class:`VpnSitesOperations` + * 2019-12-01: :class:`VpnSitesOperations` + * 2020-03-01: :class:`VpnSitesOperations` + * 2020-04-01: :class:`VpnSitesOperations` + * 2020-05-01: :class:`VpnSitesOperations` + * 2020-06-01: :class:`VpnSitesOperations` + * 2020-07-01: :class:`VpnSitesOperations` + * 2020-08-01: :class:`VpnSitesOperations` + * 2020-11-01: :class:`VpnSitesOperations` + * 2021-02-01: :class:`VpnSitesOperations` + * 2021-05-01: :class:`VpnSitesOperations` + * 2021-08-01: :class:`VpnSitesOperations` + """ + api_version = self._get_api_version('vpn_sites') + if api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnSitesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_sites'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def vpn_sites_configuration(self): + """Instance depends on the API version: + + * 2018-04-01: :class:`VpnSitesConfigurationOperations` + * 2018-06-01: :class:`VpnSitesConfigurationOperations` + * 2018-07-01: :class:`VpnSitesConfigurationOperations` + * 2018-08-01: :class:`VpnSitesConfigurationOperations` + * 2018-10-01: :class:`VpnSitesConfigurationOperations` + * 2018-11-01: :class:`VpnSitesConfigurationOperations` + * 2018-12-01: :class:`VpnSitesConfigurationOperations` + * 2019-02-01: :class:`VpnSitesConfigurationOperations` + * 2019-04-01: :class:`VpnSitesConfigurationOperations` + * 2019-06-01: :class:`VpnSitesConfigurationOperations` + * 2019-07-01: :class:`VpnSitesConfigurationOperations` + * 2019-08-01: :class:`VpnSitesConfigurationOperations` + * 2019-09-01: :class:`VpnSitesConfigurationOperations` + * 2019-11-01: :class:`VpnSitesConfigurationOperations` + * 2019-12-01: :class:`VpnSitesConfigurationOperations` + * 2020-03-01: :class:`VpnSitesConfigurationOperations` + * 2020-04-01: :class:`VpnSitesConfigurationOperations` + * 2020-05-01: :class:`VpnSitesConfigurationOperations` + * 2020-06-01: :class:`VpnSitesConfigurationOperations` + * 2020-07-01: :class:`VpnSitesConfigurationOperations` + * 2020-08-01: :class:`VpnSitesConfigurationOperations` + * 2020-11-01: :class:`VpnSitesConfigurationOperations` + * 2021-02-01: :class:`VpnSitesConfigurationOperations` + * 2021-05-01: :class:`VpnSitesConfigurationOperations` + * 2021-08-01: :class:`VpnSitesConfigurationOperations` + """ + api_version = self._get_api_version('vpn_sites_configuration') + if api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'vpn_sites_configuration'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def web_application_firewall_policies(self): + """Instance depends on the API version: + + * 2018-12-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-02-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-04-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-06-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-07-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-08-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-09-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-11-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2019-12-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-03-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-04-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-05-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-06-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-07-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-08-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2020-11-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-02-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-05-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-08-01: :class:`WebApplicationFirewallPoliciesOperations` + """ + api_version = self._get_api_version('web_application_firewall_policies') + if api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'web_application_firewall_policies'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def web_categories(self): + """Instance depends on the API version: + + * 2020-07-01: :class:`WebCategoriesOperations` + * 2020-08-01: :class:`WebCategoriesOperations` + * 2020-11-01: :class:`WebCategoriesOperations` + * 2021-02-01: :class:`WebCategoriesOperations` + * 2021-05-01: :class:`WebCategoriesOperations` + * 2021-08-01: :class:`WebCategoriesOperations` + """ + api_version = self._get_api_version('web_categories') + if api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import WebCategoriesOperations as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import WebCategoriesOperations as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import WebCategoriesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'web_categories'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + async def close(self): + await self._client.close() + async def __aenter__(self): + await self._client.__aenter__() + return self + async def __aexit__(self, *exc_details): + await self._client.__aexit__(*exc_details) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_operations_mixin.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_operations_mixin.py new file mode 100644 index 00000000000..61e16dda8af --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/aio/_operations_mixin.py @@ -0,0 +1,598 @@ +# 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 import Serializer, Deserializer +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + + +class NetworkManagementClientOperationsMixin(object): + + async def begin_delete_bastion_shareable_link( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('begin_delete_bastion_shareable_link') + if api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_delete_bastion_shareable_link'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_delete_bastion_shareable_link(resource_group_name, bastion_host_name, bsl_request, **kwargs) + + async def begin_generatevirtualwanvpnserverconfigurationvpnprofile( + self, + resource_group_name: str, + virtual_wan_name: str, + vpn_client_params: "_models.VirtualWanVpnProfileParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnProfileResponse"]: + """Generates a unique VPN profile for P2S clients for VirtualWan and associated + VpnServerConfiguration combination in the specified resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation + operation. + :type vpn_client_params: ~azure.mgmt.network.v2021_08_01.models.VirtualWanVpnProfileParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnProfileResponse or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnProfileResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('begin_generatevirtualwanvpnserverconfigurationvpnprofile') + if api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_generatevirtualwanvpnserverconfigurationvpnprofile'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_generatevirtualwanvpnserverconfigurationvpnprofile(resource_group_name, virtual_wan_name, vpn_client_params, **kwargs) + + async def begin_get_active_sessions( + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> AsyncLROPoller[AsyncItemPaged["_models.BastionActiveSessionListResult"]]: + """Returns the list of currently active sessions on the Bastion. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns an iterator like instance of either + BastionActiveSessionListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionActiveSessionListResult]] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('begin_get_active_sessions') + if api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_get_active_sessions'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_get_active_sessions(resource_group_name, bastion_host_name, **kwargs) + + async def begin_put_bastion_shareable_link( + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> AsyncLROPoller[AsyncItemPaged["_models.BastionShareableLinkListResult"]]: + """Creates a Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns an iterator like instance of either + BastionShareableLinkListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListResult]] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('begin_put_bastion_shareable_link') + if api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_put_bastion_shareable_link'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_put_bastion_shareable_link(resource_group_name, bastion_host_name, bsl_request, **kwargs) + + async def check_dns_name_availability( + self, + location: str, + domain_name_label: str, + **kwargs: Any + ) -> "_models.DnsNameAvailabilityResult": + """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + + :param location: The location of the domain name. + :type location: str + :param domain_name_label: The domain name to be verified. It must conform to the following + regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + :type domain_name_label: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DnsNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DnsNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('check_dns_name_availability') + if api_version == '2015-06-15': + from ..v2015_06_15.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2016-09-01': + from ..v2016_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2016-12-01': + from ..v2016_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2017-03-01': + from ..v2017_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2017-06-01': + from ..v2017_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2017-10-01': + from ..v2017_10_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-01-01': + from ..v2018_01_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-02-01': + from ..v2018_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-04-01': + from ..v2018_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-06-01': + from ..v2018_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-07-01': + from ..v2018_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'check_dns_name_availability'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.check_dns_name_availability(location, domain_name_label, **kwargs) + + def disconnect_active_sessions( + self, + resource_group_name: str, + bastion_host_name: str, + session_ids: "_models.SessionIds", + **kwargs: Any + ) -> AsyncIterable["_models.BastionSessionDeleteResult"]: + """Returns the list of currently active sessions on the Bastion. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param session_ids: The list of sessionids to disconnect. + :type session_ids: ~azure.mgmt.network.v2021_08_01.models.SessionIds + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionSessionDeleteResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionSessionDeleteResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('disconnect_active_sessions') + if api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'disconnect_active_sessions'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.disconnect_active_sessions(resource_group_name, bastion_host_name, session_ids, **kwargs) + + def get_bastion_shareable_link( + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> AsyncIterable["_models.BastionShareableLinkListResult"]: + """Return the Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionShareableLinkListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('get_bastion_shareable_link') + if api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'get_bastion_shareable_link'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.get_bastion_shareable_link(resource_group_name, bastion_host_name, bsl_request, **kwargs) + + async def supported_security_providers( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> "_models.VirtualWanSecurityProviders": + """Gives the supported security providers for the virtual wan. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN for which supported security providers are + needed. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWanSecurityProviders, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProviders + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('supported_security_providers') + if api_version == '2018-08-01': + from ..v2018_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-10-01': + from ..v2018_10_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-11-01': + from ..v2018_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2018-12-01': + from ..v2018_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-02-01': + from ..v2019_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-04-01': + from ..v2019_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-06-01': + from ..v2019_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-07-01': + from ..v2019_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-08-01': + from ..v2019_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-09-01': + from ..v2019_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-11-01': + from ..v2019_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2019-12-01': + from ..v2019_12_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-03-01': + from ..v2020_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-04-01': + from ..v2020_04_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-05-01': + from ..v2020_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-06-01': + from ..v2020_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-07-01': + from ..v2020_07_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-08-01': + from ..v2020_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2020-11-01': + from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-02-01': + from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-08-01': + from ..v2021_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'supported_security_providers'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.supported_security_providers(resource_group_name, virtual_wan_name, **kwargs) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/models.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/models.py new file mode 100644 index 00000000000..10eaf12d6f8 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/models.py @@ -0,0 +1,11 @@ +# 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. +# -------------------------------------------------------------------------- +from .v2019_02_01.models import * +from .v2019_07_01.models import * +from .v2020_04_01.models import * +from .v2021_02_01_preview.models import * +from .v2021_08_01.models import * diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/__init__.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/__init__.py new file mode 100644 index 00000000000..3afadffd3a4 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/__init__.py @@ -0,0 +1,18 @@ +# 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 ._network_management_client import NetworkManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['NetworkManagementClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_configuration.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_configuration.py new file mode 100644 index 00000000000..f082cd3af34 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_configuration.py @@ -0,0 +1,68 @@ +# 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 typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class NetworkManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for NetworkManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft + Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(NetworkManagementClientConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-network/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_network_management_client.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_network_management_client.py new file mode 100644 index 00000000000..7cbd015b7b4 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_network_management_client.py @@ -0,0 +1,531 @@ +# 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 copy import deepcopy +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core.rest import HttpRequest, HttpResponse +from azure.mgmt.core import ARMPipelineClient + +from . import models +from ._configuration import NetworkManagementClientConfiguration +from .operations import ApplicationGatewayPrivateEndpointConnectionsOperations, ApplicationGatewayPrivateLinkResourcesOperations, ApplicationGatewaysOperations, ApplicationSecurityGroupsOperations, AvailableDelegationsOperations, AvailableEndpointServicesOperations, AvailablePrivateEndpointTypesOperations, AvailableResourceGroupDelegationsOperations, AvailableServiceAliasesOperations, AzureFirewallFqdnTagsOperations, AzureFirewallsOperations, BastionHostsOperations, BgpServiceCommunitiesOperations, ConfigurationPolicyGroupsOperations, ConnectionMonitorsOperations, CustomIPPrefixesOperations, DdosCustomPoliciesOperations, DdosProtectionPlansOperations, DefaultSecurityRulesOperations, DscpConfigurationOperations, ExpressRouteCircuitAuthorizationsOperations, ExpressRouteCircuitConnectionsOperations, ExpressRouteCircuitPeeringsOperations, ExpressRouteCircuitsOperations, ExpressRouteConnectionsOperations, ExpressRouteCrossConnectionPeeringsOperations, ExpressRouteCrossConnectionsOperations, ExpressRouteGatewaysOperations, ExpressRouteLinksOperations, ExpressRoutePortAuthorizationsOperations, ExpressRoutePortsLocationsOperations, ExpressRoutePortsOperations, ExpressRouteServiceProvidersOperations, FirewallPoliciesOperations, FirewallPolicyIdpsSignaturesFilterValuesOperations, FirewallPolicyIdpsSignaturesOperations, FirewallPolicyIdpsSignaturesOverridesOperations, FirewallPolicyRuleCollectionGroupsOperations, FlowLogsOperations, HubRouteTablesOperations, HubVirtualNetworkConnectionsOperations, InboundNatRulesOperations, InboundSecurityRuleOperations, IpAllocationsOperations, IpGroupsOperations, LoadBalancerBackendAddressPoolsOperations, LoadBalancerFrontendIPConfigurationsOperations, LoadBalancerLoadBalancingRulesOperations, LoadBalancerNetworkInterfacesOperations, LoadBalancerOutboundRulesOperations, LoadBalancerProbesOperations, LoadBalancersOperations, LocalNetworkGatewaysOperations, NatGatewaysOperations, NatRulesOperations, NetworkInterfaceIPConfigurationsOperations, NetworkInterfaceLoadBalancersOperations, NetworkInterfaceTapConfigurationsOperations, NetworkInterfacesOperations, NetworkManagementClientOperationsMixin, NetworkProfilesOperations, NetworkSecurityGroupsOperations, NetworkVirtualAppliancesOperations, NetworkWatchersOperations, Operations, P2SVpnGatewaysOperations, PacketCapturesOperations, PeerExpressRouteCircuitConnectionsOperations, PrivateDnsZoneGroupsOperations, PrivateEndpointsOperations, PrivateLinkServicesOperations, PublicIPAddressesOperations, PublicIPPrefixesOperations, ResourceNavigationLinksOperations, RouteFilterRulesOperations, RouteFiltersOperations, RouteTablesOperations, RoutesOperations, RoutingIntentOperations, SecurityPartnerProvidersOperations, SecurityRulesOperations, ServiceAssociationLinksOperations, ServiceEndpointPoliciesOperations, ServiceEndpointPolicyDefinitionsOperations, ServiceTagInformationOperations, ServiceTagsOperations, SubnetsOperations, UsagesOperations, VirtualApplianceSitesOperations, VirtualApplianceSkusOperations, VirtualHubBgpConnectionOperations, VirtualHubBgpConnectionsOperations, VirtualHubIpConfigurationOperations, VirtualHubRouteTableV2SOperations, VirtualHubsOperations, VirtualNetworkGatewayConnectionsOperations, VirtualNetworkGatewayNatRulesOperations, VirtualNetworkGatewaysOperations, VirtualNetworkPeeringsOperations, VirtualNetworkTapsOperations, VirtualNetworksOperations, VirtualRouterPeeringsOperations, VirtualRoutersOperations, VirtualWansOperations, VpnConnectionsOperations, VpnGatewaysOperations, VpnLinkConnectionsOperations, VpnServerConfigurationsAssociatedWithVirtualWanOperations, VpnServerConfigurationsOperations, VpnSiteLinkConnectionsOperations, VpnSiteLinksOperations, VpnSitesConfigurationOperations, VpnSitesOperations, WebApplicationFirewallPoliciesOperations, WebCategoriesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + +class NetworkManagementClient(NetworkManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes + """Network Client. + + :ivar application_gateways: ApplicationGatewaysOperations operations + :vartype application_gateways: + azure.mgmt.network.v2021_08_01.operations.ApplicationGatewaysOperations + :ivar application_gateway_private_link_resources: + ApplicationGatewayPrivateLinkResourcesOperations operations + :vartype application_gateway_private_link_resources: + azure.mgmt.network.v2021_08_01.operations.ApplicationGatewayPrivateLinkResourcesOperations + :ivar application_gateway_private_endpoint_connections: + ApplicationGatewayPrivateEndpointConnectionsOperations operations + :vartype application_gateway_private_endpoint_connections: + azure.mgmt.network.v2021_08_01.operations.ApplicationGatewayPrivateEndpointConnectionsOperations + :ivar application_security_groups: ApplicationSecurityGroupsOperations operations + :vartype application_security_groups: + azure.mgmt.network.v2021_08_01.operations.ApplicationSecurityGroupsOperations + :ivar available_delegations: AvailableDelegationsOperations operations + :vartype available_delegations: + azure.mgmt.network.v2021_08_01.operations.AvailableDelegationsOperations + :ivar available_resource_group_delegations: AvailableResourceGroupDelegationsOperations + operations + :vartype available_resource_group_delegations: + azure.mgmt.network.v2021_08_01.operations.AvailableResourceGroupDelegationsOperations + :ivar available_service_aliases: AvailableServiceAliasesOperations operations + :vartype available_service_aliases: + azure.mgmt.network.v2021_08_01.operations.AvailableServiceAliasesOperations + :ivar azure_firewalls: AzureFirewallsOperations operations + :vartype azure_firewalls: azure.mgmt.network.v2021_08_01.operations.AzureFirewallsOperations + :ivar azure_firewall_fqdn_tags: AzureFirewallFqdnTagsOperations operations + :vartype azure_firewall_fqdn_tags: + azure.mgmt.network.v2021_08_01.operations.AzureFirewallFqdnTagsOperations + :ivar web_categories: WebCategoriesOperations operations + :vartype web_categories: azure.mgmt.network.v2021_08_01.operations.WebCategoriesOperations + :ivar bastion_hosts: BastionHostsOperations operations + :vartype bastion_hosts: azure.mgmt.network.v2021_08_01.operations.BastionHostsOperations + :ivar network_interfaces: NetworkInterfacesOperations operations + :vartype network_interfaces: + azure.mgmt.network.v2021_08_01.operations.NetworkInterfacesOperations + :ivar public_ip_addresses: PublicIPAddressesOperations operations + :vartype public_ip_addresses: + azure.mgmt.network.v2021_08_01.operations.PublicIPAddressesOperations + :ivar custom_ip_prefixes: CustomIPPrefixesOperations operations + :vartype custom_ip_prefixes: + azure.mgmt.network.v2021_08_01.operations.CustomIPPrefixesOperations + :ivar ddos_custom_policies: DdosCustomPoliciesOperations operations + :vartype ddos_custom_policies: + azure.mgmt.network.v2021_08_01.operations.DdosCustomPoliciesOperations + :ivar ddos_protection_plans: DdosProtectionPlansOperations operations + :vartype ddos_protection_plans: + azure.mgmt.network.v2021_08_01.operations.DdosProtectionPlansOperations + :ivar dscp_configuration: DscpConfigurationOperations operations + :vartype dscp_configuration: + azure.mgmt.network.v2021_08_01.operations.DscpConfigurationOperations + :ivar available_endpoint_services: AvailableEndpointServicesOperations operations + :vartype available_endpoint_services: + azure.mgmt.network.v2021_08_01.operations.AvailableEndpointServicesOperations + :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations + operations + :vartype express_route_circuit_authorizations: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteCircuitAuthorizationsOperations + :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations + :vartype express_route_circuit_peerings: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteCircuitPeeringsOperations + :ivar express_route_circuit_connections: ExpressRouteCircuitConnectionsOperations operations + :vartype express_route_circuit_connections: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteCircuitConnectionsOperations + :ivar peer_express_route_circuit_connections: PeerExpressRouteCircuitConnectionsOperations + operations + :vartype peer_express_route_circuit_connections: + azure.mgmt.network.v2021_08_01.operations.PeerExpressRouteCircuitConnectionsOperations + :ivar express_route_circuits: ExpressRouteCircuitsOperations operations + :vartype express_route_circuits: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteCircuitsOperations + :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations + :vartype express_route_service_providers: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteServiceProvidersOperations + :ivar express_route_cross_connections: ExpressRouteCrossConnectionsOperations operations + :vartype express_route_cross_connections: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteCrossConnectionsOperations + :ivar express_route_cross_connection_peerings: ExpressRouteCrossConnectionPeeringsOperations + operations + :vartype express_route_cross_connection_peerings: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteCrossConnectionPeeringsOperations + :ivar express_route_ports_locations: ExpressRoutePortsLocationsOperations operations + :vartype express_route_ports_locations: + azure.mgmt.network.v2021_08_01.operations.ExpressRoutePortsLocationsOperations + :ivar express_route_ports: ExpressRoutePortsOperations operations + :vartype express_route_ports: + azure.mgmt.network.v2021_08_01.operations.ExpressRoutePortsOperations + :ivar express_route_links: ExpressRouteLinksOperations operations + :vartype express_route_links: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteLinksOperations + :ivar express_route_port_authorizations: ExpressRoutePortAuthorizationsOperations operations + :vartype express_route_port_authorizations: + azure.mgmt.network.v2021_08_01.operations.ExpressRoutePortAuthorizationsOperations + :ivar firewall_policies: FirewallPoliciesOperations operations + :vartype firewall_policies: + azure.mgmt.network.v2021_08_01.operations.FirewallPoliciesOperations + :ivar firewall_policy_rule_collection_groups: FirewallPolicyRuleCollectionGroupsOperations + operations + :vartype firewall_policy_rule_collection_groups: + azure.mgmt.network.v2021_08_01.operations.FirewallPolicyRuleCollectionGroupsOperations + :ivar firewall_policy_idps_signatures: FirewallPolicyIdpsSignaturesOperations operations + :vartype firewall_policy_idps_signatures: + azure.mgmt.network.v2021_08_01.operations.FirewallPolicyIdpsSignaturesOperations + :ivar firewall_policy_idps_signatures_overrides: + FirewallPolicyIdpsSignaturesOverridesOperations operations + :vartype firewall_policy_idps_signatures_overrides: + azure.mgmt.network.v2021_08_01.operations.FirewallPolicyIdpsSignaturesOverridesOperations + :ivar firewall_policy_idps_signatures_filter_values: + FirewallPolicyIdpsSignaturesFilterValuesOperations operations + :vartype firewall_policy_idps_signatures_filter_values: + azure.mgmt.network.v2021_08_01.operations.FirewallPolicyIdpsSignaturesFilterValuesOperations + :ivar ip_allocations: IpAllocationsOperations operations + :vartype ip_allocations: azure.mgmt.network.v2021_08_01.operations.IpAllocationsOperations + :ivar ip_groups: IpGroupsOperations operations + :vartype ip_groups: azure.mgmt.network.v2021_08_01.operations.IpGroupsOperations + :ivar load_balancers: LoadBalancersOperations operations + :vartype load_balancers: azure.mgmt.network.v2021_08_01.operations.LoadBalancersOperations + :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations + :vartype load_balancer_backend_address_pools: + azure.mgmt.network.v2021_08_01.operations.LoadBalancerBackendAddressPoolsOperations + :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations + operations + :vartype load_balancer_frontend_ip_configurations: + azure.mgmt.network.v2021_08_01.operations.LoadBalancerFrontendIPConfigurationsOperations + :ivar inbound_nat_rules: InboundNatRulesOperations operations + :vartype inbound_nat_rules: azure.mgmt.network.v2021_08_01.operations.InboundNatRulesOperations + :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations + :vartype load_balancer_load_balancing_rules: + azure.mgmt.network.v2021_08_01.operations.LoadBalancerLoadBalancingRulesOperations + :ivar load_balancer_outbound_rules: LoadBalancerOutboundRulesOperations operations + :vartype load_balancer_outbound_rules: + azure.mgmt.network.v2021_08_01.operations.LoadBalancerOutboundRulesOperations + :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations + :vartype load_balancer_network_interfaces: + azure.mgmt.network.v2021_08_01.operations.LoadBalancerNetworkInterfacesOperations + :ivar load_balancer_probes: LoadBalancerProbesOperations operations + :vartype load_balancer_probes: + azure.mgmt.network.v2021_08_01.operations.LoadBalancerProbesOperations + :ivar nat_gateways: NatGatewaysOperations operations + :vartype nat_gateways: azure.mgmt.network.v2021_08_01.operations.NatGatewaysOperations + :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations + operations + :vartype network_interface_ip_configurations: + azure.mgmt.network.v2021_08_01.operations.NetworkInterfaceIPConfigurationsOperations + :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations + :vartype network_interface_load_balancers: + azure.mgmt.network.v2021_08_01.operations.NetworkInterfaceLoadBalancersOperations + :ivar network_interface_tap_configurations: NetworkInterfaceTapConfigurationsOperations + operations + :vartype network_interface_tap_configurations: + azure.mgmt.network.v2021_08_01.operations.NetworkInterfaceTapConfigurationsOperations + :ivar network_profiles: NetworkProfilesOperations operations + :vartype network_profiles: azure.mgmt.network.v2021_08_01.operations.NetworkProfilesOperations + :ivar network_security_groups: NetworkSecurityGroupsOperations operations + :vartype network_security_groups: + azure.mgmt.network.v2021_08_01.operations.NetworkSecurityGroupsOperations + :ivar security_rules: SecurityRulesOperations operations + :vartype security_rules: azure.mgmt.network.v2021_08_01.operations.SecurityRulesOperations + :ivar default_security_rules: DefaultSecurityRulesOperations operations + :vartype default_security_rules: + azure.mgmt.network.v2021_08_01.operations.DefaultSecurityRulesOperations + :ivar network_virtual_appliances: NetworkVirtualAppliancesOperations operations + :vartype network_virtual_appliances: + azure.mgmt.network.v2021_08_01.operations.NetworkVirtualAppliancesOperations + :ivar virtual_appliance_sites: VirtualApplianceSitesOperations operations + :vartype virtual_appliance_sites: + azure.mgmt.network.v2021_08_01.operations.VirtualApplianceSitesOperations + :ivar virtual_appliance_skus: VirtualApplianceSkusOperations operations + :vartype virtual_appliance_skus: + azure.mgmt.network.v2021_08_01.operations.VirtualApplianceSkusOperations + :ivar inbound_security_rule: InboundSecurityRuleOperations operations + :vartype inbound_security_rule: + azure.mgmt.network.v2021_08_01.operations.InboundSecurityRuleOperations + :ivar network_watchers: NetworkWatchersOperations operations + :vartype network_watchers: azure.mgmt.network.v2021_08_01.operations.NetworkWatchersOperations + :ivar packet_captures: PacketCapturesOperations operations + :vartype packet_captures: azure.mgmt.network.v2021_08_01.operations.PacketCapturesOperations + :ivar connection_monitors: ConnectionMonitorsOperations operations + :vartype connection_monitors: + azure.mgmt.network.v2021_08_01.operations.ConnectionMonitorsOperations + :ivar flow_logs: FlowLogsOperations operations + :vartype flow_logs: azure.mgmt.network.v2021_08_01.operations.FlowLogsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.network.v2021_08_01.operations.Operations + :ivar private_endpoints: PrivateEndpointsOperations operations + :vartype private_endpoints: + azure.mgmt.network.v2021_08_01.operations.PrivateEndpointsOperations + :ivar available_private_endpoint_types: AvailablePrivateEndpointTypesOperations operations + :vartype available_private_endpoint_types: + azure.mgmt.network.v2021_08_01.operations.AvailablePrivateEndpointTypesOperations + :ivar private_dns_zone_groups: PrivateDnsZoneGroupsOperations operations + :vartype private_dns_zone_groups: + azure.mgmt.network.v2021_08_01.operations.PrivateDnsZoneGroupsOperations + :ivar private_link_services: PrivateLinkServicesOperations operations + :vartype private_link_services: + azure.mgmt.network.v2021_08_01.operations.PrivateLinkServicesOperations + :ivar public_ip_prefixes: PublicIPPrefixesOperations operations + :vartype public_ip_prefixes: + azure.mgmt.network.v2021_08_01.operations.PublicIPPrefixesOperations + :ivar route_filters: RouteFiltersOperations operations + :vartype route_filters: azure.mgmt.network.v2021_08_01.operations.RouteFiltersOperations + :ivar route_filter_rules: RouteFilterRulesOperations operations + :vartype route_filter_rules: + azure.mgmt.network.v2021_08_01.operations.RouteFilterRulesOperations + :ivar route_tables: RouteTablesOperations operations + :vartype route_tables: azure.mgmt.network.v2021_08_01.operations.RouteTablesOperations + :ivar routes: RoutesOperations operations + :vartype routes: azure.mgmt.network.v2021_08_01.operations.RoutesOperations + :ivar security_partner_providers: SecurityPartnerProvidersOperations operations + :vartype security_partner_providers: + azure.mgmt.network.v2021_08_01.operations.SecurityPartnerProvidersOperations + :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations + :vartype bgp_service_communities: + azure.mgmt.network.v2021_08_01.operations.BgpServiceCommunitiesOperations + :ivar service_endpoint_policies: ServiceEndpointPoliciesOperations operations + :vartype service_endpoint_policies: + azure.mgmt.network.v2021_08_01.operations.ServiceEndpointPoliciesOperations + :ivar service_endpoint_policy_definitions: ServiceEndpointPolicyDefinitionsOperations + operations + :vartype service_endpoint_policy_definitions: + azure.mgmt.network.v2021_08_01.operations.ServiceEndpointPolicyDefinitionsOperations + :ivar service_tags: ServiceTagsOperations operations + :vartype service_tags: azure.mgmt.network.v2021_08_01.operations.ServiceTagsOperations + :ivar service_tag_information: ServiceTagInformationOperations operations + :vartype service_tag_information: + azure.mgmt.network.v2021_08_01.operations.ServiceTagInformationOperations + :ivar usages: UsagesOperations operations + :vartype usages: azure.mgmt.network.v2021_08_01.operations.UsagesOperations + :ivar virtual_networks: VirtualNetworksOperations operations + :vartype virtual_networks: azure.mgmt.network.v2021_08_01.operations.VirtualNetworksOperations + :ivar subnets: SubnetsOperations operations + :vartype subnets: azure.mgmt.network.v2021_08_01.operations.SubnetsOperations + :ivar resource_navigation_links: ResourceNavigationLinksOperations operations + :vartype resource_navigation_links: + azure.mgmt.network.v2021_08_01.operations.ResourceNavigationLinksOperations + :ivar service_association_links: ServiceAssociationLinksOperations operations + :vartype service_association_links: + azure.mgmt.network.v2021_08_01.operations.ServiceAssociationLinksOperations + :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations + :vartype virtual_network_peerings: + azure.mgmt.network.v2021_08_01.operations.VirtualNetworkPeeringsOperations + :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations + :vartype virtual_network_gateways: + azure.mgmt.network.v2021_08_01.operations.VirtualNetworkGatewaysOperations + :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations + operations + :vartype virtual_network_gateway_connections: + azure.mgmt.network.v2021_08_01.operations.VirtualNetworkGatewayConnectionsOperations + :ivar local_network_gateways: LocalNetworkGatewaysOperations operations + :vartype local_network_gateways: + azure.mgmt.network.v2021_08_01.operations.LocalNetworkGatewaysOperations + :ivar virtual_network_gateway_nat_rules: VirtualNetworkGatewayNatRulesOperations operations + :vartype virtual_network_gateway_nat_rules: + azure.mgmt.network.v2021_08_01.operations.VirtualNetworkGatewayNatRulesOperations + :ivar virtual_network_taps: VirtualNetworkTapsOperations operations + :vartype virtual_network_taps: + azure.mgmt.network.v2021_08_01.operations.VirtualNetworkTapsOperations + :ivar virtual_routers: VirtualRoutersOperations operations + :vartype virtual_routers: azure.mgmt.network.v2021_08_01.operations.VirtualRoutersOperations + :ivar virtual_router_peerings: VirtualRouterPeeringsOperations operations + :vartype virtual_router_peerings: + azure.mgmt.network.v2021_08_01.operations.VirtualRouterPeeringsOperations + :ivar virtual_wans: VirtualWansOperations operations + :vartype virtual_wans: azure.mgmt.network.v2021_08_01.operations.VirtualWansOperations + :ivar vpn_sites: VpnSitesOperations operations + :vartype vpn_sites: azure.mgmt.network.v2021_08_01.operations.VpnSitesOperations + :ivar vpn_site_links: VpnSiteLinksOperations operations + :vartype vpn_site_links: azure.mgmt.network.v2021_08_01.operations.VpnSiteLinksOperations + :ivar vpn_sites_configuration: VpnSitesConfigurationOperations operations + :vartype vpn_sites_configuration: + azure.mgmt.network.v2021_08_01.operations.VpnSitesConfigurationOperations + :ivar vpn_server_configurations: VpnServerConfigurationsOperations operations + :vartype vpn_server_configurations: + azure.mgmt.network.v2021_08_01.operations.VpnServerConfigurationsOperations + :ivar configuration_policy_groups: ConfigurationPolicyGroupsOperations operations + :vartype configuration_policy_groups: + azure.mgmt.network.v2021_08_01.operations.ConfigurationPolicyGroupsOperations + :ivar virtual_hubs: VirtualHubsOperations operations + :vartype virtual_hubs: azure.mgmt.network.v2021_08_01.operations.VirtualHubsOperations + :ivar hub_virtual_network_connections: HubVirtualNetworkConnectionsOperations operations + :vartype hub_virtual_network_connections: + azure.mgmt.network.v2021_08_01.operations.HubVirtualNetworkConnectionsOperations + :ivar vpn_gateways: VpnGatewaysOperations operations + :vartype vpn_gateways: azure.mgmt.network.v2021_08_01.operations.VpnGatewaysOperations + :ivar vpn_link_connections: VpnLinkConnectionsOperations operations + :vartype vpn_link_connections: + azure.mgmt.network.v2021_08_01.operations.VpnLinkConnectionsOperations + :ivar vpn_connections: VpnConnectionsOperations operations + :vartype vpn_connections: azure.mgmt.network.v2021_08_01.operations.VpnConnectionsOperations + :ivar vpn_site_link_connections: VpnSiteLinkConnectionsOperations operations + :vartype vpn_site_link_connections: + azure.mgmt.network.v2021_08_01.operations.VpnSiteLinkConnectionsOperations + :ivar nat_rules: NatRulesOperations operations + :vartype nat_rules: azure.mgmt.network.v2021_08_01.operations.NatRulesOperations + :ivar p2_svpn_gateways: P2SVpnGatewaysOperations operations + :vartype p2_svpn_gateways: azure.mgmt.network.v2021_08_01.operations.P2SVpnGatewaysOperations + :ivar vpn_server_configurations_associated_with_virtual_wan: + VpnServerConfigurationsAssociatedWithVirtualWanOperations operations + :vartype vpn_server_configurations_associated_with_virtual_wan: + azure.mgmt.network.v2021_08_01.operations.VpnServerConfigurationsAssociatedWithVirtualWanOperations + :ivar virtual_hub_route_table_v2_s: VirtualHubRouteTableV2SOperations operations + :vartype virtual_hub_route_table_v2_s: + azure.mgmt.network.v2021_08_01.operations.VirtualHubRouteTableV2SOperations + :ivar express_route_gateways: ExpressRouteGatewaysOperations operations + :vartype express_route_gateways: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteGatewaysOperations + :ivar express_route_connections: ExpressRouteConnectionsOperations operations + :vartype express_route_connections: + azure.mgmt.network.v2021_08_01.operations.ExpressRouteConnectionsOperations + :ivar virtual_hub_bgp_connection: VirtualHubBgpConnectionOperations operations + :vartype virtual_hub_bgp_connection: + azure.mgmt.network.v2021_08_01.operations.VirtualHubBgpConnectionOperations + :ivar virtual_hub_bgp_connections: VirtualHubBgpConnectionsOperations operations + :vartype virtual_hub_bgp_connections: + azure.mgmt.network.v2021_08_01.operations.VirtualHubBgpConnectionsOperations + :ivar virtual_hub_ip_configuration: VirtualHubIpConfigurationOperations operations + :vartype virtual_hub_ip_configuration: + azure.mgmt.network.v2021_08_01.operations.VirtualHubIpConfigurationOperations + :ivar hub_route_tables: HubRouteTablesOperations operations + :vartype hub_route_tables: azure.mgmt.network.v2021_08_01.operations.HubRouteTablesOperations + :ivar routing_intent: RoutingIntentOperations operations + :vartype routing_intent: azure.mgmt.network.v2021_08_01.operations.RoutingIntentOperations + :ivar web_application_firewall_policies: WebApplicationFirewallPoliciesOperations operations + :vartype web_application_firewall_policies: + azure.mgmt.network.v2021_08_01.operations.WebApplicationFirewallPoliciesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft + Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = NetworkManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.application_gateways = ApplicationGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.application_gateway_private_link_resources = ApplicationGatewayPrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.application_gateway_private_endpoint_connections = ApplicationGatewayPrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.application_security_groups = ApplicationSecurityGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_delegations = AvailableDelegationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_resource_group_delegations = AvailableResourceGroupDelegationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_service_aliases = AvailableServiceAliasesOperations(self._client, self._config, self._serialize, self._deserialize) + self.azure_firewalls = AzureFirewallsOperations(self._client, self._config, self._serialize, self._deserialize) + self.azure_firewall_fqdn_tags = AzureFirewallFqdnTagsOperations(self._client, self._config, self._serialize, self._deserialize) + self.web_categories = WebCategoriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.bastion_hosts = BastionHostsOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_interfaces = NetworkInterfacesOperations(self._client, self._config, self._serialize, self._deserialize) + self.public_ip_addresses = PublicIPAddressesOperations(self._client, self._config, self._serialize, self._deserialize) + self.custom_ip_prefixes = CustomIPPrefixesOperations(self._client, self._config, self._serialize, self._deserialize) + self.ddos_custom_policies = DdosCustomPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.ddos_protection_plans = DdosProtectionPlansOperations(self._client, self._config, self._serialize, self._deserialize) + self.dscp_configuration = DscpConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_endpoint_services = AvailableEndpointServicesOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_connections = ExpressRouteCircuitConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.peer_express_route_circuit_connections = PeerExpressRouteCircuitConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuits = ExpressRouteCircuitsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_service_providers = ExpressRouteServiceProvidersOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_cross_connections = ExpressRouteCrossConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_cross_connection_peerings = ExpressRouteCrossConnectionPeeringsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_ports_locations = ExpressRoutePortsLocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_ports = ExpressRoutePortsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_links = ExpressRouteLinksOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_port_authorizations = ExpressRoutePortAuthorizationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policies = FirewallPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_rule_collection_groups = FirewallPolicyRuleCollectionGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures = FirewallPolicyIdpsSignaturesOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures_overrides = FirewallPolicyIdpsSignaturesOverridesOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures_filter_values = FirewallPolicyIdpsSignaturesFilterValuesOperations(self._client, self._config, self._serialize, self._deserialize) + self.ip_allocations = IpAllocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.ip_groups = IpGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancers = LoadBalancersOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.inbound_nat_rules = InboundNatRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_outbound_rules = LoadBalancerOutboundRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_probes = LoadBalancerProbesOperations(self._client, self._config, self._serialize, self._deserialize) + self.nat_gateways = NatGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_interface_tap_configurations = NetworkInterfaceTapConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_profiles = NetworkProfilesOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_security_groups = NetworkSecurityGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.security_rules = SecurityRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.default_security_rules = DefaultSecurityRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_virtual_appliances = NetworkVirtualAppliancesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_appliance_sites = VirtualApplianceSitesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_appliance_skus = VirtualApplianceSkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.inbound_security_rule = InboundSecurityRuleOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_watchers = NetworkWatchersOperations(self._client, self._config, self._serialize, self._deserialize) + self.packet_captures = PacketCapturesOperations(self._client, self._config, self._serialize, self._deserialize) + self.connection_monitors = ConnectionMonitorsOperations(self._client, self._config, self._serialize, self._deserialize) + self.flow_logs = FlowLogsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoints = PrivateEndpointsOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_private_endpoint_types = AvailablePrivateEndpointTypesOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_dns_zone_groups = PrivateDnsZoneGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_link_services = PrivateLinkServicesOperations(self._client, self._config, self._serialize, self._deserialize) + self.public_ip_prefixes = PublicIPPrefixesOperations(self._client, self._config, self._serialize, self._deserialize) + self.route_filters = RouteFiltersOperations(self._client, self._config, self._serialize, self._deserialize) + self.route_filter_rules = RouteFilterRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.route_tables = RouteTablesOperations(self._client, self._config, self._serialize, self._deserialize) + self.routes = RoutesOperations(self._client, self._config, self._serialize, self._deserialize) + self.security_partner_providers = SecurityPartnerProvidersOperations(self._client, self._config, self._serialize, self._deserialize) + self.bgp_service_communities = BgpServiceCommunitiesOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_endpoint_policies = ServiceEndpointPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_endpoint_policy_definitions = ServiceEndpointPolicyDefinitionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_tags = ServiceTagsOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_tag_information = ServiceTagInformationOperations(self._client, self._config, self._serialize, self._deserialize) + self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_networks = VirtualNetworksOperations(self._client, self._config, self._serialize, self._deserialize) + self.subnets = SubnetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.resource_navigation_links = ResourceNavigationLinksOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_association_links = ServiceAssociationLinksOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_peerings = VirtualNetworkPeeringsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateways = VirtualNetworkGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.local_network_gateways = LocalNetworkGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateway_nat_rules = VirtualNetworkGatewayNatRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_taps = VirtualNetworkTapsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_routers = VirtualRoutersOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_router_peerings = VirtualRouterPeeringsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_wans = VirtualWansOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_sites = VpnSitesOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_site_links = VpnSiteLinksOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_sites_configuration = VpnSitesConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_server_configurations = VpnServerConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.configuration_policy_groups = ConfigurationPolicyGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hubs = VirtualHubsOperations(self._client, self._config, self._serialize, self._deserialize) + self.hub_virtual_network_connections = HubVirtualNetworkConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_gateways = VpnGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_link_connections = VpnLinkConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_connections = VpnConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_site_link_connections = VpnSiteLinkConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.nat_rules = NatRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.p2_svpn_gateways = P2SVpnGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_server_configurations_associated_with_virtual_wan = VpnServerConfigurationsAssociatedWithVirtualWanOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_route_table_v2_s = VirtualHubRouteTableV2SOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_gateways = ExpressRouteGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_connections = ExpressRouteConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_bgp_connection = VirtualHubBgpConnectionOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_bgp_connections = VirtualHubBgpConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_ip_configuration = VirtualHubIpConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) + self.hub_route_tables = HubRouteTablesOperations(self._client, self._config, self._serialize, self._deserialize) + self.routing_intent = RoutingIntentOperations(self._client, self._config, self._serialize, self._deserialize) + self.web_application_firewall_policies = WebApplicationFirewallPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> NetworkManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_patch.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_patch.py new file mode 100644 index 00000000000..74e48ecd07c --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_vendor.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_vendor.py new file mode 100644 index 00000000000..138f663c53a --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# 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 azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_version.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_version.py new file mode 100644 index 00000000000..e5754a47ce6 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/_version.py @@ -0,0 +1,9 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/__init__.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/__init__.py new file mode 100644 index 00000000000..6affaa922de --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/__init__.py @@ -0,0 +1,15 @@ +# 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 ._network_management_client import NetworkManagementClient +__all__ = ['NetworkManagementClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_configuration.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_configuration.py new file mode 100644 index 00000000000..86d05cdb646 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# 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 typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class NetworkManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for NetworkManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft + Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(NetworkManagementClientConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-network/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_network_management_client.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_network_management_client.py new file mode 100644 index 00000000000..dd9dfec2630 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_network_management_client.py @@ -0,0 +1,538 @@ +# 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 copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from .. import models +from ._configuration import NetworkManagementClientConfiguration +from .operations import ApplicationGatewayPrivateEndpointConnectionsOperations, ApplicationGatewayPrivateLinkResourcesOperations, ApplicationGatewaysOperations, ApplicationSecurityGroupsOperations, AvailableDelegationsOperations, AvailableEndpointServicesOperations, AvailablePrivateEndpointTypesOperations, AvailableResourceGroupDelegationsOperations, AvailableServiceAliasesOperations, AzureFirewallFqdnTagsOperations, AzureFirewallsOperations, BastionHostsOperations, BgpServiceCommunitiesOperations, ConfigurationPolicyGroupsOperations, ConnectionMonitorsOperations, CustomIPPrefixesOperations, DdosCustomPoliciesOperations, DdosProtectionPlansOperations, DefaultSecurityRulesOperations, DscpConfigurationOperations, ExpressRouteCircuitAuthorizationsOperations, ExpressRouteCircuitConnectionsOperations, ExpressRouteCircuitPeeringsOperations, ExpressRouteCircuitsOperations, ExpressRouteConnectionsOperations, ExpressRouteCrossConnectionPeeringsOperations, ExpressRouteCrossConnectionsOperations, ExpressRouteGatewaysOperations, ExpressRouteLinksOperations, ExpressRoutePortAuthorizationsOperations, ExpressRoutePortsLocationsOperations, ExpressRoutePortsOperations, ExpressRouteServiceProvidersOperations, FirewallPoliciesOperations, FirewallPolicyIdpsSignaturesFilterValuesOperations, FirewallPolicyIdpsSignaturesOperations, FirewallPolicyIdpsSignaturesOverridesOperations, FirewallPolicyRuleCollectionGroupsOperations, FlowLogsOperations, HubRouteTablesOperations, HubVirtualNetworkConnectionsOperations, InboundNatRulesOperations, InboundSecurityRuleOperations, IpAllocationsOperations, IpGroupsOperations, LoadBalancerBackendAddressPoolsOperations, LoadBalancerFrontendIPConfigurationsOperations, LoadBalancerLoadBalancingRulesOperations, LoadBalancerNetworkInterfacesOperations, LoadBalancerOutboundRulesOperations, LoadBalancerProbesOperations, LoadBalancersOperations, LocalNetworkGatewaysOperations, NatGatewaysOperations, NatRulesOperations, NetworkInterfaceIPConfigurationsOperations, NetworkInterfaceLoadBalancersOperations, NetworkInterfaceTapConfigurationsOperations, NetworkInterfacesOperations, NetworkManagementClientOperationsMixin, NetworkProfilesOperations, NetworkSecurityGroupsOperations, NetworkVirtualAppliancesOperations, NetworkWatchersOperations, Operations, P2SVpnGatewaysOperations, PacketCapturesOperations, PeerExpressRouteCircuitConnectionsOperations, PrivateDnsZoneGroupsOperations, PrivateEndpointsOperations, PrivateLinkServicesOperations, PublicIPAddressesOperations, PublicIPPrefixesOperations, ResourceNavigationLinksOperations, RouteFilterRulesOperations, RouteFiltersOperations, RouteTablesOperations, RoutesOperations, RoutingIntentOperations, SecurityPartnerProvidersOperations, SecurityRulesOperations, ServiceAssociationLinksOperations, ServiceEndpointPoliciesOperations, ServiceEndpointPolicyDefinitionsOperations, ServiceTagInformationOperations, ServiceTagsOperations, SubnetsOperations, UsagesOperations, VirtualApplianceSitesOperations, VirtualApplianceSkusOperations, VirtualHubBgpConnectionOperations, VirtualHubBgpConnectionsOperations, VirtualHubIpConfigurationOperations, VirtualHubRouteTableV2SOperations, VirtualHubsOperations, VirtualNetworkGatewayConnectionsOperations, VirtualNetworkGatewayNatRulesOperations, VirtualNetworkGatewaysOperations, VirtualNetworkPeeringsOperations, VirtualNetworkTapsOperations, VirtualNetworksOperations, VirtualRouterPeeringsOperations, VirtualRoutersOperations, VirtualWansOperations, VpnConnectionsOperations, VpnGatewaysOperations, VpnLinkConnectionsOperations, VpnServerConfigurationsAssociatedWithVirtualWanOperations, VpnServerConfigurationsOperations, VpnSiteLinkConnectionsOperations, VpnSiteLinksOperations, VpnSitesConfigurationOperations, VpnSitesOperations, WebApplicationFirewallPoliciesOperations, WebCategoriesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class NetworkManagementClient(NetworkManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes + """Network Client. + + :ivar application_gateways: ApplicationGatewaysOperations operations + :vartype application_gateways: + azure.mgmt.network.v2021_08_01.aio.operations.ApplicationGatewaysOperations + :ivar application_gateway_private_link_resources: + ApplicationGatewayPrivateLinkResourcesOperations operations + :vartype application_gateway_private_link_resources: + azure.mgmt.network.v2021_08_01.aio.operations.ApplicationGatewayPrivateLinkResourcesOperations + :ivar application_gateway_private_endpoint_connections: + ApplicationGatewayPrivateEndpointConnectionsOperations operations + :vartype application_gateway_private_endpoint_connections: + azure.mgmt.network.v2021_08_01.aio.operations.ApplicationGatewayPrivateEndpointConnectionsOperations + :ivar application_security_groups: ApplicationSecurityGroupsOperations operations + :vartype application_security_groups: + azure.mgmt.network.v2021_08_01.aio.operations.ApplicationSecurityGroupsOperations + :ivar available_delegations: AvailableDelegationsOperations operations + :vartype available_delegations: + azure.mgmt.network.v2021_08_01.aio.operations.AvailableDelegationsOperations + :ivar available_resource_group_delegations: AvailableResourceGroupDelegationsOperations + operations + :vartype available_resource_group_delegations: + azure.mgmt.network.v2021_08_01.aio.operations.AvailableResourceGroupDelegationsOperations + :ivar available_service_aliases: AvailableServiceAliasesOperations operations + :vartype available_service_aliases: + azure.mgmt.network.v2021_08_01.aio.operations.AvailableServiceAliasesOperations + :ivar azure_firewalls: AzureFirewallsOperations operations + :vartype azure_firewalls: + azure.mgmt.network.v2021_08_01.aio.operations.AzureFirewallsOperations + :ivar azure_firewall_fqdn_tags: AzureFirewallFqdnTagsOperations operations + :vartype azure_firewall_fqdn_tags: + azure.mgmt.network.v2021_08_01.aio.operations.AzureFirewallFqdnTagsOperations + :ivar web_categories: WebCategoriesOperations operations + :vartype web_categories: azure.mgmt.network.v2021_08_01.aio.operations.WebCategoriesOperations + :ivar bastion_hosts: BastionHostsOperations operations + :vartype bastion_hosts: azure.mgmt.network.v2021_08_01.aio.operations.BastionHostsOperations + :ivar network_interfaces: NetworkInterfacesOperations operations + :vartype network_interfaces: + azure.mgmt.network.v2021_08_01.aio.operations.NetworkInterfacesOperations + :ivar public_ip_addresses: PublicIPAddressesOperations operations + :vartype public_ip_addresses: + azure.mgmt.network.v2021_08_01.aio.operations.PublicIPAddressesOperations + :ivar custom_ip_prefixes: CustomIPPrefixesOperations operations + :vartype custom_ip_prefixes: + azure.mgmt.network.v2021_08_01.aio.operations.CustomIPPrefixesOperations + :ivar ddos_custom_policies: DdosCustomPoliciesOperations operations + :vartype ddos_custom_policies: + azure.mgmt.network.v2021_08_01.aio.operations.DdosCustomPoliciesOperations + :ivar ddos_protection_plans: DdosProtectionPlansOperations operations + :vartype ddos_protection_plans: + azure.mgmt.network.v2021_08_01.aio.operations.DdosProtectionPlansOperations + :ivar dscp_configuration: DscpConfigurationOperations operations + :vartype dscp_configuration: + azure.mgmt.network.v2021_08_01.aio.operations.DscpConfigurationOperations + :ivar available_endpoint_services: AvailableEndpointServicesOperations operations + :vartype available_endpoint_services: + azure.mgmt.network.v2021_08_01.aio.operations.AvailableEndpointServicesOperations + :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations + operations + :vartype express_route_circuit_authorizations: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteCircuitAuthorizationsOperations + :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations + :vartype express_route_circuit_peerings: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteCircuitPeeringsOperations + :ivar express_route_circuit_connections: ExpressRouteCircuitConnectionsOperations operations + :vartype express_route_circuit_connections: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteCircuitConnectionsOperations + :ivar peer_express_route_circuit_connections: PeerExpressRouteCircuitConnectionsOperations + operations + :vartype peer_express_route_circuit_connections: + azure.mgmt.network.v2021_08_01.aio.operations.PeerExpressRouteCircuitConnectionsOperations + :ivar express_route_circuits: ExpressRouteCircuitsOperations operations + :vartype express_route_circuits: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteCircuitsOperations + :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations + :vartype express_route_service_providers: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteServiceProvidersOperations + :ivar express_route_cross_connections: ExpressRouteCrossConnectionsOperations operations + :vartype express_route_cross_connections: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteCrossConnectionsOperations + :ivar express_route_cross_connection_peerings: ExpressRouteCrossConnectionPeeringsOperations + operations + :vartype express_route_cross_connection_peerings: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteCrossConnectionPeeringsOperations + :ivar express_route_ports_locations: ExpressRoutePortsLocationsOperations operations + :vartype express_route_ports_locations: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRoutePortsLocationsOperations + :ivar express_route_ports: ExpressRoutePortsOperations operations + :vartype express_route_ports: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRoutePortsOperations + :ivar express_route_links: ExpressRouteLinksOperations operations + :vartype express_route_links: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteLinksOperations + :ivar express_route_port_authorizations: ExpressRoutePortAuthorizationsOperations operations + :vartype express_route_port_authorizations: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRoutePortAuthorizationsOperations + :ivar firewall_policies: FirewallPoliciesOperations operations + :vartype firewall_policies: + azure.mgmt.network.v2021_08_01.aio.operations.FirewallPoliciesOperations + :ivar firewall_policy_rule_collection_groups: FirewallPolicyRuleCollectionGroupsOperations + operations + :vartype firewall_policy_rule_collection_groups: + azure.mgmt.network.v2021_08_01.aio.operations.FirewallPolicyRuleCollectionGroupsOperations + :ivar firewall_policy_idps_signatures: FirewallPolicyIdpsSignaturesOperations operations + :vartype firewall_policy_idps_signatures: + azure.mgmt.network.v2021_08_01.aio.operations.FirewallPolicyIdpsSignaturesOperations + :ivar firewall_policy_idps_signatures_overrides: + FirewallPolicyIdpsSignaturesOverridesOperations operations + :vartype firewall_policy_idps_signatures_overrides: + azure.mgmt.network.v2021_08_01.aio.operations.FirewallPolicyIdpsSignaturesOverridesOperations + :ivar firewall_policy_idps_signatures_filter_values: + FirewallPolicyIdpsSignaturesFilterValuesOperations operations + :vartype firewall_policy_idps_signatures_filter_values: + azure.mgmt.network.v2021_08_01.aio.operations.FirewallPolicyIdpsSignaturesFilterValuesOperations + :ivar ip_allocations: IpAllocationsOperations operations + :vartype ip_allocations: azure.mgmt.network.v2021_08_01.aio.operations.IpAllocationsOperations + :ivar ip_groups: IpGroupsOperations operations + :vartype ip_groups: azure.mgmt.network.v2021_08_01.aio.operations.IpGroupsOperations + :ivar load_balancers: LoadBalancersOperations operations + :vartype load_balancers: azure.mgmt.network.v2021_08_01.aio.operations.LoadBalancersOperations + :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations + :vartype load_balancer_backend_address_pools: + azure.mgmt.network.v2021_08_01.aio.operations.LoadBalancerBackendAddressPoolsOperations + :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations + operations + :vartype load_balancer_frontend_ip_configurations: + azure.mgmt.network.v2021_08_01.aio.operations.LoadBalancerFrontendIPConfigurationsOperations + :ivar inbound_nat_rules: InboundNatRulesOperations operations + :vartype inbound_nat_rules: + azure.mgmt.network.v2021_08_01.aio.operations.InboundNatRulesOperations + :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations + :vartype load_balancer_load_balancing_rules: + azure.mgmt.network.v2021_08_01.aio.operations.LoadBalancerLoadBalancingRulesOperations + :ivar load_balancer_outbound_rules: LoadBalancerOutboundRulesOperations operations + :vartype load_balancer_outbound_rules: + azure.mgmt.network.v2021_08_01.aio.operations.LoadBalancerOutboundRulesOperations + :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations + :vartype load_balancer_network_interfaces: + azure.mgmt.network.v2021_08_01.aio.operations.LoadBalancerNetworkInterfacesOperations + :ivar load_balancer_probes: LoadBalancerProbesOperations operations + :vartype load_balancer_probes: + azure.mgmt.network.v2021_08_01.aio.operations.LoadBalancerProbesOperations + :ivar nat_gateways: NatGatewaysOperations operations + :vartype nat_gateways: azure.mgmt.network.v2021_08_01.aio.operations.NatGatewaysOperations + :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations + operations + :vartype network_interface_ip_configurations: + azure.mgmt.network.v2021_08_01.aio.operations.NetworkInterfaceIPConfigurationsOperations + :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations + :vartype network_interface_load_balancers: + azure.mgmt.network.v2021_08_01.aio.operations.NetworkInterfaceLoadBalancersOperations + :ivar network_interface_tap_configurations: NetworkInterfaceTapConfigurationsOperations + operations + :vartype network_interface_tap_configurations: + azure.mgmt.network.v2021_08_01.aio.operations.NetworkInterfaceTapConfigurationsOperations + :ivar network_profiles: NetworkProfilesOperations operations + :vartype network_profiles: + azure.mgmt.network.v2021_08_01.aio.operations.NetworkProfilesOperations + :ivar network_security_groups: NetworkSecurityGroupsOperations operations + :vartype network_security_groups: + azure.mgmt.network.v2021_08_01.aio.operations.NetworkSecurityGroupsOperations + :ivar security_rules: SecurityRulesOperations operations + :vartype security_rules: azure.mgmt.network.v2021_08_01.aio.operations.SecurityRulesOperations + :ivar default_security_rules: DefaultSecurityRulesOperations operations + :vartype default_security_rules: + azure.mgmt.network.v2021_08_01.aio.operations.DefaultSecurityRulesOperations + :ivar network_virtual_appliances: NetworkVirtualAppliancesOperations operations + :vartype network_virtual_appliances: + azure.mgmt.network.v2021_08_01.aio.operations.NetworkVirtualAppliancesOperations + :ivar virtual_appliance_sites: VirtualApplianceSitesOperations operations + :vartype virtual_appliance_sites: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualApplianceSitesOperations + :ivar virtual_appliance_skus: VirtualApplianceSkusOperations operations + :vartype virtual_appliance_skus: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualApplianceSkusOperations + :ivar inbound_security_rule: InboundSecurityRuleOperations operations + :vartype inbound_security_rule: + azure.mgmt.network.v2021_08_01.aio.operations.InboundSecurityRuleOperations + :ivar network_watchers: NetworkWatchersOperations operations + :vartype network_watchers: + azure.mgmt.network.v2021_08_01.aio.operations.NetworkWatchersOperations + :ivar packet_captures: PacketCapturesOperations operations + :vartype packet_captures: + azure.mgmt.network.v2021_08_01.aio.operations.PacketCapturesOperations + :ivar connection_monitors: ConnectionMonitorsOperations operations + :vartype connection_monitors: + azure.mgmt.network.v2021_08_01.aio.operations.ConnectionMonitorsOperations + :ivar flow_logs: FlowLogsOperations operations + :vartype flow_logs: azure.mgmt.network.v2021_08_01.aio.operations.FlowLogsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.network.v2021_08_01.aio.operations.Operations + :ivar private_endpoints: PrivateEndpointsOperations operations + :vartype private_endpoints: + azure.mgmt.network.v2021_08_01.aio.operations.PrivateEndpointsOperations + :ivar available_private_endpoint_types: AvailablePrivateEndpointTypesOperations operations + :vartype available_private_endpoint_types: + azure.mgmt.network.v2021_08_01.aio.operations.AvailablePrivateEndpointTypesOperations + :ivar private_dns_zone_groups: PrivateDnsZoneGroupsOperations operations + :vartype private_dns_zone_groups: + azure.mgmt.network.v2021_08_01.aio.operations.PrivateDnsZoneGroupsOperations + :ivar private_link_services: PrivateLinkServicesOperations operations + :vartype private_link_services: + azure.mgmt.network.v2021_08_01.aio.operations.PrivateLinkServicesOperations + :ivar public_ip_prefixes: PublicIPPrefixesOperations operations + :vartype public_ip_prefixes: + azure.mgmt.network.v2021_08_01.aio.operations.PublicIPPrefixesOperations + :ivar route_filters: RouteFiltersOperations operations + :vartype route_filters: azure.mgmt.network.v2021_08_01.aio.operations.RouteFiltersOperations + :ivar route_filter_rules: RouteFilterRulesOperations operations + :vartype route_filter_rules: + azure.mgmt.network.v2021_08_01.aio.operations.RouteFilterRulesOperations + :ivar route_tables: RouteTablesOperations operations + :vartype route_tables: azure.mgmt.network.v2021_08_01.aio.operations.RouteTablesOperations + :ivar routes: RoutesOperations operations + :vartype routes: azure.mgmt.network.v2021_08_01.aio.operations.RoutesOperations + :ivar security_partner_providers: SecurityPartnerProvidersOperations operations + :vartype security_partner_providers: + azure.mgmt.network.v2021_08_01.aio.operations.SecurityPartnerProvidersOperations + :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations + :vartype bgp_service_communities: + azure.mgmt.network.v2021_08_01.aio.operations.BgpServiceCommunitiesOperations + :ivar service_endpoint_policies: ServiceEndpointPoliciesOperations operations + :vartype service_endpoint_policies: + azure.mgmt.network.v2021_08_01.aio.operations.ServiceEndpointPoliciesOperations + :ivar service_endpoint_policy_definitions: ServiceEndpointPolicyDefinitionsOperations + operations + :vartype service_endpoint_policy_definitions: + azure.mgmt.network.v2021_08_01.aio.operations.ServiceEndpointPolicyDefinitionsOperations + :ivar service_tags: ServiceTagsOperations operations + :vartype service_tags: azure.mgmt.network.v2021_08_01.aio.operations.ServiceTagsOperations + :ivar service_tag_information: ServiceTagInformationOperations operations + :vartype service_tag_information: + azure.mgmt.network.v2021_08_01.aio.operations.ServiceTagInformationOperations + :ivar usages: UsagesOperations operations + :vartype usages: azure.mgmt.network.v2021_08_01.aio.operations.UsagesOperations + :ivar virtual_networks: VirtualNetworksOperations operations + :vartype virtual_networks: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualNetworksOperations + :ivar subnets: SubnetsOperations operations + :vartype subnets: azure.mgmt.network.v2021_08_01.aio.operations.SubnetsOperations + :ivar resource_navigation_links: ResourceNavigationLinksOperations operations + :vartype resource_navigation_links: + azure.mgmt.network.v2021_08_01.aio.operations.ResourceNavigationLinksOperations + :ivar service_association_links: ServiceAssociationLinksOperations operations + :vartype service_association_links: + azure.mgmt.network.v2021_08_01.aio.operations.ServiceAssociationLinksOperations + :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations + :vartype virtual_network_peerings: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualNetworkPeeringsOperations + :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations + :vartype virtual_network_gateways: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualNetworkGatewaysOperations + :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations + operations + :vartype virtual_network_gateway_connections: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualNetworkGatewayConnectionsOperations + :ivar local_network_gateways: LocalNetworkGatewaysOperations operations + :vartype local_network_gateways: + azure.mgmt.network.v2021_08_01.aio.operations.LocalNetworkGatewaysOperations + :ivar virtual_network_gateway_nat_rules: VirtualNetworkGatewayNatRulesOperations operations + :vartype virtual_network_gateway_nat_rules: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualNetworkGatewayNatRulesOperations + :ivar virtual_network_taps: VirtualNetworkTapsOperations operations + :vartype virtual_network_taps: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualNetworkTapsOperations + :ivar virtual_routers: VirtualRoutersOperations operations + :vartype virtual_routers: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualRoutersOperations + :ivar virtual_router_peerings: VirtualRouterPeeringsOperations operations + :vartype virtual_router_peerings: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualRouterPeeringsOperations + :ivar virtual_wans: VirtualWansOperations operations + :vartype virtual_wans: azure.mgmt.network.v2021_08_01.aio.operations.VirtualWansOperations + :ivar vpn_sites: VpnSitesOperations operations + :vartype vpn_sites: azure.mgmt.network.v2021_08_01.aio.operations.VpnSitesOperations + :ivar vpn_site_links: VpnSiteLinksOperations operations + :vartype vpn_site_links: azure.mgmt.network.v2021_08_01.aio.operations.VpnSiteLinksOperations + :ivar vpn_sites_configuration: VpnSitesConfigurationOperations operations + :vartype vpn_sites_configuration: + azure.mgmt.network.v2021_08_01.aio.operations.VpnSitesConfigurationOperations + :ivar vpn_server_configurations: VpnServerConfigurationsOperations operations + :vartype vpn_server_configurations: + azure.mgmt.network.v2021_08_01.aio.operations.VpnServerConfigurationsOperations + :ivar configuration_policy_groups: ConfigurationPolicyGroupsOperations operations + :vartype configuration_policy_groups: + azure.mgmt.network.v2021_08_01.aio.operations.ConfigurationPolicyGroupsOperations + :ivar virtual_hubs: VirtualHubsOperations operations + :vartype virtual_hubs: azure.mgmt.network.v2021_08_01.aio.operations.VirtualHubsOperations + :ivar hub_virtual_network_connections: HubVirtualNetworkConnectionsOperations operations + :vartype hub_virtual_network_connections: + azure.mgmt.network.v2021_08_01.aio.operations.HubVirtualNetworkConnectionsOperations + :ivar vpn_gateways: VpnGatewaysOperations operations + :vartype vpn_gateways: azure.mgmt.network.v2021_08_01.aio.operations.VpnGatewaysOperations + :ivar vpn_link_connections: VpnLinkConnectionsOperations operations + :vartype vpn_link_connections: + azure.mgmt.network.v2021_08_01.aio.operations.VpnLinkConnectionsOperations + :ivar vpn_connections: VpnConnectionsOperations operations + :vartype vpn_connections: + azure.mgmt.network.v2021_08_01.aio.operations.VpnConnectionsOperations + :ivar vpn_site_link_connections: VpnSiteLinkConnectionsOperations operations + :vartype vpn_site_link_connections: + azure.mgmt.network.v2021_08_01.aio.operations.VpnSiteLinkConnectionsOperations + :ivar nat_rules: NatRulesOperations operations + :vartype nat_rules: azure.mgmt.network.v2021_08_01.aio.operations.NatRulesOperations + :ivar p2_svpn_gateways: P2SVpnGatewaysOperations operations + :vartype p2_svpn_gateways: + azure.mgmt.network.v2021_08_01.aio.operations.P2SVpnGatewaysOperations + :ivar vpn_server_configurations_associated_with_virtual_wan: + VpnServerConfigurationsAssociatedWithVirtualWanOperations operations + :vartype vpn_server_configurations_associated_with_virtual_wan: + azure.mgmt.network.v2021_08_01.aio.operations.VpnServerConfigurationsAssociatedWithVirtualWanOperations + :ivar virtual_hub_route_table_v2_s: VirtualHubRouteTableV2SOperations operations + :vartype virtual_hub_route_table_v2_s: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualHubRouteTableV2SOperations + :ivar express_route_gateways: ExpressRouteGatewaysOperations operations + :vartype express_route_gateways: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteGatewaysOperations + :ivar express_route_connections: ExpressRouteConnectionsOperations operations + :vartype express_route_connections: + azure.mgmt.network.v2021_08_01.aio.operations.ExpressRouteConnectionsOperations + :ivar virtual_hub_bgp_connection: VirtualHubBgpConnectionOperations operations + :vartype virtual_hub_bgp_connection: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualHubBgpConnectionOperations + :ivar virtual_hub_bgp_connections: VirtualHubBgpConnectionsOperations operations + :vartype virtual_hub_bgp_connections: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualHubBgpConnectionsOperations + :ivar virtual_hub_ip_configuration: VirtualHubIpConfigurationOperations operations + :vartype virtual_hub_ip_configuration: + azure.mgmt.network.v2021_08_01.aio.operations.VirtualHubIpConfigurationOperations + :ivar hub_route_tables: HubRouteTablesOperations operations + :vartype hub_route_tables: + azure.mgmt.network.v2021_08_01.aio.operations.HubRouteTablesOperations + :ivar routing_intent: RoutingIntentOperations operations + :vartype routing_intent: azure.mgmt.network.v2021_08_01.aio.operations.RoutingIntentOperations + :ivar web_application_firewall_policies: WebApplicationFirewallPoliciesOperations operations + :vartype web_application_firewall_policies: + azure.mgmt.network.v2021_08_01.aio.operations.WebApplicationFirewallPoliciesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft + Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = NetworkManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.application_gateways = ApplicationGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.application_gateway_private_link_resources = ApplicationGatewayPrivateLinkResourcesOperations(self._client, self._config, self._serialize, self._deserialize) + self.application_gateway_private_endpoint_connections = ApplicationGatewayPrivateEndpointConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.application_security_groups = ApplicationSecurityGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_delegations = AvailableDelegationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_resource_group_delegations = AvailableResourceGroupDelegationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_service_aliases = AvailableServiceAliasesOperations(self._client, self._config, self._serialize, self._deserialize) + self.azure_firewalls = AzureFirewallsOperations(self._client, self._config, self._serialize, self._deserialize) + self.azure_firewall_fqdn_tags = AzureFirewallFqdnTagsOperations(self._client, self._config, self._serialize, self._deserialize) + self.web_categories = WebCategoriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.bastion_hosts = BastionHostsOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_interfaces = NetworkInterfacesOperations(self._client, self._config, self._serialize, self._deserialize) + self.public_ip_addresses = PublicIPAddressesOperations(self._client, self._config, self._serialize, self._deserialize) + self.custom_ip_prefixes = CustomIPPrefixesOperations(self._client, self._config, self._serialize, self._deserialize) + self.ddos_custom_policies = DdosCustomPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.ddos_protection_plans = DdosProtectionPlansOperations(self._client, self._config, self._serialize, self._deserialize) + self.dscp_configuration = DscpConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_endpoint_services = AvailableEndpointServicesOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_connections = ExpressRouteCircuitConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.peer_express_route_circuit_connections = PeerExpressRouteCircuitConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuits = ExpressRouteCircuitsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_service_providers = ExpressRouteServiceProvidersOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_cross_connections = ExpressRouteCrossConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_cross_connection_peerings = ExpressRouteCrossConnectionPeeringsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_ports_locations = ExpressRoutePortsLocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_ports = ExpressRoutePortsOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_links = ExpressRouteLinksOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_port_authorizations = ExpressRoutePortAuthorizationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policies = FirewallPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_rule_collection_groups = FirewallPolicyRuleCollectionGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures = FirewallPolicyIdpsSignaturesOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures_overrides = FirewallPolicyIdpsSignaturesOverridesOperations(self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures_filter_values = FirewallPolicyIdpsSignaturesFilterValuesOperations(self._client, self._config, self._serialize, self._deserialize) + self.ip_allocations = IpAllocationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.ip_groups = IpGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancers = LoadBalancersOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.inbound_nat_rules = InboundNatRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_outbound_rules = LoadBalancerOutboundRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations(self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_probes = LoadBalancerProbesOperations(self._client, self._config, self._serialize, self._deserialize) + self.nat_gateways = NatGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_interface_tap_configurations = NetworkInterfaceTapConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_profiles = NetworkProfilesOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_security_groups = NetworkSecurityGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.security_rules = SecurityRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.default_security_rules = DefaultSecurityRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_virtual_appliances = NetworkVirtualAppliancesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_appliance_sites = VirtualApplianceSitesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_appliance_skus = VirtualApplianceSkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.inbound_security_rule = InboundSecurityRuleOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_watchers = NetworkWatchersOperations(self._client, self._config, self._serialize, self._deserialize) + self.packet_captures = PacketCapturesOperations(self._client, self._config, self._serialize, self._deserialize) + self.connection_monitors = ConnectionMonitorsOperations(self._client, self._config, self._serialize, self._deserialize) + self.flow_logs = FlowLogsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.private_endpoints = PrivateEndpointsOperations(self._client, self._config, self._serialize, self._deserialize) + self.available_private_endpoint_types = AvailablePrivateEndpointTypesOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_dns_zone_groups = PrivateDnsZoneGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.private_link_services = PrivateLinkServicesOperations(self._client, self._config, self._serialize, self._deserialize) + self.public_ip_prefixes = PublicIPPrefixesOperations(self._client, self._config, self._serialize, self._deserialize) + self.route_filters = RouteFiltersOperations(self._client, self._config, self._serialize, self._deserialize) + self.route_filter_rules = RouteFilterRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.route_tables = RouteTablesOperations(self._client, self._config, self._serialize, self._deserialize) + self.routes = RoutesOperations(self._client, self._config, self._serialize, self._deserialize) + self.security_partner_providers = SecurityPartnerProvidersOperations(self._client, self._config, self._serialize, self._deserialize) + self.bgp_service_communities = BgpServiceCommunitiesOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_endpoint_policies = ServiceEndpointPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_endpoint_policy_definitions = ServiceEndpointPolicyDefinitionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_tags = ServiceTagsOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_tag_information = ServiceTagInformationOperations(self._client, self._config, self._serialize, self._deserialize) + self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_networks = VirtualNetworksOperations(self._client, self._config, self._serialize, self._deserialize) + self.subnets = SubnetsOperations(self._client, self._config, self._serialize, self._deserialize) + self.resource_navigation_links = ResourceNavigationLinksOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_association_links = ServiceAssociationLinksOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_peerings = VirtualNetworkPeeringsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateways = VirtualNetworkGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.local_network_gateways = LocalNetworkGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateway_nat_rules = VirtualNetworkGatewayNatRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_taps = VirtualNetworkTapsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_routers = VirtualRoutersOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_router_peerings = VirtualRouterPeeringsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_wans = VirtualWansOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_sites = VpnSitesOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_site_links = VpnSiteLinksOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_sites_configuration = VpnSitesConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_server_configurations = VpnServerConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.configuration_policy_groups = ConfigurationPolicyGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hubs = VirtualHubsOperations(self._client, self._config, self._serialize, self._deserialize) + self.hub_virtual_network_connections = HubVirtualNetworkConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_gateways = VpnGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_link_connections = VpnLinkConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_connections = VpnConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_site_link_connections = VpnSiteLinkConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.nat_rules = NatRulesOperations(self._client, self._config, self._serialize, self._deserialize) + self.p2_svpn_gateways = P2SVpnGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.vpn_server_configurations_associated_with_virtual_wan = VpnServerConfigurationsAssociatedWithVirtualWanOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_route_table_v2_s = VirtualHubRouteTableV2SOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_gateways = ExpressRouteGatewaysOperations(self._client, self._config, self._serialize, self._deserialize) + self.express_route_connections = ExpressRouteConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_bgp_connection = VirtualHubBgpConnectionOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_bgp_connections = VirtualHubBgpConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_ip_configuration = VirtualHubIpConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) + self.hub_route_tables = HubRouteTablesOperations(self._client, self._config, self._serialize, self._deserialize) + self.routing_intent = RoutingIntentOperations(self._client, self._config, self._serialize, self._deserialize) + self.web_application_firewall_policies = WebApplicationFirewallPoliciesOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "NetworkManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_patch.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_patch.py new file mode 100644 index 00000000000..74e48ecd07c --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/operations/__init__.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/operations/__init__.py new file mode 100644 index 00000000000..f71d0fb7e6d --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/operations/__init__.py @@ -0,0 +1,241 @@ +# 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 ._operations import ApplicationGatewaysOperations +from ._operations import ApplicationGatewayPrivateLinkResourcesOperations +from ._operations import ApplicationGatewayPrivateEndpointConnectionsOperations +from ._operations import ApplicationSecurityGroupsOperations +from ._operations import AvailableDelegationsOperations +from ._operations import AvailableResourceGroupDelegationsOperations +from ._operations import AvailableServiceAliasesOperations +from ._operations import AzureFirewallsOperations +from ._operations import AzureFirewallFqdnTagsOperations +from ._operations import WebCategoriesOperations +from ._operations import BastionHostsOperations +from ._operations import NetworkManagementClientOperationsMixin +from ._operations import NetworkInterfacesOperations +from ._operations import PublicIPAddressesOperations +from ._operations import CustomIPPrefixesOperations +from ._operations import DdosCustomPoliciesOperations +from ._operations import DdosProtectionPlansOperations +from ._operations import DscpConfigurationOperations +from ._operations import AvailableEndpointServicesOperations +from ._operations import ExpressRouteCircuitAuthorizationsOperations +from ._operations import ExpressRouteCircuitPeeringsOperations +from ._operations import ExpressRouteCircuitConnectionsOperations +from ._operations import PeerExpressRouteCircuitConnectionsOperations +from ._operations import ExpressRouteCircuitsOperations +from ._operations import ExpressRouteServiceProvidersOperations +from ._operations import ExpressRouteCrossConnectionsOperations +from ._operations import ExpressRouteCrossConnectionPeeringsOperations +from ._operations import ExpressRoutePortsLocationsOperations +from ._operations import ExpressRoutePortsOperations +from ._operations import ExpressRouteLinksOperations +from ._operations import ExpressRoutePortAuthorizationsOperations +from ._operations import FirewallPoliciesOperations +from ._operations import FirewallPolicyRuleCollectionGroupsOperations +from ._operations import FirewallPolicyIdpsSignaturesOperations +from ._operations import FirewallPolicyIdpsSignaturesOverridesOperations +from ._operations import FirewallPolicyIdpsSignaturesFilterValuesOperations +from ._operations import IpAllocationsOperations +from ._operations import IpGroupsOperations +from ._operations import LoadBalancersOperations +from ._operations import LoadBalancerBackendAddressPoolsOperations +from ._operations import LoadBalancerFrontendIPConfigurationsOperations +from ._operations import InboundNatRulesOperations +from ._operations import LoadBalancerLoadBalancingRulesOperations +from ._operations import LoadBalancerOutboundRulesOperations +from ._operations import LoadBalancerNetworkInterfacesOperations +from ._operations import LoadBalancerProbesOperations +from ._operations import NatGatewaysOperations +from ._operations import NetworkInterfaceIPConfigurationsOperations +from ._operations import NetworkInterfaceLoadBalancersOperations +from ._operations import NetworkInterfaceTapConfigurationsOperations +from ._operations import NetworkProfilesOperations +from ._operations import NetworkSecurityGroupsOperations +from ._operations import SecurityRulesOperations +from ._operations import DefaultSecurityRulesOperations +from ._operations import NetworkVirtualAppliancesOperations +from ._operations import VirtualApplianceSitesOperations +from ._operations import VirtualApplianceSkusOperations +from ._operations import InboundSecurityRuleOperations +from ._operations import NetworkWatchersOperations +from ._operations import PacketCapturesOperations +from ._operations import ConnectionMonitorsOperations +from ._operations import FlowLogsOperations +from ._operations import Operations +from ._operations import PrivateEndpointsOperations +from ._operations import AvailablePrivateEndpointTypesOperations +from ._operations import PrivateDnsZoneGroupsOperations +from ._operations import PrivateLinkServicesOperations +from ._operations import PublicIPPrefixesOperations +from ._operations import RouteFiltersOperations +from ._operations import RouteFilterRulesOperations +from ._operations import RouteTablesOperations +from ._operations import RoutesOperations +from ._operations import SecurityPartnerProvidersOperations +from ._operations import BgpServiceCommunitiesOperations +from ._operations import ServiceEndpointPoliciesOperations +from ._operations import ServiceEndpointPolicyDefinitionsOperations +from ._operations import ServiceTagsOperations +from ._operations import ServiceTagInformationOperations +from ._operations import UsagesOperations +from ._operations import VirtualNetworksOperations +from ._operations import SubnetsOperations +from ._operations import ResourceNavigationLinksOperations +from ._operations import ServiceAssociationLinksOperations +from ._operations import VirtualNetworkPeeringsOperations +from ._operations import VirtualNetworkGatewaysOperations +from ._operations import VirtualNetworkGatewayConnectionsOperations +from ._operations import LocalNetworkGatewaysOperations +from ._operations import VirtualNetworkGatewayNatRulesOperations +from ._operations import VirtualNetworkTapsOperations +from ._operations import VirtualRoutersOperations +from ._operations import VirtualRouterPeeringsOperations +from ._operations import VirtualWansOperations +from ._operations import VpnSitesOperations +from ._operations import VpnSiteLinksOperations +from ._operations import VpnSitesConfigurationOperations +from ._operations import VpnServerConfigurationsOperations +from ._operations import ConfigurationPolicyGroupsOperations +from ._operations import VirtualHubsOperations +from ._operations import HubVirtualNetworkConnectionsOperations +from ._operations import VpnGatewaysOperations +from ._operations import VpnLinkConnectionsOperations +from ._operations import VpnConnectionsOperations +from ._operations import VpnSiteLinkConnectionsOperations +from ._operations import NatRulesOperations +from ._operations import P2SVpnGatewaysOperations +from ._operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations +from ._operations import VirtualHubRouteTableV2SOperations +from ._operations import ExpressRouteGatewaysOperations +from ._operations import ExpressRouteConnectionsOperations +from ._operations import VirtualHubBgpConnectionOperations +from ._operations import VirtualHubBgpConnectionsOperations +from ._operations import VirtualHubIpConfigurationOperations +from ._operations import HubRouteTablesOperations +from ._operations import RoutingIntentOperations +from ._operations import WebApplicationFirewallPoliciesOperations + +__all__ = [ + 'ApplicationGatewaysOperations', + 'ApplicationGatewayPrivateLinkResourcesOperations', + 'ApplicationGatewayPrivateEndpointConnectionsOperations', + 'ApplicationSecurityGroupsOperations', + 'AvailableDelegationsOperations', + 'AvailableResourceGroupDelegationsOperations', + 'AvailableServiceAliasesOperations', + 'AzureFirewallsOperations', + 'AzureFirewallFqdnTagsOperations', + 'WebCategoriesOperations', + 'BastionHostsOperations', + 'NetworkManagementClientOperationsMixin', + 'NetworkInterfacesOperations', + 'PublicIPAddressesOperations', + 'CustomIPPrefixesOperations', + 'DdosCustomPoliciesOperations', + 'DdosProtectionPlansOperations', + 'DscpConfigurationOperations', + 'AvailableEndpointServicesOperations', + 'ExpressRouteCircuitAuthorizationsOperations', + 'ExpressRouteCircuitPeeringsOperations', + 'ExpressRouteCircuitConnectionsOperations', + 'PeerExpressRouteCircuitConnectionsOperations', + 'ExpressRouteCircuitsOperations', + 'ExpressRouteServiceProvidersOperations', + 'ExpressRouteCrossConnectionsOperations', + 'ExpressRouteCrossConnectionPeeringsOperations', + 'ExpressRoutePortsLocationsOperations', + 'ExpressRoutePortsOperations', + 'ExpressRouteLinksOperations', + 'ExpressRoutePortAuthorizationsOperations', + 'FirewallPoliciesOperations', + 'FirewallPolicyRuleCollectionGroupsOperations', + 'FirewallPolicyIdpsSignaturesOperations', + 'FirewallPolicyIdpsSignaturesOverridesOperations', + 'FirewallPolicyIdpsSignaturesFilterValuesOperations', + 'IpAllocationsOperations', + 'IpGroupsOperations', + 'LoadBalancersOperations', + 'LoadBalancerBackendAddressPoolsOperations', + 'LoadBalancerFrontendIPConfigurationsOperations', + 'InboundNatRulesOperations', + 'LoadBalancerLoadBalancingRulesOperations', + 'LoadBalancerOutboundRulesOperations', + 'LoadBalancerNetworkInterfacesOperations', + 'LoadBalancerProbesOperations', + 'NatGatewaysOperations', + 'NetworkInterfaceIPConfigurationsOperations', + 'NetworkInterfaceLoadBalancersOperations', + 'NetworkInterfaceTapConfigurationsOperations', + 'NetworkProfilesOperations', + 'NetworkSecurityGroupsOperations', + 'SecurityRulesOperations', + 'DefaultSecurityRulesOperations', + 'NetworkVirtualAppliancesOperations', + 'VirtualApplianceSitesOperations', + 'VirtualApplianceSkusOperations', + 'InboundSecurityRuleOperations', + 'NetworkWatchersOperations', + 'PacketCapturesOperations', + 'ConnectionMonitorsOperations', + 'FlowLogsOperations', + 'Operations', + 'PrivateEndpointsOperations', + 'AvailablePrivateEndpointTypesOperations', + 'PrivateDnsZoneGroupsOperations', + 'PrivateLinkServicesOperations', + 'PublicIPPrefixesOperations', + 'RouteFiltersOperations', + 'RouteFilterRulesOperations', + 'RouteTablesOperations', + 'RoutesOperations', + 'SecurityPartnerProvidersOperations', + 'BgpServiceCommunitiesOperations', + 'ServiceEndpointPoliciesOperations', + 'ServiceEndpointPolicyDefinitionsOperations', + 'ServiceTagsOperations', + 'ServiceTagInformationOperations', + 'UsagesOperations', + 'VirtualNetworksOperations', + 'SubnetsOperations', + 'ResourceNavigationLinksOperations', + 'ServiceAssociationLinksOperations', + 'VirtualNetworkPeeringsOperations', + 'VirtualNetworkGatewaysOperations', + 'VirtualNetworkGatewayConnectionsOperations', + 'LocalNetworkGatewaysOperations', + 'VirtualNetworkGatewayNatRulesOperations', + 'VirtualNetworkTapsOperations', + 'VirtualRoutersOperations', + 'VirtualRouterPeeringsOperations', + 'VirtualWansOperations', + 'VpnSitesOperations', + 'VpnSiteLinksOperations', + 'VpnSitesConfigurationOperations', + 'VpnServerConfigurationsOperations', + 'ConfigurationPolicyGroupsOperations', + 'VirtualHubsOperations', + 'HubVirtualNetworkConnectionsOperations', + 'VpnGatewaysOperations', + 'VpnLinkConnectionsOperations', + 'VpnConnectionsOperations', + 'VpnSiteLinkConnectionsOperations', + 'NatRulesOperations', + 'P2SVpnGatewaysOperations', + 'VpnServerConfigurationsAssociatedWithVirtualWanOperations', + 'VirtualHubRouteTableV2SOperations', + 'ExpressRouteGatewaysOperations', + 'ExpressRouteConnectionsOperations', + 'VirtualHubBgpConnectionOperations', + 'VirtualHubBgpConnectionsOperations', + 'VirtualHubIpConfigurationOperations', + 'HubRouteTablesOperations', + 'RoutingIntentOperations', + 'WebApplicationFirewallPoliciesOperations', +] diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/operations/_operations.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/operations/_operations.py new file mode 100644 index 00000000000..6b2abafe734 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/aio/operations/_operations.py @@ -0,0 +1,54505 @@ +# pylint: disable=too-many-lines +# 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 typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operations import build_application_gateway_private_endpoint_connections_delete_request_initial, build_application_gateway_private_endpoint_connections_get_request, build_application_gateway_private_endpoint_connections_list_request, build_application_gateway_private_endpoint_connections_update_request_initial, build_application_gateway_private_link_resources_list_request, build_application_gateways_backend_health_on_demand_request_initial, build_application_gateways_backend_health_request_initial, build_application_gateways_create_or_update_request_initial, build_application_gateways_delete_request_initial, build_application_gateways_get_request, build_application_gateways_get_ssl_predefined_policy_request, build_application_gateways_list_all_request, build_application_gateways_list_available_request_headers_request, build_application_gateways_list_available_response_headers_request, build_application_gateways_list_available_server_variables_request, build_application_gateways_list_available_ssl_options_request, build_application_gateways_list_available_ssl_predefined_policies_request, build_application_gateways_list_available_waf_rule_sets_request, build_application_gateways_list_request, build_application_gateways_start_request_initial, build_application_gateways_stop_request_initial, build_application_gateways_update_tags_request, build_application_security_groups_create_or_update_request_initial, build_application_security_groups_delete_request_initial, build_application_security_groups_get_request, build_application_security_groups_list_all_request, build_application_security_groups_list_request, build_application_security_groups_update_tags_request, build_available_delegations_list_request, build_available_endpoint_services_list_request, build_available_private_endpoint_types_list_by_resource_group_request, build_available_private_endpoint_types_list_request, build_available_resource_group_delegations_list_request, build_available_service_aliases_list_by_resource_group_request, build_available_service_aliases_list_request, build_azure_firewall_fqdn_tags_list_all_request, build_azure_firewalls_create_or_update_request_initial, build_azure_firewalls_delete_request_initial, build_azure_firewalls_get_request, build_azure_firewalls_list_all_request, build_azure_firewalls_list_request, build_azure_firewalls_update_tags_request_initial, build_bastion_hosts_create_or_update_request_initial, build_bastion_hosts_delete_request_initial, build_bastion_hosts_get_request, build_bastion_hosts_list_by_resource_group_request, build_bastion_hosts_list_request, build_bastion_hosts_update_tags_request_initial, build_bgp_service_communities_list_request, build_check_dns_name_availability_request, build_configuration_policy_groups_create_or_update_request_initial, build_configuration_policy_groups_delete_request_initial, build_configuration_policy_groups_get_request, build_configuration_policy_groups_list_by_vpn_server_configuration_request, build_connection_monitors_create_or_update_request_initial, build_connection_monitors_delete_request_initial, build_connection_monitors_get_request, build_connection_monitors_list_request, build_connection_monitors_query_request_initial, build_connection_monitors_start_request_initial, build_connection_monitors_stop_request_initial, build_connection_monitors_update_tags_request, build_custom_ip_prefixes_create_or_update_request_initial, build_custom_ip_prefixes_delete_request_initial, build_custom_ip_prefixes_get_request, build_custom_ip_prefixes_list_all_request, build_custom_ip_prefixes_list_request, build_custom_ip_prefixes_update_tags_request, build_ddos_custom_policies_create_or_update_request_initial, build_ddos_custom_policies_delete_request_initial, build_ddos_custom_policies_get_request, build_ddos_custom_policies_update_tags_request, build_ddos_protection_plans_create_or_update_request_initial, build_ddos_protection_plans_delete_request_initial, build_ddos_protection_plans_get_request, build_ddos_protection_plans_list_by_resource_group_request, build_ddos_protection_plans_list_request, build_ddos_protection_plans_update_tags_request, build_default_security_rules_get_request, build_default_security_rules_list_request, build_delete_bastion_shareable_link_request_initial, build_disconnect_active_sessions_request, build_dscp_configuration_create_or_update_request_initial, build_dscp_configuration_delete_request_initial, build_dscp_configuration_get_request, build_dscp_configuration_list_all_request, build_dscp_configuration_list_request, build_express_route_circuit_authorizations_create_or_update_request_initial, build_express_route_circuit_authorizations_delete_request_initial, build_express_route_circuit_authorizations_get_request, build_express_route_circuit_authorizations_list_request, build_express_route_circuit_connections_create_or_update_request_initial, build_express_route_circuit_connections_delete_request_initial, build_express_route_circuit_connections_get_request, build_express_route_circuit_connections_list_request, build_express_route_circuit_peerings_create_or_update_request_initial, build_express_route_circuit_peerings_delete_request_initial, build_express_route_circuit_peerings_get_request, build_express_route_circuit_peerings_list_request, build_express_route_circuits_create_or_update_request_initial, build_express_route_circuits_delete_request_initial, build_express_route_circuits_get_peering_stats_request, build_express_route_circuits_get_request, build_express_route_circuits_get_stats_request, build_express_route_circuits_list_all_request, build_express_route_circuits_list_arp_table_request_initial, build_express_route_circuits_list_request, build_express_route_circuits_list_routes_table_request_initial, build_express_route_circuits_list_routes_table_summary_request_initial, build_express_route_circuits_update_tags_request, build_express_route_connections_create_or_update_request_initial, build_express_route_connections_delete_request_initial, build_express_route_connections_get_request, build_express_route_connections_list_request, build_express_route_cross_connection_peerings_create_or_update_request_initial, build_express_route_cross_connection_peerings_delete_request_initial, build_express_route_cross_connection_peerings_get_request, build_express_route_cross_connection_peerings_list_request, build_express_route_cross_connections_create_or_update_request_initial, build_express_route_cross_connections_get_request, build_express_route_cross_connections_list_arp_table_request_initial, build_express_route_cross_connections_list_by_resource_group_request, build_express_route_cross_connections_list_request, build_express_route_cross_connections_list_routes_table_request_initial, build_express_route_cross_connections_list_routes_table_summary_request_initial, build_express_route_cross_connections_update_tags_request, build_express_route_gateways_create_or_update_request_initial, build_express_route_gateways_delete_request_initial, build_express_route_gateways_get_request, build_express_route_gateways_list_by_resource_group_request, build_express_route_gateways_list_by_subscription_request, build_express_route_gateways_update_tags_request_initial, build_express_route_links_get_request, build_express_route_links_list_request, build_express_route_port_authorizations_create_or_update_request_initial, build_express_route_port_authorizations_delete_request_initial, build_express_route_port_authorizations_get_request, build_express_route_port_authorizations_list_request, build_express_route_ports_create_or_update_request_initial, build_express_route_ports_delete_request_initial, build_express_route_ports_generate_loa_request, build_express_route_ports_get_request, build_express_route_ports_list_by_resource_group_request, build_express_route_ports_list_request, build_express_route_ports_locations_get_request, build_express_route_ports_locations_list_request, build_express_route_ports_update_tags_request, build_express_route_service_providers_list_request, build_firewall_policies_create_or_update_request_initial, build_firewall_policies_delete_request_initial, build_firewall_policies_get_request, build_firewall_policies_list_all_request, build_firewall_policies_list_request, build_firewall_policies_update_tags_request, build_firewall_policy_idps_signatures_filter_values_list_request, build_firewall_policy_idps_signatures_list_request, build_firewall_policy_idps_signatures_overrides_get_request, build_firewall_policy_idps_signatures_overrides_list_request, build_firewall_policy_idps_signatures_overrides_patch_request, build_firewall_policy_idps_signatures_overrides_put_request, build_firewall_policy_rule_collection_groups_create_or_update_request_initial, build_firewall_policy_rule_collection_groups_delete_request_initial, build_firewall_policy_rule_collection_groups_get_request, build_firewall_policy_rule_collection_groups_list_request, build_flow_logs_create_or_update_request_initial, build_flow_logs_delete_request_initial, build_flow_logs_get_request, build_flow_logs_list_request, build_flow_logs_update_tags_request, build_generatevirtualwanvpnserverconfigurationvpnprofile_request_initial, build_get_active_sessions_request_initial, build_get_bastion_shareable_link_request, build_hub_route_tables_create_or_update_request_initial, build_hub_route_tables_delete_request_initial, build_hub_route_tables_get_request, build_hub_route_tables_list_request, build_hub_virtual_network_connections_create_or_update_request_initial, build_hub_virtual_network_connections_delete_request_initial, build_hub_virtual_network_connections_get_request, build_hub_virtual_network_connections_list_request, build_inbound_nat_rules_create_or_update_request_initial, build_inbound_nat_rules_delete_request_initial, build_inbound_nat_rules_get_request, build_inbound_nat_rules_list_request, build_inbound_security_rule_create_or_update_request_initial, build_ip_allocations_create_or_update_request_initial, build_ip_allocations_delete_request_initial, build_ip_allocations_get_request, build_ip_allocations_list_by_resource_group_request, build_ip_allocations_list_request, build_ip_allocations_update_tags_request, build_ip_groups_create_or_update_request_initial, build_ip_groups_delete_request_initial, build_ip_groups_get_request, build_ip_groups_list_by_resource_group_request, build_ip_groups_list_request, build_ip_groups_update_groups_request, build_load_balancer_backend_address_pools_create_or_update_request_initial, build_load_balancer_backend_address_pools_delete_request_initial, build_load_balancer_backend_address_pools_get_request, build_load_balancer_backend_address_pools_list_request, build_load_balancer_frontend_ip_configurations_get_request, build_load_balancer_frontend_ip_configurations_list_request, build_load_balancer_load_balancing_rules_get_request, build_load_balancer_load_balancing_rules_list_request, build_load_balancer_network_interfaces_list_request, build_load_balancer_outbound_rules_get_request, build_load_balancer_outbound_rules_list_request, build_load_balancer_probes_get_request, build_load_balancer_probes_list_request, build_load_balancers_create_or_update_request_initial, build_load_balancers_delete_request_initial, build_load_balancers_get_request, build_load_balancers_list_all_request, build_load_balancers_list_inbound_nat_rule_port_mappings_request_initial, build_load_balancers_list_request, build_load_balancers_swap_public_ip_addresses_request_initial, build_load_balancers_update_tags_request, build_local_network_gateways_create_or_update_request_initial, build_local_network_gateways_delete_request_initial, build_local_network_gateways_get_request, build_local_network_gateways_list_request, build_local_network_gateways_update_tags_request, build_nat_gateways_create_or_update_request_initial, build_nat_gateways_delete_request_initial, build_nat_gateways_get_request, build_nat_gateways_list_all_request, build_nat_gateways_list_request, build_nat_gateways_update_tags_request, build_nat_rules_create_or_update_request_initial, build_nat_rules_delete_request_initial, build_nat_rules_get_request, build_nat_rules_list_by_vpn_gateway_request, build_network_interface_ip_configurations_get_request, build_network_interface_ip_configurations_list_request, build_network_interface_load_balancers_list_request, build_network_interface_tap_configurations_create_or_update_request_initial, build_network_interface_tap_configurations_delete_request_initial, build_network_interface_tap_configurations_get_request, build_network_interface_tap_configurations_list_request, build_network_interfaces_create_or_update_request_initial, build_network_interfaces_delete_request_initial, build_network_interfaces_get_cloud_service_network_interface_request, build_network_interfaces_get_effective_route_table_request_initial, build_network_interfaces_get_request, build_network_interfaces_get_virtual_machine_scale_set_ip_configuration_request, build_network_interfaces_get_virtual_machine_scale_set_network_interface_request, build_network_interfaces_list_all_request, build_network_interfaces_list_cloud_service_network_interfaces_request, build_network_interfaces_list_cloud_service_role_instance_network_interfaces_request, build_network_interfaces_list_effective_network_security_groups_request_initial, build_network_interfaces_list_request, build_network_interfaces_list_virtual_machine_scale_set_ip_configurations_request, build_network_interfaces_list_virtual_machine_scale_set_network_interfaces_request, build_network_interfaces_list_virtual_machine_scale_set_vm_network_interfaces_request, build_network_interfaces_update_tags_request, build_network_profiles_create_or_update_request, build_network_profiles_delete_request_initial, build_network_profiles_get_request, build_network_profiles_list_all_request, build_network_profiles_list_request, build_network_profiles_update_tags_request, build_network_security_groups_create_or_update_request_initial, build_network_security_groups_delete_request_initial, build_network_security_groups_get_request, build_network_security_groups_list_all_request, build_network_security_groups_list_request, build_network_security_groups_update_tags_request, build_network_virtual_appliances_create_or_update_request_initial, build_network_virtual_appliances_delete_request_initial, build_network_virtual_appliances_get_request, build_network_virtual_appliances_list_by_resource_group_request, build_network_virtual_appliances_list_request, build_network_virtual_appliances_update_tags_request, build_network_watchers_check_connectivity_request_initial, build_network_watchers_create_or_update_request, build_network_watchers_delete_request_initial, build_network_watchers_get_azure_reachability_report_request_initial, build_network_watchers_get_flow_log_status_request_initial, build_network_watchers_get_network_configuration_diagnostic_request_initial, build_network_watchers_get_next_hop_request_initial, build_network_watchers_get_request, build_network_watchers_get_topology_request, build_network_watchers_get_troubleshooting_request_initial, build_network_watchers_get_troubleshooting_result_request_initial, build_network_watchers_get_vm_security_rules_request_initial, build_network_watchers_list_all_request, build_network_watchers_list_available_providers_request_initial, build_network_watchers_list_request, build_network_watchers_set_flow_log_configuration_request_initial, build_network_watchers_update_tags_request, build_network_watchers_verify_ip_flow_request_initial, build_operations_list_request, build_p2_svpn_gateways_create_or_update_request_initial, build_p2_svpn_gateways_delete_request_initial, build_p2_svpn_gateways_disconnect_p2_s_vpn_connections_request_initial, build_p2_svpn_gateways_generate_vpn_profile_request_initial, build_p2_svpn_gateways_get_p2_s_vpn_connection_health_detailed_request_initial, build_p2_svpn_gateways_get_p2_s_vpn_connection_health_request_initial, build_p2_svpn_gateways_get_request, build_p2_svpn_gateways_list_by_resource_group_request, build_p2_svpn_gateways_list_request, build_p2_svpn_gateways_reset_request_initial, build_p2_svpn_gateways_update_tags_request_initial, build_packet_captures_create_request_initial, build_packet_captures_delete_request_initial, build_packet_captures_get_request, build_packet_captures_get_status_request_initial, build_packet_captures_list_request, build_packet_captures_stop_request_initial, build_peer_express_route_circuit_connections_get_request, build_peer_express_route_circuit_connections_list_request, build_private_dns_zone_groups_create_or_update_request_initial, build_private_dns_zone_groups_delete_request_initial, build_private_dns_zone_groups_get_request, build_private_dns_zone_groups_list_request, build_private_endpoints_create_or_update_request_initial, build_private_endpoints_delete_request_initial, build_private_endpoints_get_request, build_private_endpoints_list_by_subscription_request, build_private_endpoints_list_request, build_private_link_services_check_private_link_service_visibility_by_resource_group_request_initial, build_private_link_services_check_private_link_service_visibility_request_initial, build_private_link_services_create_or_update_request_initial, build_private_link_services_delete_private_endpoint_connection_request_initial, build_private_link_services_delete_request_initial, build_private_link_services_get_private_endpoint_connection_request, build_private_link_services_get_request, build_private_link_services_list_auto_approved_private_link_services_by_resource_group_request, build_private_link_services_list_auto_approved_private_link_services_request, build_private_link_services_list_by_subscription_request, build_private_link_services_list_private_endpoint_connections_request, build_private_link_services_list_request, build_private_link_services_update_private_endpoint_connection_request, build_public_ip_addresses_create_or_update_request_initial, build_public_ip_addresses_delete_request_initial, build_public_ip_addresses_get_cloud_service_public_ip_address_request, build_public_ip_addresses_get_request, build_public_ip_addresses_get_virtual_machine_scale_set_public_ip_address_request, build_public_ip_addresses_list_all_request, build_public_ip_addresses_list_cloud_service_public_ip_addresses_request, build_public_ip_addresses_list_cloud_service_role_instance_public_ip_addresses_request, build_public_ip_addresses_list_request, build_public_ip_addresses_list_virtual_machine_scale_set_public_ip_addresses_request, build_public_ip_addresses_list_virtual_machine_scale_set_vm_public_ip_addresses_request, build_public_ip_addresses_update_tags_request, build_public_ip_prefixes_create_or_update_request_initial, build_public_ip_prefixes_delete_request_initial, build_public_ip_prefixes_get_request, build_public_ip_prefixes_list_all_request, build_public_ip_prefixes_list_request, build_public_ip_prefixes_update_tags_request, build_put_bastion_shareable_link_request_initial, build_resource_navigation_links_list_request, build_route_filter_rules_create_or_update_request_initial, build_route_filter_rules_delete_request_initial, build_route_filter_rules_get_request, build_route_filter_rules_list_by_route_filter_request, build_route_filters_create_or_update_request_initial, build_route_filters_delete_request_initial, build_route_filters_get_request, build_route_filters_list_by_resource_group_request, build_route_filters_list_request, build_route_filters_update_tags_request, build_route_tables_create_or_update_request_initial, build_route_tables_delete_request_initial, build_route_tables_get_request, build_route_tables_list_all_request, build_route_tables_list_request, build_route_tables_update_tags_request, build_routes_create_or_update_request_initial, build_routes_delete_request_initial, build_routes_get_request, build_routes_list_request, build_routing_intent_create_or_update_request_initial, build_routing_intent_delete_request_initial, build_routing_intent_get_request, build_routing_intent_list_request, build_security_partner_providers_create_or_update_request_initial, build_security_partner_providers_delete_request_initial, build_security_partner_providers_get_request, build_security_partner_providers_list_by_resource_group_request, build_security_partner_providers_list_request, build_security_partner_providers_update_tags_request, build_security_rules_create_or_update_request_initial, build_security_rules_delete_request_initial, build_security_rules_get_request, build_security_rules_list_request, build_service_association_links_list_request, build_service_endpoint_policies_create_or_update_request_initial, build_service_endpoint_policies_delete_request_initial, build_service_endpoint_policies_get_request, build_service_endpoint_policies_list_by_resource_group_request, build_service_endpoint_policies_list_request, build_service_endpoint_policies_update_tags_request, build_service_endpoint_policy_definitions_create_or_update_request_initial, build_service_endpoint_policy_definitions_delete_request_initial, build_service_endpoint_policy_definitions_get_request, build_service_endpoint_policy_definitions_list_by_resource_group_request, build_service_tag_information_list_request, build_service_tags_list_request, build_subnets_create_or_update_request_initial, build_subnets_delete_request_initial, build_subnets_get_request, build_subnets_list_request, build_subnets_prepare_network_policies_request_initial, build_subnets_unprepare_network_policies_request_initial, build_supported_security_providers_request, build_usages_list_request, build_virtual_appliance_sites_create_or_update_request_initial, build_virtual_appliance_sites_delete_request_initial, build_virtual_appliance_sites_get_request, build_virtual_appliance_sites_list_request, build_virtual_appliance_skus_get_request, build_virtual_appliance_skus_list_request, build_virtual_hub_bgp_connection_create_or_update_request_initial, build_virtual_hub_bgp_connection_delete_request_initial, build_virtual_hub_bgp_connection_get_request, build_virtual_hub_bgp_connections_list_advertised_routes_request_initial, build_virtual_hub_bgp_connections_list_learned_routes_request_initial, build_virtual_hub_bgp_connections_list_request, build_virtual_hub_ip_configuration_create_or_update_request_initial, build_virtual_hub_ip_configuration_delete_request_initial, build_virtual_hub_ip_configuration_get_request, build_virtual_hub_ip_configuration_list_request, build_virtual_hub_route_table_v2_s_create_or_update_request_initial, build_virtual_hub_route_table_v2_s_delete_request_initial, build_virtual_hub_route_table_v2_s_get_request, build_virtual_hub_route_table_v2_s_list_request, build_virtual_hubs_create_or_update_request_initial, build_virtual_hubs_delete_request_initial, build_virtual_hubs_get_effective_virtual_hub_routes_request_initial, build_virtual_hubs_get_request, build_virtual_hubs_list_by_resource_group_request, build_virtual_hubs_list_request, build_virtual_hubs_update_tags_request, build_virtual_network_gateway_connections_create_or_update_request_initial, build_virtual_network_gateway_connections_delete_request_initial, build_virtual_network_gateway_connections_get_ike_sas_request_initial, build_virtual_network_gateway_connections_get_request, build_virtual_network_gateway_connections_get_shared_key_request, build_virtual_network_gateway_connections_list_request, build_virtual_network_gateway_connections_reset_connection_request_initial, build_virtual_network_gateway_connections_reset_shared_key_request_initial, build_virtual_network_gateway_connections_set_shared_key_request_initial, build_virtual_network_gateway_connections_start_packet_capture_request_initial, build_virtual_network_gateway_connections_stop_packet_capture_request_initial, build_virtual_network_gateway_connections_update_tags_request_initial, build_virtual_network_gateway_nat_rules_create_or_update_request_initial, build_virtual_network_gateway_nat_rules_delete_request_initial, build_virtual_network_gateway_nat_rules_get_request, build_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway_request, build_virtual_network_gateways_create_or_update_request_initial, build_virtual_network_gateways_delete_request_initial, build_virtual_network_gateways_disconnect_virtual_network_gateway_vpn_connections_request_initial, build_virtual_network_gateways_generate_vpn_profile_request_initial, build_virtual_network_gateways_generatevpnclientpackage_request_initial, build_virtual_network_gateways_get_advertised_routes_request_initial, build_virtual_network_gateways_get_bgp_peer_status_request_initial, build_virtual_network_gateways_get_learned_routes_request_initial, build_virtual_network_gateways_get_request, build_virtual_network_gateways_get_vpn_profile_package_url_request_initial, build_virtual_network_gateways_get_vpnclient_connection_health_request_initial, build_virtual_network_gateways_get_vpnclient_ipsec_parameters_request_initial, build_virtual_network_gateways_list_connections_request, build_virtual_network_gateways_list_request, build_virtual_network_gateways_reset_request_initial, build_virtual_network_gateways_reset_vpn_client_shared_key_request_initial, build_virtual_network_gateways_set_vpnclient_ipsec_parameters_request_initial, build_virtual_network_gateways_start_packet_capture_request_initial, build_virtual_network_gateways_stop_packet_capture_request_initial, build_virtual_network_gateways_supported_vpn_devices_request, build_virtual_network_gateways_update_tags_request_initial, build_virtual_network_gateways_vpn_device_configuration_script_request, build_virtual_network_peerings_create_or_update_request_initial, build_virtual_network_peerings_delete_request_initial, build_virtual_network_peerings_get_request, build_virtual_network_peerings_list_request, build_virtual_network_taps_create_or_update_request_initial, build_virtual_network_taps_delete_request_initial, build_virtual_network_taps_get_request, build_virtual_network_taps_list_all_request, build_virtual_network_taps_list_by_resource_group_request, build_virtual_network_taps_update_tags_request, build_virtual_networks_check_ip_address_availability_request, build_virtual_networks_create_or_update_request_initial, build_virtual_networks_delete_request_initial, build_virtual_networks_get_request, build_virtual_networks_list_all_request, build_virtual_networks_list_request, build_virtual_networks_list_usage_request, build_virtual_networks_update_tags_request, build_virtual_router_peerings_create_or_update_request_initial, build_virtual_router_peerings_delete_request_initial, build_virtual_router_peerings_get_request, build_virtual_router_peerings_list_request, build_virtual_routers_create_or_update_request_initial, build_virtual_routers_delete_request_initial, build_virtual_routers_get_request, build_virtual_routers_list_by_resource_group_request, build_virtual_routers_list_request, build_virtual_wans_create_or_update_request_initial, build_virtual_wans_delete_request_initial, build_virtual_wans_get_request, build_virtual_wans_list_by_resource_group_request, build_virtual_wans_list_request, build_virtual_wans_update_tags_request, build_vpn_connections_create_or_update_request_initial, build_vpn_connections_delete_request_initial, build_vpn_connections_get_request, build_vpn_connections_list_by_vpn_gateway_request, build_vpn_connections_start_packet_capture_request_initial, build_vpn_connections_stop_packet_capture_request_initial, build_vpn_gateways_create_or_update_request_initial, build_vpn_gateways_delete_request_initial, build_vpn_gateways_get_request, build_vpn_gateways_list_by_resource_group_request, build_vpn_gateways_list_request, build_vpn_gateways_reset_request_initial, build_vpn_gateways_start_packet_capture_request_initial, build_vpn_gateways_stop_packet_capture_request_initial, build_vpn_gateways_update_tags_request_initial, build_vpn_link_connections_get_ike_sas_request_initial, build_vpn_link_connections_list_by_vpn_connection_request, build_vpn_link_connections_reset_connection_request_initial, build_vpn_server_configurations_associated_with_virtual_wan_list_request_initial, build_vpn_server_configurations_create_or_update_request_initial, build_vpn_server_configurations_delete_request_initial, build_vpn_server_configurations_get_request, build_vpn_server_configurations_list_by_resource_group_request, build_vpn_server_configurations_list_request, build_vpn_server_configurations_update_tags_request, build_vpn_site_link_connections_get_request, build_vpn_site_links_get_request, build_vpn_site_links_list_by_vpn_site_request, build_vpn_sites_configuration_download_request_initial, build_vpn_sites_create_or_update_request_initial, build_vpn_sites_delete_request_initial, build_vpn_sites_get_request, build_vpn_sites_list_by_resource_group_request, build_vpn_sites_list_request, build_vpn_sites_update_tags_request, build_web_application_firewall_policies_create_or_update_request, build_web_application_firewall_policies_delete_request_initial, build_web_application_firewall_policies_get_request, build_web_application_firewall_policies_list_all_request, build_web_application_firewall_policies_list_request, build_web_categories_get_request, build_web_categories_list_by_subscription_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ApplicationGatewaysOperations: # pylint: disable=too-many-public-methods + """ApplicationGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_delete_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> "_models.ApplicationGateway": + """Gets the specified application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_get_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + application_gateway_name: str, + parameters: "_models.ApplicationGateway", + **kwargs: Any + ) -> "_models.ApplicationGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ApplicationGateway') + + request = build_application_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + application_gateway_name: str, + parameters: "_models.ApplicationGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.ApplicationGateway"]: + """Creates or updates the specified application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param parameters: Parameters supplied to the create or update application gateway operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ApplicationGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ApplicationGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + application_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ApplicationGateway": + """Updates the specified application gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param parameters: Parameters supplied to update application gateway tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_application_gateways_update_tags_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationGatewayListResult"]: + """Lists all application gateways in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationGatewayListResult"]: + """Gets all the application gateways in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways"} # type: ignore + + async def _start_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_start_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._start_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start"} # type: ignore + + + @distributed_trace_async + async def begin_start( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Starts the specified application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start"} # type: ignore + + async def _stop_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_stop_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop"} # type: ignore + + + @distributed_trace_async + async def begin_stop( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Stops the specified application gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop"} # type: ignore + + async def _backend_health_initial( + self, + resource_group_name: str, + application_gateway_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.ApplicationGatewayBackendHealth"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_backend_health_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self._backend_health_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _backend_health_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth"} # type: ignore + + + @distributed_trace_async + async def begin_backend_health( + self, + resource_group_name: str, + application_gateway_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.ApplicationGatewayBackendHealth"]: + """Gets the backend health of the specified application gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ApplicationGatewayBackendHealth or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealth] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealth"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._backend_health_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + expand=expand, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_backend_health.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth"} # type: ignore + + async def _backend_health_on_demand_initial( + self, + resource_group_name: str, + application_gateway_name: str, + probe_request: "_models.ApplicationGatewayOnDemandProbe", + expand: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.ApplicationGatewayBackendHealthOnDemand"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealthOnDemand"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(probe_request, 'ApplicationGatewayOnDemandProbe') + + request = build_application_gateways_backend_health_on_demand_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + expand=expand, + template_url=self._backend_health_on_demand_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _backend_health_on_demand_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand"} # type: ignore + + + @distributed_trace_async + async def begin_backend_health_on_demand( + self, + resource_group_name: str, + application_gateway_name: str, + probe_request: "_models.ApplicationGatewayOnDemandProbe", + expand: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.ApplicationGatewayBackendHealthOnDemand"]: + """Gets the backend health for given combination of backend pool and http setting of the specified + application gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param probe_request: Request body for on-demand test probe operation. + :type probe_request: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayOnDemandProbe + :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + ApplicationGatewayBackendHealthOnDemand or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthOnDemand] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealthOnDemand"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._backend_health_on_demand_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + probe_request=probe_request, + expand=expand, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_backend_health_on_demand.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand"} # type: ignore + + @distributed_trace_async + async def list_available_server_variables( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available server variables. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_server_variables_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_server_variables.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_server_variables.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables"} # type: ignore + + + @distributed_trace_async + async def list_available_request_headers( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available request headers. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_request_headers_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_request_headers.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_request_headers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders"} # type: ignore + + + @distributed_trace_async + async def list_available_response_headers( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available response headers. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_response_headers_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_response_headers.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_response_headers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders"} # type: ignore + + + @distributed_trace_async + async def list_available_waf_rule_sets( + self, + **kwargs: Any + ) -> "_models.ApplicationGatewayAvailableWafRuleSetsResult": + """Lists all available web application firewall rule sets. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewayAvailableWafRuleSetsResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAvailableWafRuleSetsResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableWafRuleSetsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_waf_rule_sets_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_waf_rule_sets.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewayAvailableWafRuleSetsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_waf_rule_sets.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets"} # type: ignore + + + @distributed_trace_async + async def list_available_ssl_options( + self, + **kwargs: Any + ) -> "_models.ApplicationGatewayAvailableSslOptions": + """Lists available Ssl options for configuring Ssl policy. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewayAvailableSslOptions, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAvailableSslOptions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslOptions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_ssl_options_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_ssl_options.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewayAvailableSslOptions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_ssl_options.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default"} # type: ignore + + + @distributed_trace + def list_available_ssl_predefined_policies( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationGatewayAvailableSslPredefinedPolicies"]: + """Lists all SSL predefined policies for configuring Ssl policy. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayAvailableSslPredefinedPolicies + or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateways_list_available_ssl_predefined_policies_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_ssl_predefined_policies.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateways_list_available_ssl_predefined_policies_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayAvailableSslPredefinedPolicies", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_available_ssl_predefined_policies.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies"} # type: ignore + + @distributed_trace_async + async def get_ssl_predefined_policy( + self, + predefined_policy_name: str, + **kwargs: Any + ) -> "_models.ApplicationGatewaySslPredefinedPolicy": + """Gets Ssl predefined policy with the specified policy name. + + :param predefined_policy_name: Name of Ssl predefined policy. + :type predefined_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewaySslPredefinedPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPredefinedPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewaySslPredefinedPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_get_ssl_predefined_policy_request( + subscription_id=self._config.subscription_id, + predefined_policy_name=predefined_policy_name, + api_version=api_version, + template_url=self.get_ssl_predefined_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewaySslPredefinedPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_ssl_predefined_policy.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}"} # type: ignore + +class ApplicationGatewayPrivateLinkResourcesOperations: + """ApplicationGatewayPrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationGatewayPrivateLinkResourceListResult"]: + """Lists all private link resources on an application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayPrivateLinkResourceListResult or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateway_private_link_resources_list_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateway_private_link_resources_list_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayPrivateLinkResourceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources"} # type: ignore +class ApplicationGatewayPrivateEndpointConnectionsOperations: + """ApplicationGatewayPrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateway_private_endpoint_connections_delete_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + parameters: "_models.ApplicationGatewayPrivateEndpointConnection", + **kwargs: Any + ) -> Optional["_models.ApplicationGatewayPrivateEndpointConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayPrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ApplicationGatewayPrivateEndpointConnection') + + request = build_application_gateway_private_endpoint_connections_update_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + parameters: "_models.ApplicationGatewayPrivateEndpointConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.ApplicationGatewayPrivateEndpointConnection"]: + """Updates the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :param parameters: Parameters supplied to update application gateway private endpoint + connection operation. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + ApplicationGatewayPrivateEndpointConnection or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.ApplicationGatewayPrivateEndpointConnection": + """Gets the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewayPrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateway_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationGatewayPrivateEndpointConnectionListResult"]: + """Lists all private endpoint connections on an application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either + ApplicationGatewayPrivateEndpointConnectionListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateway_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateway_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayPrivateEndpointConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections"} # type: ignore +class ApplicationSecurityGroupsOperations: + """ApplicationSecurityGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_security_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_security_groups_delete_request_initial( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_security_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified application security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + application_security_group_name: str, + **kwargs: Any + ) -> "_models.ApplicationSecurityGroup": + """Gets information about the specified application security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_security_groups_get_request( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + application_security_group_name: str, + parameters: "_models.ApplicationSecurityGroup", + **kwargs: Any + ) -> "_models.ApplicationSecurityGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ApplicationSecurityGroup') + + request = build_application_security_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + application_security_group_name: str, + parameters: "_models.ApplicationSecurityGroup", + **kwargs: Any + ) -> AsyncLROPoller["_models.ApplicationSecurityGroup"]: + """Creates or updates an application security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :param parameters: Parameters supplied to the create or update ApplicationSecurityGroup + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ApplicationSecurityGroup or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + application_security_group_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ApplicationSecurityGroup": + """Updates an application security group's tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :param parameters: Parameters supplied to update application security group tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_application_security_groups_update_tags_request( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationSecurityGroupListResult"]: + """Gets all application security groups in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_security_groups_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_security_groups_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationSecurityGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationSecurityGroupListResult"]: + """Gets all the application security groups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_security_groups_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_security_groups_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationSecurityGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups"} # type: ignore +class AvailableDelegationsOperations: + """AvailableDelegationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.AvailableDelegationsResult"]: + """Gets all of the available subnet delegations for this subscription in this region. + + :param location: The location of the subnet. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableDelegationsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailableDelegationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableDelegationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_delegations_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_delegations_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AvailableDelegationsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations"} # type: ignore +class AvailableResourceGroupDelegationsOperations: + """AvailableResourceGroupDelegationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AvailableDelegationsResult"]: + """Gets all of the available subnet delegations for this resource group in this region. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableDelegationsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailableDelegationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableDelegationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_resource_group_delegations_list_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_resource_group_delegations_list_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AvailableDelegationsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations"} # type: ignore +class AvailableServiceAliasesOperations: + """AvailableServiceAliasesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.AvailableServiceAliasesResult"]: + """Gets all available service aliases for this subscription in this region. + + :param location: The location. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableServiceAliasesResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailableServiceAliasesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableServiceAliasesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_service_aliases_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_service_aliases_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AvailableServiceAliasesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.AvailableServiceAliasesResult"]: + """Gets all available service aliases for this resource group in this region. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param location: The location. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableServiceAliasesResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailableServiceAliasesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableServiceAliasesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_service_aliases_list_by_resource_group_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_service_aliases_list_by_resource_group_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AvailableServiceAliasesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases"} # type: ignore +class AzureFirewallsOperations: + """AzureFirewallsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + azure_firewall_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_azure_firewalls_delete_request_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + azure_firewall_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Azure Firewall. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + azure_firewall_name: str, + **kwargs: Any + ) -> "_models.AzureFirewall": + """Gets the specified Azure Firewall. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureFirewall, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.AzureFirewall + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_azure_firewalls_get_request( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureFirewall', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + azure_firewall_name: str, + parameters: "_models.AzureFirewall", + **kwargs: Any + ) -> "_models.AzureFirewall": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'AzureFirewall') + + request = build_azure_firewalls_create_or_update_request_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AzureFirewall', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AzureFirewall', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + azure_firewall_name: str, + parameters: "_models.AzureFirewall", + **kwargs: Any + ) -> AsyncLROPoller["_models.AzureFirewall"]: + """Creates or updates the specified Azure Firewall. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :param parameters: Parameters supplied to the create or update Azure Firewall operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.AzureFirewall + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AzureFirewall or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.AzureFirewall] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('AzureFirewall', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + azure_firewall_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.AzureFirewall"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AzureFirewall"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_azure_firewalls_update_tags_request_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureFirewall', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + + @distributed_trace_async + async def begin_update_tags( + self, + resource_group_name: str, + azure_firewall_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.AzureFirewall"]: + """Updates tags of an Azure Firewall resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :param parameters: Parameters supplied to update azure firewall tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AzureFirewall or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.AzureFirewall] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('AzureFirewall', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AzureFirewallListResult"]: + """Lists all Azure Firewalls in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureFirewallListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AzureFirewallListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_azure_firewalls_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_azure_firewalls_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AzureFirewallListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AzureFirewallListResult"]: + """Gets all the Azure Firewalls in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureFirewallListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AzureFirewallListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_azure_firewalls_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_azure_firewalls_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AzureFirewallListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls"} # type: ignore +class AzureFirewallFqdnTagsOperations: + """AzureFirewallFqdnTagsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AzureFirewallFqdnTagListResult"]: + """Gets all the Azure Firewall FQDN Tags in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureFirewallFqdnTagListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AzureFirewallFqdnTagListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallFqdnTagListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_azure_firewall_fqdn_tags_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_azure_firewall_fqdn_tags_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AzureFirewallFqdnTagListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags"} # type: ignore +class WebCategoriesOperations: + """WebCategoriesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.AzureWebCategory": + """Gets the specified Azure Web Category. + + :param name: The name of the azureWebCategory. + :type name: str + :param expand: Expands resourceIds back referenced by the azureWebCategory resource. Default + value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureWebCategory, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.AzureWebCategory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureWebCategory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_web_categories_get_request( + name=name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureWebCategory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}"} # type: ignore + + + @distributed_trace + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AzureWebCategoryListResult"]: + """Gets all the Azure Web Categories in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureWebCategoryListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AzureWebCategoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureWebCategoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_web_categories_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_web_categories_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AzureWebCategoryListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories"} # type: ignore +class BastionHostsOperations: + """BastionHostsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_bastion_hosts_delete_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Bastion Host. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> "_models.BastionHost": + """Gets the specified Bastion Host. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BastionHost, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.BastionHost + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_bastion_hosts_get_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BastionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + bastion_host_name: str, + parameters: "_models.BastionHost", + **kwargs: Any + ) -> "_models.BastionHost": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BastionHost') + + request = build_bastion_hosts_create_or_update_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BastionHost', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BastionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + bastion_host_name: str, + parameters: "_models.BastionHost", + **kwargs: Any + ) -> AsyncLROPoller["_models.BastionHost"]: + """Creates or updates the specified Bastion Host. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param parameters: Parameters supplied to the create or update Bastion Host operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.BastionHost + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BastionHost or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.BastionHost] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BastionHost', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + bastion_host_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.BastionHost"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionHost"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_bastion_hosts_update_tags_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + + @distributed_trace_async + async def begin_update_tags( + self, + resource_group_name: str, + bastion_host_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.BastionHost"]: + """Updates Tags for BastionHost resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param parameters: Parameters supplied to update BastionHost tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BastionHost or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.BastionHost] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BastionHost', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.BastionHostListResult"]: + """Lists all Bastion Hosts in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionHostListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionHostListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHostListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_bastion_hosts_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_bastion_hosts_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BastionHostListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.BastionHostListResult"]: + """Lists all Bastion Hosts in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionHostListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionHostListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHostListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_bastion_hosts_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_bastion_hosts_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BastionHostListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts"} # type: ignore +class NetworkManagementClientOperationsMixin: + + async def _put_bastion_shareable_link_initial( + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> Optional["_models.BastionShareableLinkListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionShareableLinkListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_put_bastion_shareable_link_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._put_bastion_shareable_link_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionShareableLinkListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _put_bastion_shareable_link_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks"} # type: ignore + + + @distributed_trace_async + async def begin_put_bastion_shareable_link( + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> AsyncLROPoller[AsyncItemPaged["_models.BastionShareableLinkListResult"]]: + """Creates a Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns an iterator like instance of either + BastionShareableLinkListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListResult]] + :raises: ~azure.core.exceptions.HttpResponseError + """ + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_put_bastion_shareable_link_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.begin_put_bastion_shareable_link.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_put_bastion_shareable_link_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BastionShareableLinkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._put_bastion_shareable_link_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + bsl_request=bsl_request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return await get_next(next_link) + + return AsyncItemPaged( + internal_get_next, extract_data + ) + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_put_bastion_shareable_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks"} # type: ignore + + + async def _delete_bastion_shareable_link_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_delete_bastion_shareable_link_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._delete_bastion_shareable_link_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_bastion_shareable_link_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks"} # type: ignore + + + @distributed_trace_async + async def begin_delete_bastion_shareable_link( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_bastion_shareable_link_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + bsl_request=bsl_request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete_bastion_shareable_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks"} # type: ignore + + @distributed_trace + def get_bastion_shareable_link( + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> AsyncIterable["_models.BastionShareableLinkListResult"]: + """Return the Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionShareableLinkListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_get_bastion_shareable_link_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get_bastion_shareable_link.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_get_bastion_shareable_link_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BastionShareableLinkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + get_bastion_shareable_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks"} # type: ignore + + async def _get_active_sessions_initial( + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> Optional["_models.BastionActiveSessionListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionActiveSessionListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_get_active_sessions_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_active_sessions_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionActiveSessionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_active_sessions_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions"} # type: ignore + + + @distributed_trace_async + async def begin_get_active_sessions( + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> AsyncLROPoller[AsyncItemPaged["_models.BastionActiveSessionListResult"]]: + """Returns the list of currently active sessions on the Bastion. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns an iterator like instance of either + BastionActiveSessionListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionActiveSessionListResult]] + :raises: ~azure.core.exceptions.HttpResponseError + """ + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionActiveSessionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_get_active_sessions_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.begin_get_active_sessions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_get_active_sessions_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BastionActiveSessionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionActiveSessionListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_active_sessions_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return await get_next(next_link) + + return AsyncItemPaged( + internal_get_next, extract_data + ) + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_active_sessions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions"} # type: ignore + + + @distributed_trace + def disconnect_active_sessions( + self, + resource_group_name: str, + bastion_host_name: str, + session_ids: "_models.SessionIds", + **kwargs: Any + ) -> AsyncIterable["_models.BastionSessionDeleteResult"]: + """Returns the list of currently active sessions on the Bastion. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param session_ids: The list of sessionids to disconnect. + :type session_ids: ~azure.mgmt.network.v2021_08_01.models.SessionIds + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionSessionDeleteResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionSessionDeleteResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionSessionDeleteResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(session_ids, 'SessionIds') + + request = build_disconnect_active_sessions_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.disconnect_active_sessions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + _json = self._serialize.body(session_ids, 'SessionIds') + + request = build_disconnect_active_sessions_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BastionSessionDeleteResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + disconnect_active_sessions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions"} # type: ignore + + @distributed_trace_async + async def check_dns_name_availability( + self, + location: str, + domain_name_label: str, + **kwargs: Any + ) -> "_models.DnsNameAvailabilityResult": + """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + + :param location: The location of the domain name. + :type location: str + :param domain_name_label: The domain name to be verified. It must conform to the following + regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + :type domain_name_label: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DnsNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DnsNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_check_dns_name_availability_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + domain_name_label=domain_name_label, + template_url=self.check_dns_name_availability.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + check_dns_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability"} # type: ignore + + + @distributed_trace_async + async def supported_security_providers( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> "_models.VirtualWanSecurityProviders": + """Gives the supported security providers for the virtual wan. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN for which supported security providers are + needed. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWanSecurityProviders, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProviders + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWanSecurityProviders"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_supported_security_providers_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + template_url=self.supported_security_providers.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWanSecurityProviders', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + supported_security_providers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders"} # type: ignore + + + async def _generatevirtualwanvpnserverconfigurationvpnprofile_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + vpn_client_params: "_models.VirtualWanVpnProfileParameters", + **kwargs: Any + ) -> Optional["_models.VpnProfileResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnProfileResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_client_params, 'VirtualWanVpnProfileParameters') + + request = build_generatevirtualwanvpnserverconfigurationvpnprofile_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._generatevirtualwanvpnserverconfigurationvpnprofile_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _generatevirtualwanvpnserverconfigurationvpnprofile_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile"} # type: ignore + + + @distributed_trace_async + async def begin_generatevirtualwanvpnserverconfigurationvpnprofile( + self, + resource_group_name: str, + virtual_wan_name: str, + vpn_client_params: "_models.VirtualWanVpnProfileParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnProfileResponse"]: + """Generates a unique VPN profile for P2S clients for VirtualWan and associated + VpnServerConfiguration combination in the specified resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation + operation. + :type vpn_client_params: ~azure.mgmt.network.v2021_08_01.models.VirtualWanVpnProfileParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnProfileResponse or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnProfileResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnProfileResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._generatevirtualwanvpnserverconfigurationvpnprofile_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + vpn_client_params=vpn_client_params, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_generatevirtualwanvpnserverconfigurationvpnprofile.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile"} # type: ignore +class NetworkInterfacesOperations: + """NetworkInterfacesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_cloud_service_role_instance_network_interfaces( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets information about all network interfaces in a role instance in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_cloud_service_role_instance_network_interfaces_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_cloud_service_role_instance_network_interfaces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_cloud_service_role_instance_network_interfaces_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_cloud_service_role_instance_network_interfaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces"} # type: ignore + + @distributed_trace + def list_cloud_service_network_interfaces( + self, + resource_group_name: str, + cloud_service_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_cloud_service_network_interfaces_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_cloud_service_network_interfaces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_cloud_service_network_interfaces_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_cloud_service_network_interfaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces"} # type: ignore + + @distributed_trace_async + async def get_cloud_service_network_interface( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterface": + """Get the specified network interface in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_get_cloud_service_network_interface_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_cloud_service_network_interface.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cloud_service_network_interface.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_delete_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterface": + """Gets information about the specified network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_get_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_interface_name: str, + parameters: "_models.NetworkInterface", + **kwargs: Any + ) -> "_models.NetworkInterface": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkInterface') + + request = build_network_interfaces_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + parameters: "_models.NetworkInterface", + **kwargs: Any + ) -> AsyncLROPoller["_models.NetworkInterface"]: + """Creates or updates a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param parameters: Parameters supplied to the create or update network interface operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkInterface] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkInterface', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + network_interface_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkInterface": + """Updates a network interface tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param parameters: Parameters supplied to update network interface tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_interfaces_update_tags_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces"} # type: ignore + + async def _get_effective_route_table_initial( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> Optional["_models.EffectiveRouteListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveRouteListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_get_effective_route_table_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_effective_route_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_effective_route_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable"} # type: ignore + + + @distributed_trace_async + async def begin_get_effective_route_table( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.EffectiveRouteListResult"]: + """Gets all route tables applied to a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either EffectiveRouteListResult or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.EffectiveRouteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveRouteListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_effective_route_table_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_effective_route_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable"} # type: ignore + + async def _list_effective_network_security_groups_initial( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> Optional["_models.EffectiveNetworkSecurityGroupListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveNetworkSecurityGroupListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_list_effective_network_security_groups_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_effective_network_security_groups_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_effective_network_security_groups_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups"} # type: ignore + + + @distributed_trace_async + async def begin_list_effective_network_security_groups( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.EffectiveNetworkSecurityGroupListResult"]: + """Gets all network security groups applied to a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + EffectiveNetworkSecurityGroupListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveNetworkSecurityGroupListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_effective_network_security_groups_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_effective_network_security_groups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups"} # type: ignore + + @distributed_trace + def list_virtual_machine_scale_set_vm_network_interfaces( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets information about all network interfaces in a virtual machine in a virtual machine scale + set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_virtual_machine_scale_set_vm_network_interfaces_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_virtual_machine_scale_set_vm_network_interfaces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_virtual_machine_scale_set_vm_network_interfaces_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_vm_network_interfaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces"} # type: ignore + + @distributed_trace + def list_virtual_machine_scale_set_network_interfaces( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_virtual_machine_scale_set_network_interfaces_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_virtual_machine_scale_set_network_interfaces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_virtual_machine_scale_set_network_interfaces_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_network_interfaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces"} # type: ignore + + @distributed_trace_async + async def get_virtual_machine_scale_set_network_interface( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterface": + """Get the specified network interface in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + + request = build_network_interfaces_get_virtual_machine_scale_set_network_interface_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_virtual_machine_scale_set_network_interface.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_virtual_machine_scale_set_network_interface.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + @distributed_trace + def list_virtual_machine_scale_set_ip_configurations( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceIPConfigurationListResult"]: + """Get the specified network interface ip configuration in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_virtual_machine_scale_set_ip_configurations_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.list_virtual_machine_scale_set_ip_configurations.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_virtual_machine_scale_set_ip_configurations_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceIPConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_ip_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations"} # type: ignore + + @distributed_trace_async + async def get_virtual_machine_scale_set_ip_configuration( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterfaceIPConfiguration": + """Get the specified network interface ip configuration in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the ip configuration. + :type ip_configuration_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterfaceIPConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + + request = build_network_interfaces_get_virtual_machine_scale_set_ip_configuration_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_virtual_machine_scale_set_ip_configuration.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_virtual_machine_scale_set_ip_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}"} # type: ignore + +class PublicIPAddressesOperations: + """PublicIPAddressesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_cloud_service_public_ip_addresses( + self, + resource_group_name: str, + cloud_service_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses on a cloud service level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_cloud_service_public_ip_addresses_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_cloud_service_public_ip_addresses.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_cloud_service_public_ip_addresses_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_cloud_service_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses"} # type: ignore + + @distributed_trace + def list_cloud_service_role_instance_public_ip_addresses( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + ip_configuration_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses in a role instance IP configuration in a cloud + service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :param network_interface_name: The network interface name. + :type network_interface_name: str + :param ip_configuration_name: The IP configuration name. + :type ip_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_cloud_service_role_instance_public_ip_addresses_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_cloud_service_role_instance_public_ip_addresses.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_cloud_service_role_instance_public_ip_addresses_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_cloud_service_role_instance_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses"} # type: ignore + + @distributed_trace_async + async def get_cloud_service_public_ip_address( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + ip_configuration_name: str, + public_ip_address_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Get the specified public IP address in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The role instance name. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the IP configuration. + :type ip_configuration_name: str + :param public_ip_address_name: The name of the public IP Address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_addresses_get_cloud_service_public_ip_address_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_cloud_service_public_ip_address.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cloud_service_public_ip_address.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + public_ip_address_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_addresses_delete_request_initial( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + public_ip_address_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified public IP address. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + public_ip_address_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Gets the specified public IP address in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_addresses_get_request( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + public_ip_address_name: str, + parameters: "_models.PublicIPAddress", + **kwargs: Any + ) -> "_models.PublicIPAddress": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PublicIPAddress') + + request = build_public_ip_addresses_create_or_update_request_initial( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + public_ip_address_name: str, + parameters: "_models.PublicIPAddress", + **kwargs: Any + ) -> AsyncLROPoller["_models.PublicIPAddress"]: + """Creates or updates a static or dynamic public IP address. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :param parameters: Parameters supplied to the create or update public IP address operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PublicIPAddress or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PublicIPAddress] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + public_ip_address_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Updates public IP address tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :param parameters: Parameters supplied to update public IP address tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_public_ip_addresses_update_tags_request( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPAddressListResult"]: + """Gets all the public IP addresses in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPAddressListResult"]: + """Gets all public IP addresses in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses"} # type: ignore + + @distributed_trace + def list_virtual_machine_scale_set_public_ip_addresses( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses on a virtual machine scale set level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_virtual_machine_scale_set_public_ip_addresses_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_virtual_machine_scale_set_public_ip_addresses.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_virtual_machine_scale_set_public_ip_addresses_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses"} # type: ignore + + @distributed_trace + def list_virtual_machine_scale_set_vm_public_ip_addresses( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses in a virtual machine IP configuration in a + virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The network interface name. + :type network_interface_name: str + :param ip_configuration_name: The IP configuration name. + :type ip_configuration_name: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_virtual_machine_scale_set_vm_public_ip_addresses_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_virtual_machine_scale_set_vm_public_ip_addresses.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_virtual_machine_scale_set_vm_public_ip_addresses_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_vm_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses"} # type: ignore + + @distributed_trace_async + async def get_virtual_machine_scale_set_public_ip_address( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + public_ip_address_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Get the specified public IP address in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the IP configuration. + :type ip_configuration_name: str + :param public_ip_address_name: The name of the public IP Address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + + request = build_public_ip_addresses_get_virtual_machine_scale_set_public_ip_address_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_virtual_machine_scale_set_public_ip_address.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_virtual_machine_scale_set_public_ip_address.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}"} # type: ignore + +class CustomIPPrefixesOperations: + """CustomIPPrefixesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + custom_ip_prefix_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_custom_ip_prefixes_delete_request_initial( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + custom_ip_prefix_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified custom IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the CustomIpPrefix. + :type custom_ip_prefix_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + custom_ip_prefix_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.CustomIpPrefix": + """Gets the specified custom IP prefix in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomIpPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_custom_ip_prefixes_get_request( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + custom_ip_prefix_name: str, + parameters: "_models.CustomIpPrefix", + **kwargs: Any + ) -> "_models.CustomIpPrefix": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CustomIpPrefix') + + request = build_custom_ip_prefixes_create_or_update_request_initial( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + custom_ip_prefix_name: str, + parameters: "_models.CustomIpPrefix", + **kwargs: Any + ) -> AsyncLROPoller["_models.CustomIpPrefix"]: + """Creates or updates a custom IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param parameters: Parameters supplied to the create or update custom IP prefix operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either CustomIpPrefix or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + custom_ip_prefix_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.CustomIpPrefix": + """Updates custom IP prefix tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param parameters: Parameters supplied to update custom IP prefix tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomIpPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_custom_ip_prefixes_update_tags_request( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.CustomIpPrefixListResult"]: + """Gets all the custom IP prefixes in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CustomIpPrefixListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.CustomIpPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_custom_ip_prefixes_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_custom_ip_prefixes_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("CustomIpPrefixListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.CustomIpPrefixListResult"]: + """Gets all custom IP prefixes in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CustomIpPrefixListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.CustomIpPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_custom_ip_prefixes_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_custom_ip_prefixes_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("CustomIpPrefixListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes"} # type: ignore +class DdosCustomPoliciesOperations: + """DdosCustomPoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ddos_custom_policies_delete_request_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + """Gets information about the specified DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosCustomPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ddos_custom_policies_get_request( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.DdosCustomPolicy", + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'DdosCustomPolicy') + + request = build_ddos_custom_policies_create_or_update_request_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.DdosCustomPolicy", + **kwargs: Any + ) -> AsyncLROPoller["_models.DdosCustomPolicy"]: + """Creates or updates a DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :param parameters: Parameters supplied to the create or update operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicy + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DdosCustomPolicy or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicy] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + """Update a DDoS custom policy tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :param parameters: Parameters supplied to update DDoS custom policy resource tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosCustomPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_ddos_custom_policies_update_tags_request( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + +class DdosProtectionPlansOperations: + """DdosProtectionPlansOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ddos_protection_plans_delete_request_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + """Gets information about the specified DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosProtectionPlan, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ddos_protection_plans_get_request( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.DdosProtectionPlan", + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'DdosProtectionPlan') + + request = build_ddos_protection_plans_create_or_update_request_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.DdosProtectionPlan", + **kwargs: Any + ) -> AsyncLROPoller["_models.DdosProtectionPlan"]: + """Creates or updates a DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :param parameters: Parameters supplied to the create or update operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DdosProtectionPlan or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + """Update a DDoS protection plan tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :param parameters: Parameters supplied to the update DDoS protection plan resource tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosProtectionPlan, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_ddos_protection_plans_update_tags_request( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.DdosProtectionPlanListResult"]: + """Gets all DDoS protection plans in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DdosProtectionPlanListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ddos_protection_plans_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ddos_protection_plans_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DdosProtectionPlanListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DdosProtectionPlanListResult"]: + """Gets all the DDoS protection plans in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DdosProtectionPlanListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ddos_protection_plans_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ddos_protection_plans_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DdosProtectionPlanListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans"} # type: ignore +class DscpConfigurationOperations: + """DscpConfigurationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + dscp_configuration_name: str, + parameters: "_models.DscpConfiguration", + **kwargs: Any + ) -> "_models.DscpConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'DscpConfiguration') + + request = build_dscp_configuration_create_or_update_request_initial( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + dscp_configuration_name: str, + parameters: "_models.DscpConfiguration", + **kwargs: Any + ) -> AsyncLROPoller["_models.DscpConfiguration"]: + """Creates or updates a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :param parameters: Parameters supplied to the create or update dscp configuration operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.DscpConfiguration + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DscpConfiguration or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.DscpConfiguration] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + dscp_configuration_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_dscp_configuration_delete_request_initial( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + dscp_configuration_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + dscp_configuration_name: str, + **kwargs: Any + ) -> "_models.DscpConfiguration": + """Gets a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DscpConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DscpConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_dscp_configuration_get_request( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DscpConfigurationListResult"]: + """Gets a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DscpConfigurationListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.DscpConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_dscp_configuration_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_dscp_configuration_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DscpConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.DscpConfigurationListResult"]: + """Gets all dscp configurations in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DscpConfigurationListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.DscpConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_dscp_configuration_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_dscp_configuration_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DscpConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations"} # type: ignore +class AvailableEndpointServicesOperations: + """AvailableEndpointServicesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.EndpointServicesListResult"]: + """List what values of endpoint services are available for use. + + :param location: The location to check available endpoint services. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EndpointServicesListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.EndpointServicesListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointServicesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_endpoint_services_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_endpoint_services_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("EndpointServicesListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices"} # type: ignore +class ExpressRouteCircuitAuthorizationsOperations: + """ExpressRouteCircuitAuthorizationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_authorizations_delete_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified authorization from the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitAuthorization": + """Gets the specified authorization from the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitAuthorization, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_authorizations_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + authorization_parameters: "_models.ExpressRouteCircuitAuthorization", + **kwargs: Any + ) -> "_models.ExpressRouteCircuitAuthorization": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(authorization_parameters, 'ExpressRouteCircuitAuthorization') + + request = build_express_route_circuit_authorizations_create_or_update_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + authorization_parameters: "_models.ExpressRouteCircuitAuthorization", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuitAuthorization"]: + """Creates or updates an authorization in the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :param authorization_parameters: Parameters supplied to the create or update express route + circuit authorization operation. + :type authorization_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitAuthorization or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + authorization_parameters=authorization_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AuthorizationListResult"]: + """Gets all authorizations in an express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AuthorizationListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AuthorizationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuit_authorizations_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuit_authorizations_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AuthorizationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations"} # type: ignore +class ExpressRouteCircuitPeeringsOperations: + """ExpressRouteCircuitPeeringsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_peerings_delete_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified peering from the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitPeering": + """Gets the specified peering for the express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_peerings_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + peering_parameters: "_models.ExpressRouteCircuitPeering", + **kwargs: Any + ) -> "_models.ExpressRouteCircuitPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(peering_parameters, 'ExpressRouteCircuitPeering') + + request = build_express_route_circuit_peerings_create_or_update_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + peering_parameters: "_models.ExpressRouteCircuitPeering", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuitPeering"]: + """Creates or updates a peering in the specified express route circuits. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param peering_parameters: Parameters supplied to the create or update express route circuit + peering operation. + :type peering_parameters: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitPeering or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + peering_parameters=peering_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteCircuitPeeringListResult"]: + """Gets all peerings in a specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCircuitPeeringListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeeringListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuit_peerings_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuit_peerings_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCircuitPeeringListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings"} # type: ignore +class ExpressRouteCircuitConnectionsOperations: + """ExpressRouteCircuitConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_connections_delete_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Express Route Circuit Connection from the specified express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitConnection": + """Gets the specified Express Route Circuit Connection from the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_connections_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + express_route_circuit_connection_parameters: "_models.ExpressRouteCircuitConnection", + **kwargs: Any + ) -> "_models.ExpressRouteCircuitConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(express_route_circuit_connection_parameters, 'ExpressRouteCircuitConnection') + + request = build_express_route_circuit_connections_create_or_update_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + express_route_circuit_connection_parameters: "_models.ExpressRouteCircuitConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuitConnection"]: + """Creates or updates a Express Route Circuit Connection in the specified express route circuits. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str + :param express_route_circuit_connection_parameters: Parameters supplied to the create or update + express route circuit connection operation. + :type express_route_circuit_connection_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + express_route_circuit_connection_parameters=express_route_circuit_connection_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteCircuitConnectionListResult"]: + """Gets all global reach connections associated with a private peering in an express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCircuitConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuit_connections_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuit_connections_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCircuitConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections"} # type: ignore +class PeerExpressRouteCircuitConnectionsOperations: + """PeerExpressRouteCircuitConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.PeerExpressRouteCircuitConnection": + """Gets the specified Peer Express Route Circuit Connection from the specified express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the peer express route circuit connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PeerExpressRouteCircuitConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PeerExpressRouteCircuitConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerExpressRouteCircuitConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_peer_express_route_circuit_connections_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PeerExpressRouteCircuitConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PeerExpressRouteCircuitConnectionListResult"]: + """Gets all global reach peer connections associated with a private peering in an express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PeerExpressRouteCircuitConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PeerExpressRouteCircuitConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerExpressRouteCircuitConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_peer_express_route_circuit_connections_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_peer_express_route_circuit_connections_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PeerExpressRouteCircuitConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections"} # type: ignore +class ExpressRouteCircuitsOperations: + """ExpressRouteCircuitsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_delete_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuit": + """Gets information about the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of express route circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + circuit_name: str, + parameters: "_models.ExpressRouteCircuit", + **kwargs: Any + ) -> "_models.ExpressRouteCircuit": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ExpressRouteCircuit') + + request = build_express_route_circuits_create_or_update_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + circuit_name: str, + parameters: "_models.ExpressRouteCircuit", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuit"]: + """Creates or updates an express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param parameters: Parameters supplied to the create or update express route circuit operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuit or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + circuit_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ExpressRouteCircuit": + """Updates an express route circuit tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param parameters: Parameters supplied to update express route circuit tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_express_route_circuits_update_tags_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + + async def _list_arp_table_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsArpTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsArpTableListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_list_arp_table_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_arp_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_arp_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}"} # type: ignore + + + @distributed_trace_async + async def begin_list_arp_table( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuitsArpTableListResult"]: + """Gets the currently advertised ARP table associated with the express route circuit in a resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + ExpressRouteCircuitsArpTableListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsArpTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsArpTableListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_arp_table_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_arp_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}"} # type: ignore + + async def _list_routes_table_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_list_routes_table_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_routes_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_routes_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}"} # type: ignore + + + @distributed_trace_async + async def begin_list_routes_table( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"]: + """Gets the currently advertised routes table associated with the express route circuit in a + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsRoutesTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_routes_table_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_routes_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}"} # type: ignore + + async def _list_routes_table_summary_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_list_routes_table_summary_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_routes_table_summary_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_routes_table_summary_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}"} # type: ignore + + + @distributed_trace_async + async def begin_list_routes_table_summary( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]: + """Gets the currently advertised routes table summary associated with the express route circuit in + a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + ExpressRouteCircuitsRoutesTableSummaryListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_routes_table_summary_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_routes_table_summary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}"} # type: ignore + + @distributed_trace_async + async def get_stats( + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitStats": + """Gets all the stats from an express route circuit in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitStats, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitStats + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_get_stats_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_stats.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_stats.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats"} # type: ignore + + + @distributed_trace_async + async def get_peering_stats( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitStats": + """Gets all stats from an express route circuit in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitStats, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitStats + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_get_peering_stats_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_peering_stats.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_peering_stats.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteCircuitListResult"]: + """Gets all the express route circuits in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuits_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuits_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCircuitListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteCircuitListResult"]: + """Gets all the express route circuits in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuits_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuits_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCircuitListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits"} # type: ignore +class ExpressRouteServiceProvidersOperations: + """ExpressRouteServiceProvidersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteServiceProviderListResult"]: + """Gets all the available express route service providers. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteServiceProviderListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteServiceProviderListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteServiceProviderListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_service_providers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_service_providers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteServiceProviderListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders"} # type: ignore +class ExpressRouteCrossConnectionsOperations: + """ExpressRouteCrossConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteCrossConnectionListResult"]: + """Retrieves all the ExpressRouteCrossConnections in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_cross_connections_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_cross_connections_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCrossConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteCrossConnectionListResult"]: + """Retrieves all the ExpressRouteCrossConnections in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_cross_connections_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_cross_connections_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCrossConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + cross_connection_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnection": + """Gets details about the specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group (peering location of the circuit). + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection (service key of the + circuit). + :type cross_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCrossConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connections_get_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + cross_connection_name: str, + parameters: "_models.ExpressRouteCrossConnection", + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ExpressRouteCrossConnection') + + request = build_express_route_cross_connections_create_or_update_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cross_connection_name: str, + parameters: "_models.ExpressRouteCrossConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCrossConnection"]: + """Update the specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param parameters: Parameters supplied to the update express route crossConnection operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteCrossConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + cross_connection_name: str, + cross_connection_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnection": + """Updates an express route cross connection tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the cross connection. + :type cross_connection_name: str + :param cross_connection_parameters: Parameters supplied to update express route cross + connection tags. + :type cross_connection_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCrossConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(cross_connection_parameters, 'TagsObject') + + request = build_express_route_cross_connections_update_tags_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}"} # type: ignore + + + async def _list_arp_table_initial( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsArpTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsArpTableListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connections_list_arp_table_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_arp_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_arp_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}"} # type: ignore + + + @distributed_trace_async + async def begin_list_arp_table( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuitsArpTableListResult"]: + """Gets the currently advertised ARP table associated with the express route cross connection in a + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + ExpressRouteCircuitsArpTableListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsArpTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsArpTableListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_arp_table_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_arp_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}"} # type: ignore + + async def _list_routes_table_summary_initial( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connections_list_routes_table_summary_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_routes_table_summary_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCrossConnectionsRoutesTableSummaryListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_routes_table_summary_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}"} # type: ignore + + + @distributed_trace_async + async def begin_list_routes_table_summary( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]: + """Gets the route table summary associated with the express route cross connection in a resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + ExpressRouteCrossConnectionsRoutesTableSummaryListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_routes_table_summary_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCrossConnectionsRoutesTableSummaryListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_routes_table_summary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}"} # type: ignore + + async def _list_routes_table_initial( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connections_list_routes_table_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_routes_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_routes_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}"} # type: ignore + + + @distributed_trace_async + async def begin_list_routes_table( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"]: + """Gets the currently advertised routes table associated with the express route cross connection + in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsRoutesTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_routes_table_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_routes_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}"} # type: ignore +class ExpressRouteCrossConnectionPeeringsOperations: + """ExpressRouteCrossConnectionPeeringsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + cross_connection_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteCrossConnectionPeeringList"]: + """Gets all peerings in a specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionPeeringList or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeeringList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeeringList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_cross_connection_peerings_list_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_cross_connection_peerings_list_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCrossConnectionPeeringList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connection_peerings_delete_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified peering from the ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnectionPeering": + """Gets the specified peering for the ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCrossConnectionPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connection_peerings_get_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + peering_parameters: "_models.ExpressRouteCrossConnectionPeering", + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnectionPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(peering_parameters, 'ExpressRouteCrossConnectionPeering') + + request = build_express_route_cross_connection_peerings_create_or_update_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + peering_parameters: "_models.ExpressRouteCrossConnectionPeering", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteCrossConnectionPeering"]: + """Creates or updates a peering in the specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param peering_parameters: Parameters supplied to the create or update + ExpressRouteCrossConnection peering operation. + :type peering_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteCrossConnectionPeering + or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + peering_parameters=peering_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore +class ExpressRoutePortsLocationsOperations: + """ExpressRoutePortsLocationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRoutePortsLocationListResult"]: + """Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each + location. Available bandwidths can only be obtained when retrieving a specific peering + location. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortsLocationListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsLocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortsLocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_ports_locations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_ports_locations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRoutePortsLocationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations"} # type: ignore + + @distributed_trace_async + async def get( + self, + location_name: str, + **kwargs: Any + ) -> "_models.ExpressRoutePortsLocation": + """Retrieves a single ExpressRoutePort peering location, including the list of available + bandwidths available at said peering location. + + :param location_name: Name of the requested ExpressRoutePort peering location. + :type location_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePortsLocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsLocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortsLocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_ports_locations_get_request( + subscription_id=self._config.subscription_id, + location_name=location_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePortsLocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}"} # type: ignore + +class ExpressRoutePortsOperations: + """ExpressRoutePortsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_ports_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> "_models.ExpressRoutePort": + """Retrieves the requested ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePort, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_ports_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + express_route_port_name: str, + parameters: "_models.ExpressRoutePort", + **kwargs: Any + ) -> "_models.ExpressRoutePort": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ExpressRoutePort') + + request = build_express_route_ports_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + express_route_port_name: str, + parameters: "_models.ExpressRoutePort", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRoutePort"]: + """Creates or updates the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to the create ExpressRoutePort operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRoutePort or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + express_route_port_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ExpressRoutePort": + """Update ExpressRoutePort tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to update ExpressRoutePort resource tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePort, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_express_route_ports_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRoutePortListResult"]: + """List all the ExpressRoutePort resources in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_ports_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_ports_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRoutePortListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRoutePortListResult"]: + """List all the ExpressRoutePort resources in the specified subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_ports_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_ports_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRoutePortListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts"} # type: ignore + + @distributed_trace_async + async def generate_loa( + self, + resource_group_name: str, + express_route_port_name: str, + request: "_models.GenerateExpressRoutePortsLOARequest", + **kwargs: Any + ) -> "_models.GenerateExpressRoutePortsLOAResult": + """Generate a letter of authorization for the requested ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_name: str + :param request: Request parameters supplied to generate a letter of authorization. + :type request: ~azure.mgmt.network.v2021_08_01.models.GenerateExpressRoutePortsLOARequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GenerateExpressRoutePortsLOAResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.GenerateExpressRoutePortsLOAResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GenerateExpressRoutePortsLOAResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'GenerateExpressRoutePortsLOARequest') + + request = build_express_route_ports_generate_loa_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.generate_loa.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GenerateExpressRoutePortsLOAResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + generate_loa.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/generateLoa"} # type: ignore + +class ExpressRouteLinksOperations: + """ExpressRouteLinksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + express_route_port_name: str, + link_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteLink": + """Retrieves the specified ExpressRouteLink resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param link_name: The name of the ExpressRouteLink resource. + :type link_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteLink, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_links_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + link_name=link_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteLinkListResult"]: + """Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteLinkListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_links_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_links_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteLinkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links"} # type: ignore +class ExpressRoutePortAuthorizationsOperations: + """ExpressRoutePortAuthorizationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_port_authorizations_delete_request_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified authorization from the specified express route port. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the express route port. + :type express_route_port_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + **kwargs: Any + ) -> "_models.ExpressRoutePortAuthorization": + """Gets the specified authorization from the specified express route port. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the express route port. + :type express_route_port_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePortAuthorization, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorization + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortAuthorization"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_port_authorizations_get_request( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePortAuthorization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + authorization_parameters: "_models.ExpressRoutePortAuthorization", + **kwargs: Any + ) -> "_models.ExpressRoutePortAuthorization": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortAuthorization"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(authorization_parameters, 'ExpressRoutePortAuthorization') + + request = build_express_route_port_authorizations_create_or_update_request_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRoutePortAuthorization', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRoutePortAuthorization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + authorization_parameters: "_models.ExpressRoutePortAuthorization", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRoutePortAuthorization"]: + """Creates or updates an authorization in the specified express route port. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the express route port. + :type express_route_port_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :param authorization_parameters: Parameters supplied to the create or update express route port + authorization operation. + :type authorization_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorization + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRoutePortAuthorization or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorization] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortAuthorization"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + authorization_parameters=authorization_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRoutePortAuthorization', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRoutePortAuthorizationListResult"]: + """Gets all authorizations in an express route port. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the express route port. + :type express_route_port_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortAuthorizationListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorizationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortAuthorizationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_port_authorizations_list_request( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_port_authorizations_list_request( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRoutePortAuthorizationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations"} # type: ignore +class FirewallPoliciesOperations: + """FirewallPoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policies_delete_request_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Firewall Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + firewall_policy_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.FirewallPolicy": + """Gets the specified Firewall Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policies_get_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.FirewallPolicy", + **kwargs: Any + ) -> "_models.FirewallPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FirewallPolicy') + + request = build_firewall_policies_create_or_update_request_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.FirewallPolicy", + **kwargs: Any + ) -> AsyncLROPoller["_models.FirewallPolicy"]: + """Creates or updates the specified Firewall Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Parameters supplied to the create or update Firewall Policy operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicy + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FirewallPolicy or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.FirewallPolicy] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.FirewallPolicy": + """Updates tags of a Azure Firewall Policy resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Parameters supplied to update Azure Firewall Policy tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_firewall_policies_update_tags_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.FirewallPolicyListResult"]: + """Lists all Firewall Policies in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FirewallPolicyListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_firewall_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_firewall_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("FirewallPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.FirewallPolicyListResult"]: + """Gets all the Firewall Policies in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FirewallPolicyListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_firewall_policies_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_firewall_policies_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("FirewallPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies"} # type: ignore +class FirewallPolicyRuleCollectionGroupsOperations: + """FirewallPolicyRuleCollectionGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policy_rule_collection_groups_delete_request_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified FirewallPolicyRuleCollectionGroup. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + **kwargs: Any + ) -> "_models.FirewallPolicyRuleCollectionGroup": + """Gets the specified FirewallPolicyRuleCollectionGroup. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FirewallPolicyRuleCollectionGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policy_rule_collection_groups_get_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + parameters: "_models.FirewallPolicyRuleCollectionGroup", + **kwargs: Any + ) -> "_models.FirewallPolicyRuleCollectionGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FirewallPolicyRuleCollectionGroup') + + request = build_firewall_policy_rule_collection_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + parameters: "_models.FirewallPolicyRuleCollectionGroup", + **kwargs: Any + ) -> AsyncLROPoller["_models.FirewallPolicyRuleCollectionGroup"]: + """Creates or updates the specified FirewallPolicyRuleCollectionGroup. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str + :param parameters: Parameters supplied to the create or update + FirewallPolicyRuleCollectionGroup operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FirewallPolicyRuleCollectionGroup or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.FirewallPolicyRuleCollectionGroupListResult"]: + """Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FirewallPolicyRuleCollectionGroupListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_firewall_policy_rule_collection_groups_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_firewall_policy_rule_collection_groups_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("FirewallPolicyRuleCollectionGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups"} # type: ignore +class FirewallPolicyIdpsSignaturesOperations: + """FirewallPolicyIdpsSignaturesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.IDPSQueryObject", + **kwargs: Any + ) -> "_models.QueryResults": + """Retrieves the current status of IDPS signatures for the relevant policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: + :type parameters: ~azure.mgmt.network.v2021_08_01.models.IDPSQueryObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QueryResults, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.QueryResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'IDPSQueryObject') + + request = build_firewall_policy_idps_signatures_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('QueryResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures"} # type: ignore + +class FirewallPolicyIdpsSignaturesOverridesOperations: + """FirewallPolicyIdpsSignaturesOverridesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def patch( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignaturesOverrides", + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Will update the status of policy's signature overrides for IDPS. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Will contain all properties of the object to put. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SignaturesOverrides') + + request = build_firewall_policy_idps_signatures_overrides_patch_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.patch.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + patch.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default"} # type: ignore + + + @distributed_trace_async + async def put( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignaturesOverrides", + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Will override/create a new signature overrides for the policy's IDPS. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Will contain all properties of the object to put. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SignaturesOverrides') + + request = build_firewall_policy_idps_signatures_overrides_put_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.put.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + put.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default"} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Returns all signatures overrides for a specific policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policy_idps_signatures_overrides_get_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default"} # type: ignore + + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> "_models.SignaturesOverridesList": + """Returns all signatures overrides objects for a specific policy as a list containing a single + value. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverridesList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverridesList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverridesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policy_idps_signatures_overrides_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverridesList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides"} # type: ignore + +class FirewallPolicyIdpsSignaturesFilterValuesOperations: + """FirewallPolicyIdpsSignaturesFilterValuesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignatureOverridesFilterValuesQuery", + **kwargs: Any + ) -> "_models.SignatureOverridesFilterValuesResponse": + """Retrieves the current filter values for the signatures overrides. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SignatureOverridesFilterValuesQuery + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignatureOverridesFilterValuesResponse, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignatureOverridesFilterValuesResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignatureOverridesFilterValuesResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SignatureOverridesFilterValuesQuery') + + request = build_firewall_policy_idps_signatures_filter_values_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignatureOverridesFilterValuesResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions"} # type: ignore + +class IpAllocationsOperations: + """IpAllocationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ip_allocation_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ip_allocations_delete_request_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ip_allocation_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified IpAllocation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + ip_allocation_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.IpAllocation": + """Gets the specified IpAllocation by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpAllocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IpAllocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ip_allocations_get_request( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.IpAllocation", + **kwargs: Any + ) -> "_models.IpAllocation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'IpAllocation') + + request = build_ip_allocations_create_or_update_request_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.IpAllocation", + **kwargs: Any + ) -> AsyncLROPoller["_models.IpAllocation"]: + """Creates or updates an IpAllocation in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.IpAllocation + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either IpAllocation or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.IpAllocation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IpAllocation', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.IpAllocation": + """Updates a IpAllocation tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpAllocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IpAllocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_ip_allocations_update_tags_request( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.IpAllocationListResult"]: + """Gets all IpAllocations in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpAllocationListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.IpAllocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ip_allocations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ip_allocations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IpAllocationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.IpAllocationListResult"]: + """Gets all IpAllocations in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpAllocationListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.IpAllocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ip_allocations_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ip_allocations_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IpAllocationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations"} # type: ignore +class IpGroupsOperations: + """IpGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + ip_groups_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.IpGroup": + """Gets the specified ipGroups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param expand: Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced + by the IpGroups resource. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IpGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ip_groups_get_request( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.IpGroup", + **kwargs: Any + ) -> "_models.IpGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'IpGroup') + + request = build_ip_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IpGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.IpGroup", + **kwargs: Any + ) -> AsyncLROPoller["_models.IpGroup"]: + """Creates or updates an ipGroups in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.IpGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either IpGroup or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.IpGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IpGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + @distributed_trace_async + async def update_groups( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.IpGroup": + """Updates tags of an IpGroups resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IpGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_ip_groups_update_groups_request( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_groups.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_groups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ip_groups_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ip_groups_delete_request_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ip_groups_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified ipGroups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.IpGroupListResult"]: + """Gets all IpGroups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpGroupListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.IpGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ip_groups_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ip_groups_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IpGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.IpGroupListResult"]: + """Gets all IpGroups in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpGroupListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.IpGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ip_groups_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ip_groups_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IpGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups"} # type: ignore +class LoadBalancersOperations: + """LoadBalancersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancers_delete_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + load_balancer_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.LoadBalancer": + """Gets the specified load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LoadBalancer, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LoadBalancer + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancers_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LoadBalancer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: "_models.LoadBalancer", + **kwargs: Any + ) -> "_models.LoadBalancer": + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'LoadBalancer') + + request = build_load_balancers_create_or_update_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('LoadBalancer', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('LoadBalancer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: "_models.LoadBalancer", + **kwargs: Any + ) -> AsyncLROPoller["_models.LoadBalancer"]: + """Creates or updates a load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param parameters: Parameters supplied to the create or update load balancer operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.LoadBalancer + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.LoadBalancer] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('LoadBalancer', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.LoadBalancer": + """Updates a load balancer tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LoadBalancer, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LoadBalancer + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_load_balancers_update_tags_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LoadBalancer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancerListResult"]: + """Gets all the load balancers in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancers_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancers_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancerListResult"]: + """Gets all the load balancers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancers_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancers_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers"} # type: ignore + + async def _swap_public_ip_addresses_initial( # pylint: disable=inconsistent-return-statements + self, + location: str, + parameters: "_models.LoadBalancerVipSwapRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'LoadBalancerVipSwapRequest') + + request = build_load_balancers_swap_public_ip_addresses_request_initial( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._swap_public_ip_addresses_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _swap_public_ip_addresses_initial.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses"} # type: ignore + + + @distributed_trace_async + async def begin_swap_public_ip_addresses( # pylint: disable=inconsistent-return-statements + self, + location: str, + parameters: "_models.LoadBalancerVipSwapRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Swaps VIPs between two load balancers. + + :param location: The region where load balancers are located at. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.LoadBalancerVipSwapRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._swap_public_ip_addresses_initial( + location=location, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_swap_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses"} # type: ignore + + async def _list_inbound_nat_rule_port_mappings_initial( + self, + group_name: str, + load_balancer_name: str, + backend_pool_name: str, + parameters: "_models.QueryInboundNatRulePortMappingRequest", + **kwargs: Any + ) -> "_models.BackendAddressInboundNatRulePortMappings": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressInboundNatRulePortMappings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'QueryInboundNatRulePortMappingRequest') + + request = build_load_balancers_list_inbound_nat_rule_port_mappings_request_initial( + group_name=group_name, + load_balancer_name=load_balancer_name, + backend_pool_name=backend_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._list_inbound_nat_rule_port_mappings_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_inbound_nat_rule_port_mappings_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping"} # type: ignore + + + @distributed_trace_async + async def begin_list_inbound_nat_rule_port_mappings( + self, + group_name: str, + load_balancer_name: str, + backend_pool_name: str, + parameters: "_models.QueryInboundNatRulePortMappingRequest", + **kwargs: Any + ) -> AsyncLROPoller["_models.BackendAddressInboundNatRulePortMappings"]: + """List of inbound NAT rule port mappings. + + :param group_name: The name of the resource group. + :type group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_pool_name: The name of the load balancer backend address pool. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.QueryInboundNatRulePortMappingRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + BackendAddressInboundNatRulePortMappings or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.BackendAddressInboundNatRulePortMappings] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressInboundNatRulePortMappings"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_inbound_nat_rule_port_mappings_initial( + group_name=group_name, + load_balancer_name=load_balancer_name, + backend_pool_name=backend_pool_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_inbound_nat_rule_port_mappings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping"} # type: ignore +class LoadBalancerBackendAddressPoolsOperations: + """LoadBalancerBackendAddressPoolsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancerBackendAddressPoolListResult"]: + """Gets all the load balancer backed address pools. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerBackendAddressPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_backend_address_pools_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_backend_address_pools_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerBackendAddressPoolListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + **kwargs: Any + ) -> "_models.BackendAddressPool": + """Gets load balancer backend address pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackendAddressPool, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.BackendAddressPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_backend_address_pools_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: "_models.BackendAddressPool", + **kwargs: Any + ) -> "_models.BackendAddressPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackendAddressPool') + + request = build_load_balancer_backend_address_pools_create_or_update_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: "_models.BackendAddressPool", + **kwargs: Any + ) -> AsyncLROPoller["_models.BackendAddressPool"]: + """Creates or updates a load balancer backend address pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.BackendAddressPool + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackendAddressPool or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.BackendAddressPool] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_backend_address_pools_delete_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified load balancer backend address pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore +class LoadBalancerFrontendIPConfigurationsOperations: + """LoadBalancerFrontendIPConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancerFrontendIPConfigurationListResult"]: + """Gets all the load balancer frontend IP configurations. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerFrontendIPConfigurationListResult or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerFrontendIPConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerFrontendIPConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_frontend_ip_configurations_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_frontend_ip_configurations_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerFrontendIPConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + load_balancer_name: str, + frontend_ip_configuration_name: str, + **kwargs: Any + ) -> "_models.FrontendIPConfiguration": + """Gets load balancer frontend IP configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param frontend_ip_configuration_name: The name of the frontend IP configuration. + :type frontend_ip_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FrontendIPConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendIPConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_frontend_ip_configurations_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + frontend_ip_configuration_name=frontend_ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FrontendIPConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}"} # type: ignore + +class InboundNatRulesOperations: + """InboundNatRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.InboundNatRuleListResult"]: + """Gets all the inbound NAT rules in a load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either InboundNatRuleListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.InboundNatRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_inbound_nat_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_inbound_nat_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("InboundNatRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_inbound_nat_rules_delete_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified load balancer inbound NAT rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. + :type inbound_nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.InboundNatRule": + """Gets the specified load balancer inbound NAT rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. + :type inbound_nat_rule_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: InboundNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.InboundNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_inbound_nat_rules_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('InboundNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: "_models.InboundNatRule", + **kwargs: Any + ) -> "_models.InboundNatRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(inbound_nat_rule_parameters, 'InboundNatRule') + + request = build_inbound_nat_rules_create_or_update_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('InboundNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('InboundNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: "_models.InboundNatRule", + **kwargs: Any + ) -> AsyncLROPoller["_models.InboundNatRule"]: + """Creates or updates a load balancer inbound NAT rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. + :type inbound_nat_rule_name: str + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT + rule operation. + :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.InboundNatRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.InboundNatRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + inbound_nat_rule_parameters=inbound_nat_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('InboundNatRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore +class LoadBalancerLoadBalancingRulesOperations: + """LoadBalancerLoadBalancingRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancerLoadBalancingRuleListResult"]: + """Gets all the load balancing rules in a load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerLoadBalancingRuleListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerLoadBalancingRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerLoadBalancingRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_load_balancing_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_load_balancing_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerLoadBalancingRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + load_balancer_name: str, + load_balancing_rule_name: str, + **kwargs: Any + ) -> "_models.LoadBalancingRule": + """Gets the specified load balancer load balancing rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param load_balancing_rule_name: The name of the load balancing rule. + :type load_balancing_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LoadBalancingRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LoadBalancingRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancingRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_load_balancing_rules_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + load_balancing_rule_name=load_balancing_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LoadBalancingRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}"} # type: ignore + +class LoadBalancerOutboundRulesOperations: + """LoadBalancerOutboundRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancerOutboundRuleListResult"]: + """Gets all the outbound rules in a load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerOutboundRuleListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerOutboundRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerOutboundRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_outbound_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_outbound_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerOutboundRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + load_balancer_name: str, + outbound_rule_name: str, + **kwargs: Any + ) -> "_models.OutboundRule": + """Gets the specified load balancer outbound rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param outbound_rule_name: The name of the outbound rule. + :type outbound_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OutboundRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.OutboundRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_outbound_rules_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + outbound_rule_name=outbound_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OutboundRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}"} # type: ignore + +class LoadBalancerNetworkInterfacesOperations: + """LoadBalancerNetworkInterfacesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets associated load balancer network interfaces. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_network_interfaces_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_network_interfaces_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces"} # type: ignore +class LoadBalancerProbesOperations: + """LoadBalancerProbesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancerProbeListResult"]: + """Gets all the load balancer probes. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerProbeListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerProbeListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerProbeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_probes_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_probes_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerProbeListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + load_balancer_name: str, + probe_name: str, + **kwargs: Any + ) -> "_models.Probe": + """Gets load balancer probe. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param probe_name: The name of the probe. + :type probe_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Probe, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.Probe + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Probe"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_probes_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + probe_name=probe_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Probe', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"} # type: ignore + +class NatGatewaysOperations: + """NatGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + nat_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_nat_gateways_delete_request_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + nat_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified nat gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + nat_gateway_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NatGateway": + """Gets the specified nat gateway in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NatGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NatGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_nat_gateways_get_request( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.NatGateway", + **kwargs: Any + ) -> Optional["_models.NatGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NatGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NatGateway') + + request = build_nat_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NatGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.NatGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.NatGateway"]: + """Creates or updates a nat gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NatGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NatGateway or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.NatGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NatGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NatGateway": + """Updates nat gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NatGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NatGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_nat_gateways_update_tags_request( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NatGatewayListResult"]: + """Gets all the Nat Gateways in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NatGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NatGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_nat_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_nat_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NatGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NatGatewayListResult"]: + """Gets all nat gateways in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NatGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NatGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_nat_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_nat_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NatGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways"} # type: ignore +class NetworkInterfaceIPConfigurationsOperations: + """NetworkInterfaceIPConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceIPConfigurationListResult"]: + """Get all ip configurations in a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interface_ip_configurations_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interface_ip_configurations_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceIPConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_interface_name: str, + ip_configuration_name: str, + **kwargs: Any + ) -> "_models.NetworkInterfaceIPConfiguration": + """Gets the specified network interface ip configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the ip configuration name. + :type ip_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterfaceIPConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interface_ip_configurations_get_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}"} # type: ignore + +class NetworkInterfaceLoadBalancersOperations: + """NetworkInterfaceLoadBalancersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceLoadBalancerListResult"]: + """List all load balancers in a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceLoadBalancerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceLoadBalancerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interface_load_balancers_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interface_load_balancers_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceLoadBalancerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers"} # type: ignore +class NetworkInterfaceTapConfigurationsOperations: + """NetworkInterfaceTapConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interface_tap_configurations_delete_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified tap configuration from the NetworkInterface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + **kwargs: Any + ) -> "_models.NetworkInterfaceTapConfiguration": + """Get the specified tap configuration on a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterfaceTapConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interface_tap_configurations_get_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: "_models.NetworkInterfaceTapConfiguration", + **kwargs: Any + ) -> "_models.NetworkInterfaceTapConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(tap_configuration_parameters, 'NetworkInterfaceTapConfiguration') + + request = build_network_interface_tap_configurations_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: "_models.NetworkInterfaceTapConfiguration", + **kwargs: Any + ) -> AsyncLROPoller["_models.NetworkInterfaceTapConfiguration"]: + """Creates or updates a Tap configuration in the specified NetworkInterface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. + :type tap_configuration_parameters: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NetworkInterfaceTapConfiguration or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + tap_configuration_parameters=tap_configuration_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceTapConfigurationListResult"]: + """Get all Tap configurations in a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceTapConfigurationListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interface_tap_configurations_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interface_tap_configurations_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceTapConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations"} # type: ignore +class NetworkProfilesOperations: + """NetworkProfilesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_profile_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_profiles_delete_request_initial( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_profile_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified network profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the NetworkProfile. + :type network_profile_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_profile_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkProfile": + """Gets the specified network profile in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the public IP prefix. + :type network_profile_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_profiles_get_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + network_profile_name: str, + parameters: "_models.NetworkProfile", + **kwargs: Any + ) -> "_models.NetworkProfile": + """Creates or updates a network profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkProfile + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkProfile') + + request = build_network_profiles_create_or_update_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + network_profile_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkProfile": + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_profiles_update_tags_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkProfileListResult"]: + """Gets all the network profiles in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkProfileListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkProfileListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_profiles_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_profiles_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkProfileListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkProfileListResult"]: + """Gets all network profiles in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkProfileListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkProfileListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_profiles_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_profiles_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkProfileListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles"} # type: ignore +class NetworkSecurityGroupsOperations: + """NetworkSecurityGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_security_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_security_groups_delete_request_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_security_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_security_group_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkSecurityGroup": + """Gets the specified network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_security_groups_get_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: "_models.NetworkSecurityGroup", + **kwargs: Any + ) -> "_models.NetworkSecurityGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkSecurityGroup') + + request = build_network_security_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: "_models.NetworkSecurityGroup", + **kwargs: Any + ) -> AsyncLROPoller["_models.NetworkSecurityGroup"]: + """Creates or updates a network security group in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param parameters: Parameters supplied to the create or update network security group + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkSecurityGroup": + """Updates a network security group tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_security_groups_update_tags_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkSecurityGroupListResult"]: + """Gets all network security groups in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_security_groups_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_security_groups_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkSecurityGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkSecurityGroupListResult"]: + """Gets all network security groups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_security_groups_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_security_groups_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkSecurityGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups"} # type: ignore +class SecurityRulesOperations: + """SecurityRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_security_rules_delete_request_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified network security rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. + :type security_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + **kwargs: Any + ) -> "_models.SecurityRule": + """Get the specified network security rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. + :type security_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SecurityRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_security_rules_get_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + security_rule_parameters: "_models.SecurityRule", + **kwargs: Any + ) -> "_models.SecurityRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(security_rule_parameters, 'SecurityRule') + + request = build_security_rules_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + security_rule_parameters: "_models.SecurityRule", + **kwargs: Any + ) -> AsyncLROPoller["_models.SecurityRule"]: + """Creates or updates a security rule in the specified network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. + :type security_rule_name: str + :param security_rule_parameters: Parameters supplied to the create or update network security + rule operation. + :type security_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.SecurityRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + security_rule_parameters=security_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('SecurityRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_security_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.SecurityRuleListResult"]: + """Gets all security rules in a network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityRuleListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.SecurityRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_security_rules_list_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_security_rules_list_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules"} # type: ignore +class DefaultSecurityRulesOperations: + """DefaultSecurityRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + network_security_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.SecurityRuleListResult"]: + """Gets all default security rules in a network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityRuleListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.SecurityRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_default_security_rules_list_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_default_security_rules_list_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_security_group_name: str, + default_security_rule_name: str, + **kwargs: Any + ) -> "_models.SecurityRule": + """Get the specified default network security rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param default_security_rule_name: The name of the default security rule. + :type default_security_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SecurityRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_default_security_rules_get_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + default_security_rule_name=default_security_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}"} # type: ignore + +class NetworkVirtualAppliancesOperations: + """NetworkVirtualAppliancesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_virtual_appliance_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_virtual_appliances_delete_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_virtual_appliance_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + """Gets the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualAppliance, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_virtual_appliances_get_request( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + """Updates a Network Virtual Appliance. + + :param resource_group_name: The resource group name of Network Virtual Appliance. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance being updated. + :type network_virtual_appliance_name: str + :param parameters: Parameters supplied to Update Network Virtual Appliance Tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualAppliance, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_virtual_appliances_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.NetworkVirtualAppliance", + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkVirtualAppliance') + + request = build_network_virtual_appliances_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.NetworkVirtualAppliance", + **kwargs: Any + ) -> AsyncLROPoller["_models.NetworkVirtualAppliance"]: + """Creates or updates the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NetworkVirtualAppliance or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkVirtualApplianceListResult"]: + """Lists all Network Virtual Appliances in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_virtual_appliances_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_virtual_appliances_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkVirtualApplianceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkVirtualApplianceListResult"]: + """Gets all Network Virtual Appliances in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_virtual_appliances_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_virtual_appliances_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkVirtualApplianceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances"} # type: ignore +class VirtualApplianceSitesOperations: + """VirtualApplianceSitesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_appliance_sites_delete_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified site from a Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + **kwargs: Any + ) -> "_models.VirtualApplianceSite": + """Gets the specified Virtual Appliance Site. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualApplianceSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_appliance_sites_get_request( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + parameters: "_models.VirtualApplianceSite", + **kwargs: Any + ) -> "_models.VirtualApplianceSite": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualApplianceSite') + + request = build_virtual_appliance_sites_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + parameters: "_models.VirtualApplianceSite", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualApplianceSite"]: + """Creates or updates the specified Network Virtual Appliance Site. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance Site + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSite + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualApplianceSite or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSite] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkVirtualApplianceSiteListResult"]: + """Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceSiteListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSiteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSiteListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_appliance_sites_list_request( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_appliance_sites_list_request( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkVirtualApplianceSiteListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites"} # type: ignore +class VirtualApplianceSkusOperations: + """VirtualApplianceSkusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkVirtualApplianceSkuListResult"]: + """List all SKUs available for a virtual appliance. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceSkuListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSkuListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSkuListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_appliance_skus_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_appliance_skus_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkVirtualApplianceSkuListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus"} # type: ignore + + @distributed_trace_async + async def get( + self, + sku_name: str, + **kwargs: Any + ) -> "_models.NetworkVirtualApplianceSku": + """Retrieves a single available sku for network virtual appliance. + + :param sku_name: Name of the Sku. + :type sku_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualApplianceSku, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSku + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSku"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_appliance_skus_get_request( + subscription_id=self._config.subscription_id, + sku_name=sku_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualApplianceSku', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}"} # type: ignore + +class InboundSecurityRuleOperations: + """InboundSecurityRuleOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + parameters: "_models.InboundSecurityRule", + **kwargs: Any + ) -> "_models.InboundSecurityRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundSecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'InboundSecurityRule') + + request = build_inbound_security_rule_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + rule_collection_name=rule_collection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + parameters: "_models.InboundSecurityRule", + **kwargs: Any + ) -> AsyncLROPoller["_models.InboundSecurityRule"]: + """Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param rule_collection_name: The name of security rule collection. + :type rule_collection_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance + Inbound Security Rules operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.InboundSecurityRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either InboundSecurityRule or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.InboundSecurityRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundSecurityRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + rule_collection_name=rule_collection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}"} # type: ignore +class NetworkWatchersOperations: # pylint: disable=too-many-public-methods + """NetworkWatchersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NetworkWatcher", + **kwargs: Any + ) -> "_models.NetworkWatcher": + """Creates or updates a network watcher in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the network watcher resource. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkWatcher + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkWatcher, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkWatcher + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkWatcher') + + request = build_network_watchers_create_or_update_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkWatcher', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkWatcher', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> "_models.NetworkWatcher": + """Gets the specified network watcher by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkWatcher, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkWatcher + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_watchers_get_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkWatcher', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_watchers_delete_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified network watcher resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkWatcher": + """Updates a network watcher tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters supplied to update network watcher tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkWatcher, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkWatcher + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_watchers_update_tags_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkWatcher', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkWatcherListResult"]: + """Gets all network watchers by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkWatcherListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkWatcherListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_watchers_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_watchers_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkWatcherListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkWatcherListResult"]: + """Gets all network watchers by subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkWatcherListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkWatcherListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_watchers_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_watchers_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkWatcherListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers"} # type: ignore + + @distributed_trace_async + async def get_topology( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.TopologyParameters", + **kwargs: Any + ) -> "_models.Topology": + """Gets the current network topology by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the representation of topology. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TopologyParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Topology, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.Topology + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Topology"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TopologyParameters') + + request = build_network_watchers_get_topology_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get_topology.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Topology', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_topology.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology"} # type: ignore + + + async def _verify_ip_flow_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.VerificationIPFlowParameters", + **kwargs: Any + ) -> "_models.VerificationIPFlowResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VerificationIPFlowParameters') + + request = build_network_watchers_verify_ip_flow_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._verify_ip_flow_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _verify_ip_flow_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify"} # type: ignore + + + @distributed_trace_async + async def begin_verify_ip_flow( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.VerificationIPFlowParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.VerificationIPFlowResult"]: + """Verify IP flow from the specified VM to a location given the currently configured NSG rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the IP flow to be verified. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VerificationIPFlowParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VerificationIPFlowResult or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VerificationIPFlowResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._verify_ip_flow_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_verify_ip_flow.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify"} # type: ignore + + async def _get_next_hop_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NextHopParameters", + **kwargs: Any + ) -> "_models.NextHopResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NextHopParameters') + + request = build_network_watchers_get_next_hop_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_next_hop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NextHopResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('NextHopResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_next_hop_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop"} # type: ignore + + + @distributed_trace_async + async def begin_get_next_hop( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NextHopParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.NextHopResult"]: + """Gets the next hop from the specified VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the source and destination endpoint. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NextHopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NextHopResult or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.NextHopResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_next_hop_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NextHopResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_next_hop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop"} # type: ignore + + async def _get_vm_security_rules_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.SecurityGroupViewParameters", + **kwargs: Any + ) -> "_models.SecurityGroupViewResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SecurityGroupViewParameters') + + request = build_network_watchers_get_vm_security_rules_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_vm_security_rules_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_vm_security_rules_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView"} # type: ignore + + + @distributed_trace_async + async def begin_get_vm_security_rules( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.SecurityGroupViewParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.SecurityGroupViewResult"]: + """Gets the configured and effective security group rules on the specified VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the VM to check security groups for. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SecurityGroupViewParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SecurityGroupViewResult or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.SecurityGroupViewResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_vm_security_rules_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_vm_security_rules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView"} # type: ignore + + async def _get_troubleshooting_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.TroubleshootingParameters", + **kwargs: Any + ) -> "_models.TroubleshootingResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TroubleshootingParameters') + + request = build_network_watchers_get_troubleshooting_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_troubleshooting_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_troubleshooting_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot"} # type: ignore + + + @distributed_trace_async + async def begin_get_troubleshooting( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.TroubleshootingParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.TroubleshootingResult"]: + """Initiate troubleshooting on a specified resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that define the resource to troubleshoot. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TroubleshootingParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either TroubleshootingResult or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.TroubleshootingResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_troubleshooting_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_troubleshooting.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot"} # type: ignore + + async def _get_troubleshooting_result_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.QueryTroubleshootingParameters", + **kwargs: Any + ) -> "_models.TroubleshootingResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'QueryTroubleshootingParameters') + + request = build_network_watchers_get_troubleshooting_result_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_troubleshooting_result_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_troubleshooting_result_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult"} # type: ignore + + + @distributed_trace_async + async def begin_get_troubleshooting_result( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.QueryTroubleshootingParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.TroubleshootingResult"]: + """Get the last completed troubleshooting result on a specified resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that define the resource to query the troubleshooting result. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.QueryTroubleshootingParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either TroubleshootingResult or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.TroubleshootingResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_troubleshooting_result_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_troubleshooting_result.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult"} # type: ignore + + async def _set_flow_log_configuration_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.FlowLogInformation", + **kwargs: Any + ) -> "_models.FlowLogInformation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FlowLogInformation') + + request = build_network_watchers_set_flow_log_configuration_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._set_flow_log_configuration_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _set_flow_log_configuration_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog"} # type: ignore + + + @distributed_trace_async + async def begin_set_flow_log_configuration( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.FlowLogInformation", + **kwargs: Any + ) -> AsyncLROPoller["_models.FlowLogInformation"]: + """Configures flow log and traffic analytics (optional) on a specified resource. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that define the configuration of flow log. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FlowLogInformation + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FlowLogInformation or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.FlowLogInformation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._set_flow_log_configuration_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_set_flow_log_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog"} # type: ignore + + async def _get_flow_log_status_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.FlowLogStatusParameters", + **kwargs: Any + ) -> "_models.FlowLogInformation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FlowLogStatusParameters') + + request = build_network_watchers_get_flow_log_status_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_flow_log_status_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_flow_log_status_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus"} # type: ignore + + + @distributed_trace_async + async def begin_get_flow_log_status( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.FlowLogStatusParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.FlowLogInformation"]: + """Queries status of flow log and traffic analytics (optional) on a specified resource. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that define a resource to query flow log and traffic analytics + (optional) status. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FlowLogStatusParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FlowLogInformation or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.FlowLogInformation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_flow_log_status_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_flow_log_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus"} # type: ignore + + async def _check_connectivity_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.ConnectivityParameters", + **kwargs: Any + ) -> "_models.ConnectivityInformation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ConnectivityParameters') + + request = build_network_watchers_check_connectivity_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._check_connectivity_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectivityInformation', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConnectivityInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _check_connectivity_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck"} # type: ignore + + + @distributed_trace_async + async def begin_check_connectivity( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.ConnectivityParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConnectivityInformation"]: + """Verifies the possibility of establishing a direct TCP connection from a virtual machine to a + given endpoint including another VM or an arbitrary remote server. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that determine how the connectivity check will be performed. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ConnectivityParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConnectivityInformation or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectivityInformation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._check_connectivity_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectivityInformation', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_check_connectivity.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck"} # type: ignore + + async def _get_azure_reachability_report_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.AzureReachabilityReportParameters", + **kwargs: Any + ) -> "_models.AzureReachabilityReport": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureReachabilityReport"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'AzureReachabilityReportParameters') + + request = build_network_watchers_get_azure_reachability_report_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_azure_reachability_report_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_azure_reachability_report_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport"} # type: ignore + + + @distributed_trace_async + async def begin_get_azure_reachability_report( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.AzureReachabilityReportParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.AzureReachabilityReport"]: + """NOTE: This feature is currently in preview and still being tested for stability. Gets the + relative latency score for internet service providers from a specified location to Azure + regions. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that determine Azure reachability report configuration. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AzureReachabilityReport or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReport] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureReachabilityReport"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_azure_reachability_report_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_azure_reachability_report.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport"} # type: ignore + + async def _list_available_providers_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.AvailableProvidersListParameters", + **kwargs: Any + ) -> "_models.AvailableProvidersList": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableProvidersList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'AvailableProvidersListParameters') + + request = build_network_watchers_list_available_providers_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._list_available_providers_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_available_providers_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList"} # type: ignore + + + @distributed_trace_async + async def begin_list_available_providers( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.AvailableProvidersListParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.AvailableProvidersList"]: + """NOTE: This feature is currently in preview and still being tested for stability. Lists all + available internet service providers for a specified Azure region. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that scope the list of available providers. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.AvailableProvidersListParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AvailableProvidersList or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.AvailableProvidersList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableProvidersList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_available_providers_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_available_providers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList"} # type: ignore + + async def _get_network_configuration_diagnostic_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NetworkConfigurationDiagnosticParameters", + **kwargs: Any + ) -> "_models.NetworkConfigurationDiagnosticResponse": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkConfigurationDiagnosticResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkConfigurationDiagnosticParameters') + + request = build_network_watchers_get_network_configuration_diagnostic_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_network_configuration_diagnostic_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_network_configuration_diagnostic_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic"} # type: ignore + + + @distributed_trace_async + async def begin_get_network_configuration_diagnostic( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NetworkConfigurationDiagnosticParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.NetworkConfigurationDiagnosticResponse"]: + """Gets Network Configuration Diagnostic data to help customers understand and debug network + behavior. It provides detailed information on what security rules were applied to a specified + traffic flow and the result of evaluating these rules. Customers must provide details of a flow + like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, + the rules evaluated for the specified flow and the evaluation results. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters to get network configuration diagnostic. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + NetworkConfigurationDiagnosticResponse or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkConfigurationDiagnosticResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_network_configuration_diagnostic_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_network_configuration_diagnostic.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic"} # type: ignore +class PacketCapturesOperations: + """PacketCapturesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_initial( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + parameters: "_models.PacketCapture", + **kwargs: Any + ) -> "_models.PacketCaptureResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PacketCapture') + + request = build_packet_captures_create_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + parameters: "_models.PacketCapture", + **kwargs: Any + ) -> AsyncLROPoller["_models.PacketCaptureResult"]: + """Create and start a packet capture on the specified VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param packet_capture_name: The name of the packet capture session. + :type packet_capture_name: str + :param parameters: Parameters that define the create packet capture operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PacketCapture + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PacketCaptureResult or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PacketCaptureResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> "_models.PacketCaptureResult": + """Gets a packet capture session by name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param packet_capture_name: The name of the packet capture session. + :type packet_capture_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PacketCaptureResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PacketCaptureResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_packet_captures_get_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_packet_captures_delete_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified packet capture session. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param packet_capture_name: The name of the packet capture session. + :type packet_capture_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + async def _stop_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_packet_captures_stop_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop"} # type: ignore + + + @distributed_trace_async + async def begin_stop( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Stops a specified packet capture session. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param packet_capture_name: The name of the packet capture session. + :type packet_capture_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop"} # type: ignore + + async def _get_status_initial( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> "_models.PacketCaptureQueryStatusResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_packet_captures_get_status_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_status_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_status_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus"} # type: ignore + + + @distributed_trace_async + async def begin_get_status( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.PacketCaptureQueryStatusResult"]: + """Query the status of a running packet capture session. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param packet_capture_name: The name given to the packet capture session. + :type packet_capture_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PacketCaptureQueryStatusResult or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PacketCaptureQueryStatusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_status_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PacketCaptureListResult"]: + """Lists all packet capture sessions within the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PacketCaptureListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PacketCaptureListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_packet_captures_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_packet_captures_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PacketCaptureListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures"} # type: ignore +class ConnectionMonitorsOperations: + """ConnectionMonitorsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + parameters: "_models.ConnectionMonitor", + migrate: Optional[str] = None, + **kwargs: Any + ) -> "_models.ConnectionMonitorResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ConnectionMonitor') + + request = build_connection_monitors_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + migrate=migrate, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + parameters: "_models.ConnectionMonitor", + migrate: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.ConnectionMonitorResult"]: + """Create or update a connection monitor. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :param parameters: Parameters that define the operation to create a connection monitor. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitor + :param migrate: Value indicating whether connection monitor V1 should be migrated to V2 format. + Default value is None. + :type migrate: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConnectionMonitorResult or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + parameters=parameters, + migrate=migrate, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> "_models.ConnectionMonitorResult": + """Gets a connection monitor by name. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionMonitorResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_get_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_delete_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified connection monitor. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ConnectionMonitorResult": + """Update tags of the specified connection monitor. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :param parameters: Parameters supplied to update connection monitor tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionMonitorResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_connection_monitors_update_tags_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + + async def _stop_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_stop_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop"} # type: ignore + + + @distributed_trace_async + async def begin_stop( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Stops the specified connection monitor. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop"} # type: ignore + + async def _start_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_start_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._start_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start"} # type: ignore + + + @distributed_trace_async + async def begin_start( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Starts the specified connection monitor. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start"} # type: ignore + + async def _query_initial( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> "_models.ConnectionMonitorQueryResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorQueryResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_query_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._query_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionMonitorQueryResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConnectionMonitorQueryResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _query_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query"} # type: ignore + + + @distributed_trace_async + async def begin_query( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.ConnectionMonitorQueryResult"]: + """Query a snapshot of the most recent connection states. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name given to the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConnectionMonitorQueryResult or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorQueryResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorQueryResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._query_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectionMonitorQueryResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_query.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ConnectionMonitorListResult"]: + """Lists all connection monitors for the specified Network Watcher. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConnectionMonitorListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_connection_monitors_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_connection_monitors_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ConnectionMonitorListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors"} # type: ignore +class FlowLogsOperations: + """FlowLogsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.FlowLog", + **kwargs: Any + ) -> "_models.FlowLog": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FlowLog') + + request = build_flow_logs_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FlowLog', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('FlowLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.FlowLog", + **kwargs: Any + ) -> AsyncLROPoller["_models.FlowLog"]: + """Create or update a flow log for the specified network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log. + :type flow_log_name: str + :param parameters: Parameters that define the create or update flow log resource. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FlowLog + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either FlowLog or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.FlowLog] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FlowLog', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.FlowLog": + """Update tags of the specified flow log. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log. + :type flow_log_name: str + :param parameters: Parameters supplied to update flow log tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FlowLog, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FlowLog + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_flow_logs_update_tags_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FlowLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + **kwargs: Any + ) -> "_models.FlowLog": + """Gets a flow log resource by name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log resource. + :type flow_log_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FlowLog, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FlowLog + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_flow_logs_get_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FlowLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_flow_logs_delete_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified flow log resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log resource. + :type flow_log_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.FlowLogListResult"]: + """Lists all flow log resources for the specified Network Watcher. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FlowLogListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.FlowLogListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_flow_logs_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_flow_logs_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("FlowLogListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs"} # type: ignore +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Lists all of the available Network Rest API operations. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_operations_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_operations_list_request( + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/providers/Microsoft.Network/operations"} # type: ignore +class PrivateEndpointsOperations: + """PrivateEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + private_endpoint_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_endpoints_delete_request_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + private_endpoint_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + private_endpoint_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PrivateEndpoint": + """Gets the specified private endpoint by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpoint, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_endpoints_get_request( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + private_endpoint_name: str, + parameters: "_models.PrivateEndpoint", + **kwargs: Any + ) -> "_models.PrivateEndpoint": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateEndpoint') + + request = build_private_endpoints_create_or_update_request_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + private_endpoint_name: str, + parameters: "_models.PrivateEndpoint", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpoint"]: + """Creates or updates an private endpoint in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param parameters: Parameters supplied to the create or update private endpoint operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateEndpoint or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointListResult"]: + """Gets all private endpoints in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_endpoints_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_endpoints_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints"} # type: ignore + + @distributed_trace + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointListResult"]: + """Gets all private endpoints in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_endpoints_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_endpoints_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints"} # type: ignore +class AvailablePrivateEndpointTypesOperations: + """AvailablePrivateEndpointTypesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.AvailablePrivateEndpointTypesResult"]: + """Returns all of the resource types that can be linked to a Private Endpoint in this subscription + in this region. + + :param location: The location of the domain name. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailablePrivateEndpointTypesResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailablePrivateEndpointTypesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailablePrivateEndpointTypesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_private_endpoint_types_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_private_endpoint_types_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AvailablePrivateEndpointTypesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + location: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AvailablePrivateEndpointTypesResult"]: + """Returns all of the resource types that can be linked to a Private Endpoint in this subscription + in this region. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailablePrivateEndpointTypesResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailablePrivateEndpointTypesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailablePrivateEndpointTypesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_private_endpoint_types_list_by_resource_group_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_private_endpoint_types_list_by_resource_group_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AvailablePrivateEndpointTypesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes"} # type: ignore +class PrivateDnsZoneGroupsOperations: + """PrivateDnsZoneGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_dns_zone_groups_delete_request_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private dns zone group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> "_models.PrivateDnsZoneGroup": + """Gets the private dns zone group resource by specified private dns zone group name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateDnsZoneGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_dns_zone_groups_get_request( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + parameters: "_models.PrivateDnsZoneGroup", + **kwargs: Any + ) -> "_models.PrivateDnsZoneGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateDnsZoneGroup') + + request = build_private_dns_zone_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + parameters: "_models.PrivateDnsZoneGroup", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateDnsZoneGroup"]: + """Creates or updates a private dns zone group in the specified private endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :param parameters: Parameters supplied to the create or update private dns zone group + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateDnsZoneGroup or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + @distributed_trace + def list( + self, + private_endpoint_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateDnsZoneGroupListResult"]: + """Gets all private dns zone groups in a private endpoint. + + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateDnsZoneGroupListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_dns_zone_groups_list_request( + private_endpoint_name=private_endpoint_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_dns_zone_groups_list_request( + private_endpoint_name=private_endpoint_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateDnsZoneGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups"} # type: ignore +class PrivateLinkServicesOperations: + """PrivateLinkServicesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_link_services_delete_request_initial( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private link service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PrivateLinkService": + """Gets the specified private link service by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkService, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateLinkService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_link_services_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + parameters: "_models.PrivateLinkService", + **kwargs: Any + ) -> "_models.PrivateLinkService": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateLinkService') + + request = build_private_link_services_create_or_update_request_initial( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateLinkService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: "_models.PrivateLinkService", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateLinkService"]: + """Creates or updates an private link service in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param parameters: Parameters supplied to the create or update private link service operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PrivateLinkService + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateLinkService or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateLinkService] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateLinkService', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkServiceListResult"]: + """Gets all private link services in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkServiceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateLinkServiceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices"} # type: ignore + + @distributed_trace + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkServiceListResult"]: + """Gets all private link service in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkServiceListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateLinkServiceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices"} # type: ignore + + @distributed_trace_async + async def get_private_endpoint_connection( + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Get the specific private end point connection by specific private link service in the resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_link_services_get_private_endpoint_connection_request( + resource_group_name=resource_group_name, + service_name=service_name, + pe_connection_name=pe_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_private_endpoint_connection.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}"} # type: ignore + + + @distributed_trace_async + async def update_private_endpoint_connection( + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Approve or reject private end point connection for a private link service in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :param parameters: Parameters supplied to approve or reject the private end point connection. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateEndpointConnection') + + request = build_private_link_services_update_private_endpoint_connection_request( + resource_group_name=resource_group_name, + service_name=service_name, + pe_connection_name=pe_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_private_endpoint_connection.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}"} # type: ignore + + + async def _delete_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_link_services_delete_private_endpoint_connection_request_initial( + resource_group_name=resource_group_name, + service_name=service_name, + pe_connection_name=pe_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_private_endpoint_connection_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete_private_endpoint_connection( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete private end point connection for a private link service in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + service_name=service_name, + pe_connection_name=pe_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}"} # type: ignore + + @distributed_trace + def list_private_endpoint_connections( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """Gets all private end point connections for a specific private link service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_private_endpoint_connections_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_private_endpoint_connections.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_private_endpoint_connections_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_private_endpoint_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections"} # type: ignore + + async def _check_private_link_service_visibility_initial( + self, + location: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", + **kwargs: Any + ) -> Optional["_models.PrivateLinkServiceVisibility"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateLinkServiceVisibility"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CheckPrivateLinkServiceVisibilityRequest') + + request = build_private_link_services_check_private_link_service_visibility_request_initial( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._check_private_link_service_visibility_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _check_private_link_service_visibility_initial.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility"} # type: ignore + + + @distributed_trace_async + async def begin_check_private_link_service_visibility( + self, + location: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateLinkServiceVisibility"]: + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param parameters: The request body of CheckPrivateLinkService API call. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.CheckPrivateLinkServiceVisibilityRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateLinkServiceVisibility or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceVisibility] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceVisibility"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._check_private_link_service_visibility_initial( + location=location, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_check_private_link_service_visibility.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility"} # type: ignore + + async def _check_private_link_service_visibility_by_resource_group_initial( + self, + location: str, + resource_group_name: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", + **kwargs: Any + ) -> Optional["_models.PrivateLinkServiceVisibility"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateLinkServiceVisibility"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CheckPrivateLinkServiceVisibilityRequest') + + request = build_private_link_services_check_private_link_service_visibility_by_resource_group_request_initial( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._check_private_link_service_visibility_by_resource_group_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _check_private_link_service_visibility_by_resource_group_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility"} # type: ignore + + + @distributed_trace_async + async def begin_check_private_link_service_visibility_by_resource_group( + self, + location: str, + resource_group_name: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateLinkServiceVisibility"]: + """Checks whether the subscription is visible to private link service in the specified resource + group. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param parameters: The request body of CheckPrivateLinkService API call. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.CheckPrivateLinkServiceVisibilityRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateLinkServiceVisibility or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceVisibility] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceVisibility"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._check_private_link_service_visibility_by_resource_group_initial( + location=location, + resource_group_name=resource_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_check_private_link_service_visibility_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility"} # type: ignore + + @distributed_trace + def list_auto_approved_private_link_services( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.AutoApprovedPrivateLinkServicesResult"]: + """Returns all of the private link service ids that can be linked to a Private Endpoint with auto + approved in this subscription in this region. + + :param location: The location of the domain name. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AutoApprovedPrivateLinkServicesResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AutoApprovedPrivateLinkServicesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoApprovedPrivateLinkServicesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_auto_approved_private_link_services_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_auto_approved_private_link_services.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_auto_approved_private_link_services_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AutoApprovedPrivateLinkServicesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_auto_approved_private_link_services.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices"} # type: ignore + + @distributed_trace + def list_auto_approved_private_link_services_by_resource_group( + self, + location: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AutoApprovedPrivateLinkServicesResult"]: + """Returns all of the private link service ids that can be linked to a Private Endpoint with auto + approved in this subscription in this region. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AutoApprovedPrivateLinkServicesResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.AutoApprovedPrivateLinkServicesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoApprovedPrivateLinkServicesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_auto_approved_private_link_services_by_resource_group_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_auto_approved_private_link_services_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_auto_approved_private_link_services_by_resource_group_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AutoApprovedPrivateLinkServicesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_auto_approved_private_link_services_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices"} # type: ignore +class PublicIPPrefixesOperations: + """PublicIPPrefixesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + public_ip_prefix_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_prefixes_delete_request_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + public_ip_prefix_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified public IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the PublicIpPrefix. + :type public_ip_prefix_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + public_ip_prefix_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPPrefix": + """Gets the specified public IP prefix in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_prefixes_get_request( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.PublicIPPrefix", + **kwargs: Any + ) -> "_models.PublicIPPrefix": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PublicIPPrefix') + + request = build_public_ip_prefixes_create_or_update_request_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.PublicIPPrefix", + **kwargs: Any + ) -> AsyncLROPoller["_models.PublicIPPrefix"]: + """Creates or updates a static or dynamic public IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param parameters: Parameters supplied to the create or update public IP prefix operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PublicIPPrefix or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.PublicIPPrefix": + """Updates public IP prefix tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param parameters: Parameters supplied to update public IP prefix tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_public_ip_prefixes_update_tags_request( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPPrefixListResult"]: + """Gets all the public IP prefixes in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPPrefixListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_prefixes_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_prefixes_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPPrefixListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPPrefixListResult"]: + """Gets all public IP prefixes in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPPrefixListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_prefixes_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_prefixes_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPPrefixListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes"} # type: ignore +class RouteFiltersOperations: + """RouteFiltersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_filter_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_filters_delete_request_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_filter_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + route_filter_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.RouteFilter": + """Gets the specified route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param expand: Expands referenced express route bgp peering resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteFilter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteFilter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_filters_get_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteFilter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + route_filter_name: str, + route_filter_parameters: "_models.RouteFilter", + **kwargs: Any + ) -> "_models.RouteFilter": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(route_filter_parameters, 'RouteFilter') + + request = build_route_filters_create_or_update_request_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RouteFilter', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RouteFilter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + route_filter_name: str, + route_filter_parameters: "_models.RouteFilter", + **kwargs: Any + ) -> AsyncLROPoller["_models.RouteFilter"]: + """Creates or updates a route filter in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param route_filter_parameters: Parameters supplied to the create or update route filter + operation. + :type route_filter_parameters: ~azure.mgmt.network.v2021_08_01.models.RouteFilter + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RouteFilter or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.RouteFilter] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + route_filter_parameters=route_filter_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('RouteFilter', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + route_filter_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.RouteFilter": + """Updates tags of a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param parameters: Parameters supplied to update route filter tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteFilter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteFilter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_route_filters_update_tags_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteFilter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.RouteFilterListResult"]: + """Gets all route filters in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteFilterListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteFilterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_filters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_filters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("RouteFilterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.RouteFilterListResult"]: + """Gets all route filters in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteFilterListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteFilterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_filters_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_filters_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("RouteFilterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters"} # type: ignore +class RouteFilterRulesOperations: + """RouteFilterRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_filter_rules_delete_request_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified rule from a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.RouteFilterRule": + """Gets the specified rule from a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteFilterRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteFilterRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_filter_rules_get_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + route_filter_rule_parameters: "_models.RouteFilterRule", + **kwargs: Any + ) -> "_models.RouteFilterRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') + + request = build_route_filter_rules_create_or_update_request_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + route_filter_rule_parameters: "_models.RouteFilterRule", + **kwargs: Any + ) -> AsyncLROPoller["_models.RouteFilterRule"]: + """Creates or updates a route in the specified route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the route filter rule. + :type rule_name: str + :param route_filter_rule_parameters: Parameters supplied to the create or update route filter + rule operation. + :type route_filter_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.RouteFilterRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RouteFilterRule or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.RouteFilterRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + route_filter_rule_parameters=route_filter_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + @distributed_trace + def list_by_route_filter( + self, + resource_group_name: str, + route_filter_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.RouteFilterRuleListResult"]: + """Gets all RouteFilterRules in a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteFilterRuleListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteFilterRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_filter_rules_list_by_route_filter_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_route_filter.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_filter_rules_list_by_route_filter_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("RouteFilterRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_route_filter.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules"} # type: ignore +class RouteTablesOperations: + """RouteTablesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_table_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_tables_delete_request_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_table_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + route_table_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.RouteTable": + """Gets the specified route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteTable + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_tables_get_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + route_table_name: str, + parameters: "_models.RouteTable", + **kwargs: Any + ) -> "_models.RouteTable": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'RouteTable') + + request = build_route_tables_create_or_update_request_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RouteTable', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + route_table_name: str, + parameters: "_models.RouteTable", + **kwargs: Any + ) -> AsyncLROPoller["_models.RouteTable"]: + """Create or updates a route table in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param parameters: Parameters supplied to the create or update route table operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.RouteTable + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RouteTable or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.RouteTable] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('RouteTable', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + route_table_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.RouteTable": + """Updates a route table tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param parameters: Parameters supplied to update route table tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteTable + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_route_tables_update_tags_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.RouteTableListResult"]: + """Gets all route tables in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteTableListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_tables_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_tables_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("RouteTableListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.RouteTableListResult"]: + """Gets all route tables in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteTableListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_tables_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_tables_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("RouteTableListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables"} # type: ignore +class RoutesOperations: + """RoutesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_routes_delete_request_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified route from a route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param route_name: The name of the route. + :type route_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + **kwargs: Any + ) -> "_models.Route": + """Gets the specified route from a route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param route_name: The name of the route. + :type route_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Route, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.Route + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_routes_get_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Route', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + route_parameters: "_models.Route", + **kwargs: Any + ) -> "_models.Route": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(route_parameters, 'Route') + + request = build_routes_create_or_update_request_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Route', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Route', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + route_parameters: "_models.Route", + **kwargs: Any + ) -> AsyncLROPoller["_models.Route"]: + """Creates or updates a route in the specified route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param route_name: The name of the route. + :type route_name: str + :param route_parameters: Parameters supplied to the create or update route operation. + :type route_parameters: ~azure.mgmt.network.v2021_08_01.models.Route + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.Route] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + route_parameters=route_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('Route', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + route_table_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.RouteListResult"]: + """Gets all routes in a route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_routes_list_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_routes_list_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("RouteListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes"} # type: ignore +class SecurityPartnerProvidersOperations: + """SecurityPartnerProvidersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + security_partner_provider_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_security_partner_providers_delete_request_initial( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + security_partner_provider_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Security Partner Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + security_partner_provider_name: str, + **kwargs: Any + ) -> "_models.SecurityPartnerProvider": + """Gets the specified Security Partner Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityPartnerProvider, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_security_partner_providers_get_request( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + security_partner_provider_name: str, + parameters: "_models.SecurityPartnerProvider", + **kwargs: Any + ) -> "_models.SecurityPartnerProvider": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SecurityPartnerProvider') + + request = build_security_partner_providers_create_or_update_request_initial( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + security_partner_provider_name: str, + parameters: "_models.SecurityPartnerProvider", + **kwargs: Any + ) -> AsyncLROPoller["_models.SecurityPartnerProvider"]: + """Creates or updates the specified Security Partner Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :param parameters: Parameters supplied to the create or update Security Partner Provider + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either SecurityPartnerProvider or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + security_partner_provider_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.SecurityPartnerProvider": + """Updates tags of a Security Partner Provider resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :param parameters: Parameters supplied to update Security Partner Provider tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityPartnerProvider, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_security_partner_providers_update_tags_request( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.SecurityPartnerProviderListResult"]: + """Lists all Security Partner Providers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityPartnerProviderListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProviderListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProviderListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_security_partner_providers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_security_partner_providers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityPartnerProviderListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.SecurityPartnerProviderListResult"]: + """Gets all the Security Partner Providers in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityPartnerProviderListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProviderListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProviderListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_security_partner_providers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_security_partner_providers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityPartnerProviderListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders"} # type: ignore +class BgpServiceCommunitiesOperations: + """BgpServiceCommunitiesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.BgpServiceCommunityListResult"]: + """Gets all the available bgp service communities. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BgpServiceCommunityListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.BgpServiceCommunityListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpServiceCommunityListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_bgp_service_communities_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_bgp_service_communities_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BgpServiceCommunityListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities"} # type: ignore +class ServiceEndpointPoliciesOperations: + """ServiceEndpointPoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_endpoint_policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_endpoint_policies_delete_request_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_endpoint_policy_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.ServiceEndpointPolicy": + """Gets the specified service Endpoint Policies in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_endpoint_policies_get_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + parameters: "_models.ServiceEndpointPolicy", + **kwargs: Any + ) -> "_models.ServiceEndpointPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ServiceEndpointPolicy') + + request = build_service_endpoint_policies_create_or_update_request_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + parameters: "_models.ServiceEndpointPolicy", + **kwargs: Any + ) -> AsyncLROPoller["_models.ServiceEndpointPolicy"]: + """Creates or updates a service Endpoint Policies. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param parameters: Parameters supplied to the create or update service endpoint policy + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ServiceEndpointPolicy or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ServiceEndpointPolicy": + """Updates tags of a service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param parameters: Parameters supplied to update service endpoint policy tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_service_endpoint_policies_update_tags_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ServiceEndpointPolicyListResult"]: + """Gets all the service endpoint policies in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceEndpointPolicyListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_service_endpoint_policies_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_service_endpoint_policies_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ServiceEndpointPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ServiceEndpointPolicyListResult"]: + """Gets all service endpoint Policies in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceEndpointPolicyListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_service_endpoint_policies_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_service_endpoint_policies_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ServiceEndpointPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies"} # type: ignore +class ServiceEndpointPolicyDefinitionsOperations: + """ServiceEndpointPolicyDefinitionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_endpoint_policy_definitions_delete_request_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified ServiceEndpoint policy definitions. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the Service Endpoint Policy. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition. + :type service_endpoint_policy_definition_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> "_models.ServiceEndpointPolicyDefinition": + """Get the specified service endpoint policy definitions from service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy name. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition name. + :type service_endpoint_policy_definition_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicyDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_endpoint_policy_definitions_get_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + service_endpoint_policy_definitions: "_models.ServiceEndpointPolicyDefinition", + **kwargs: Any + ) -> "_models.ServiceEndpointPolicyDefinition": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(service_endpoint_policy_definitions, 'ServiceEndpointPolicyDefinition') + + request = build_service_endpoint_policy_definitions_create_or_update_request_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + service_endpoint_policy_definitions: "_models.ServiceEndpointPolicyDefinition", + **kwargs: Any + ) -> AsyncLROPoller["_models.ServiceEndpointPolicyDefinition"]: + """Creates or updates a service endpoint policy definition in the specified service endpoint + policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition name. + :type service_endpoint_policy_definition_name: str + :param service_endpoint_policy_definitions: Parameters supplied to the create or update service + endpoint policy operation. + :type service_endpoint_policy_definitions: + ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ServiceEndpointPolicyDefinition or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + service_endpoint_policy_definitions=service_endpoint_policy_definitions, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ServiceEndpointPolicyDefinitionListResult"]: + """Gets all service endpoint policy definitions in a service end point policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy name. + :type service_endpoint_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceEndpointPolicyDefinitionListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinitionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinitionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_service_endpoint_policy_definitions_list_by_resource_group_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_service_endpoint_policy_definitions_list_by_resource_group_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ServiceEndpointPolicyDefinitionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions"} # type: ignore +class ServiceTagsOperations: + """ServiceTagsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list( + self, + location: str, + **kwargs: Any + ) -> "_models.ServiceTagsListResult": + """Gets a list of service tag information resources. + + :param location: The location that will be used as a reference for version (not as a filter + based on location, you will get the list of service tags with prefix details across all regions + but limited to the cloud that your subscription belongs to). + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceTagsListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceTagsListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTagsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_tags_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceTagsListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags"} # type: ignore + +class ServiceTagInformationOperations: + """ServiceTagInformationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + no_address_prefixes: Optional[bool] = None, + tag_name: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ServiceTagInformationListResult"]: + """Gets a list of service tag information resources with pagination. + + :param location: The location that will be used as a reference for cloud (not as a filter based + on location, you will get the list of service tags with prefix details across all regions but + limited to the cloud that your subscription belongs to). + :type location: str + :param no_address_prefixes: Do not return address prefixes for the tag(s). Default value is + None. + :type no_address_prefixes: bool + :param tag_name: Return tag information for a particular tag. Default value is None. + :type tag_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceTagInformationListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ServiceTagInformationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTagInformationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_service_tag_information_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + no_address_prefixes=no_address_prefixes, + tag_name=tag_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_service_tag_information_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + no_address_prefixes=no_address_prefixes, + tag_name=tag_name, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ServiceTagInformationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails"} # type: ignore +class UsagesOperations: + """UsagesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.UsagesListResult"]: + """List network usages for a subscription. + + :param location: The location where resource usage is queried. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UsagesListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.UsagesListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_usages_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_usages_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("UsagesListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages"} # type: ignore +class VirtualNetworksOperations: + """VirtualNetworksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_networks_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_network_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.VirtualNetwork": + """Gets the specified virtual network by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_networks_get_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.VirtualNetwork", + **kwargs: Any + ) -> "_models.VirtualNetwork": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualNetwork') + + request = build_virtual_networks_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.VirtualNetwork", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetwork"]: + """Creates or updates a virtual network in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetwork + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetwork or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetwork] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualNetwork": + """Updates a virtual network tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to update virtual network tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_virtual_networks_update_tags_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkListResult"]: + """Gets all virtual networks in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_networks_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_networks_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkListResult"]: + """Gets all virtual networks in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_networks_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_networks_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks"} # type: ignore + + @distributed_trace_async + async def check_ip_address_availability( + self, + resource_group_name: str, + virtual_network_name: str, + ip_address: str, + **kwargs: Any + ) -> "_models.IPAddressAvailabilityResult": + """Checks whether a private IP address is available for use. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param ip_address: The private IP address to be verified. + :type ip_address: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IPAddressAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IPAddressAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IPAddressAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_networks_check_ip_address_availability_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + ip_address=ip_address, + template_url=self.check_ip_address_availability.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IPAddressAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + check_ip_address_availability.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability"} # type: ignore + + + @distributed_trace + def list_usage( + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkListUsageResult"]: + """Lists usage stats. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkListUsageResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkListUsageResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListUsageResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_networks_list_usage_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_usage.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_networks_list_usage_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkListUsageResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_usage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages"} # type: ignore +class SubnetsOperations: + """SubnetsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_subnets_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.Subnet": + """Gets the specified subnet by virtual network and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Subnet, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.Subnet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_subnets_get_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Subnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subnet_parameters: "_models.Subnet", + **kwargs: Any + ) -> "_models.Subnet": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(subnet_parameters, 'Subnet') + + request = build_subnets_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Subnet', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Subnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subnet_parameters: "_models.Subnet", + **kwargs: Any + ) -> AsyncLROPoller["_models.Subnet"]: + """Creates or updates a subnet in the specified virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param subnet_parameters: Parameters supplied to the create or update subnet operation. + :type subnet_parameters: ~azure.mgmt.network.v2021_08_01.models.Subnet + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Subnet or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.Subnet] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subnet_parameters=subnet_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('Subnet', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + async def _prepare_network_policies_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + prepare_network_policies_request_parameters: "_models.PrepareNetworkPoliciesRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(prepare_network_policies_request_parameters, 'PrepareNetworkPoliciesRequest') + + request = build_subnets_prepare_network_policies_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._prepare_network_policies_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _prepare_network_policies_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies"} # type: ignore + + + @distributed_trace_async + async def begin_prepare_network_policies( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + prepare_network_policies_request_parameters: "_models.PrepareNetworkPoliciesRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Prepares a subnet by applying network intent policies. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param prepare_network_policies_request_parameters: Parameters supplied to prepare subnet by + applying network intent policies. + :type prepare_network_policies_request_parameters: + ~azure.mgmt.network.v2021_08_01.models.PrepareNetworkPoliciesRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._prepare_network_policies_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + prepare_network_policies_request_parameters=prepare_network_policies_request_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_prepare_network_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies"} # type: ignore + + async def _unprepare_network_policies_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + unprepare_network_policies_request_parameters: "_models.UnprepareNetworkPoliciesRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(unprepare_network_policies_request_parameters, 'UnprepareNetworkPoliciesRequest') + + request = build_subnets_unprepare_network_policies_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._unprepare_network_policies_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _unprepare_network_policies_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies"} # type: ignore + + + @distributed_trace_async + async def begin_unprepare_network_policies( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + unprepare_network_policies_request_parameters: "_models.UnprepareNetworkPoliciesRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Unprepares a subnet by removing network intent policies. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param unprepare_network_policies_request_parameters: Parameters supplied to unprepare subnet + to remove network intent policies. + :type unprepare_network_policies_request_parameters: + ~azure.mgmt.network.v2021_08_01.models.UnprepareNetworkPoliciesRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._unprepare_network_policies_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + unprepare_network_policies_request_parameters=unprepare_network_policies_request_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_unprepare_network_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.SubnetListResult"]: + """Gets all subnets in a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SubnetListResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.SubnetListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_subnets_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_subnets_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("SubnetListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets"} # type: ignore +class ResourceNavigationLinksOperations: + """ResourceNavigationLinksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> "_models.ResourceNavigationLinksListResult": + """Gets a list of resource navigation links for a subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceNavigationLinksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ResourceNavigationLinksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceNavigationLinksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_resource_navigation_links_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceNavigationLinksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks"} # type: ignore + +class ServiceAssociationLinksOperations: + """ServiceAssociationLinksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> "_models.ServiceAssociationLinksListResult": + """Gets a list of service association links for a subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceAssociationLinksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceAssociationLinksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceAssociationLinksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_association_links_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceAssociationLinksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks"} # type: ignore + +class VirtualNetworkPeeringsOperations: + """VirtualNetworkPeeringsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_peerings_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified virtual network peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param virtual_network_peering_name: The name of the virtual network peering. + :type virtual_network_peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkPeering": + """Gets the specified virtual network peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param virtual_network_peering_name: The name of the virtual network peering. + :type virtual_network_peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_peerings_get_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + virtual_network_peering_parameters: "_models.VirtualNetworkPeering", + sync_remote_address_space: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] = None, + **kwargs: Any + ) -> "_models.VirtualNetworkPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(virtual_network_peering_parameters, 'VirtualNetworkPeering') + + request = build_virtual_network_peerings_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + sync_remote_address_space=sync_remote_address_space, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + virtual_network_peering_parameters: "_models.VirtualNetworkPeering", + sync_remote_address_space: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkPeering"]: + """Creates or updates a peering in the specified virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param virtual_network_peering_name: The name of the peering. + :type virtual_network_peering_name: str + :param virtual_network_peering_parameters: Parameters supplied to the create or update virtual + network peering operation. + :type virtual_network_peering_parameters: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering + :param sync_remote_address_space: Parameter indicates the intention to sync the peering with + the current address space on the remote vNet after it's updated. Default value is None. + :type sync_remote_address_space: str or + ~azure.mgmt.network.v2021_08_01.models.SyncRemoteAddressSpace + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkPeering or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + virtual_network_peering_parameters=virtual_network_peering_parameters, + sync_remote_address_space=sync_remote_address_space, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkPeeringListResult"]: + """Gets all virtual network peerings in a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkPeeringListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeeringListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeeringListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_peerings_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_peerings_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkPeeringListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings"} # type: ignore +class VirtualNetworkGatewaysOperations: # pylint: disable=too-many-public-methods + """VirtualNetworkGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VirtualNetworkGateway", + **kwargs: Any + ) -> "_models.VirtualNetworkGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualNetworkGateway') + + request = build_virtual_network_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VirtualNetworkGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkGateway"]: + """Creates or updates a virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Parameters supplied to create or update virtual network gateway operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkGateway": + """Gets the specified virtual network gateway by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified virtual network gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.VirtualNetworkGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_virtual_network_gateways_update_tags_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_update_tags( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkGateway"]: + """Updates a virtual network gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Parameters supplied to update virtual network gateway tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkGatewayListResult"]: + """Gets all virtual network gateways by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways"} # type: ignore + + @distributed_trace + def list_connections( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkGatewayListConnectionsResult"]: + """Gets all the connections in a virtual network gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkGatewayListConnectionsResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayListConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_gateways_list_connections_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_connections.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_gateways_list_connections_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkGatewayListConnectionsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections"} # type: ignore + + async def _reset_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + gateway_vip: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.VirtualNetworkGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_reset_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + gateway_vip=gateway_vip, + template_url=self._reset_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _reset_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset"} # type: ignore + + + @distributed_trace_async + async def begin_reset( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + gateway_vip: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkGateway"]: + """Resets the primary of the virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param gateway_vip: Virtual network gateway vip address supplied to the begin reset of the + active-active feature enabled gateway. Default value is None. + :type gateway_vip: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + gateway_vip=gateway_vip, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset"} # type: ignore + + async def _reset_vpn_client_shared_key_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_reset_vpn_client_shared_key_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reset_vpn_client_shared_key_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_vpn_client_shared_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey"} # type: ignore + + + @distributed_trace_async + async def begin_reset_vpn_client_shared_key( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Resets the VPN client shared key of the virtual network gateway in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_vpn_client_shared_key_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset_vpn_client_shared_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey"} # type: ignore + + async def _generatevpnclientpackage_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnClientParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnClientParameters') + + request = build_virtual_network_gateways_generatevpnclientpackage_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._generatevpnclientpackage_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _generatevpnclientpackage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage"} # type: ignore + + + @distributed_trace_async + async def begin_generatevpnclientpackage( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnClientParameters", + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Generates VPN client package for P2S client of the virtual network gateway in the specified + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Parameters supplied to the generate virtual network gateway VPN client + package operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnClientParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._generatevpnclientpackage_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_generatevpnclientpackage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage"} # type: ignore + + async def _generate_vpn_profile_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnClientParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnClientParameters') + + request = build_virtual_network_gateways_generate_vpn_profile_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._generate_vpn_profile_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _generate_vpn_profile_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile"} # type: ignore + + + @distributed_trace_async + async def begin_generate_vpn_profile( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnClientParameters", + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Generates VPN profile for P2S client of the virtual network gateway in the specified resource + group. Used for IKEV2 and radius based authentication. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Parameters supplied to the generate virtual network gateway VPN client + package operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnClientParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._generate_vpn_profile_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_generate_vpn_profile.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile"} # type: ignore + + async def _get_vpn_profile_package_url_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_vpn_profile_package_url_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_vpn_profile_package_url_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_vpn_profile_package_url_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl"} # type: ignore + + + @distributed_trace_async + async def begin_get_vpn_profile_package_url( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified + resource group. The profile needs to be generated first using generateVpnProfile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_vpn_profile_package_url_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_vpn_profile_package_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl"} # type: ignore + + async def _get_bgp_peer_status_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + peer: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.BgpPeerStatusListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BgpPeerStatusListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_bgp_peer_status_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + peer=peer, + template_url=self._get_bgp_peer_status_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_bgp_peer_status_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus"} # type: ignore + + + @distributed_trace_async + async def begin_get_bgp_peer_status( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + peer: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.BgpPeerStatusListResult"]: + """The GetBgpPeerStatus operation retrieves the status of all BGP peers. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param peer: The IP address of the peer to retrieve the status of. Default value is None. + :type peer: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BgpPeerStatusListResult or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.BgpPeerStatusListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpPeerStatusListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_bgp_peer_status_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + peer=peer, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_bgp_peer_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus"} # type: ignore + + @distributed_trace_async + async def supported_vpn_devices( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> str: + """Gets a xml format representation for supported vpn devices. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_supported_vpn_devices_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.supported_vpn_devices.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + supported_vpn_devices.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices"} # type: ignore + + + async def _get_learned_routes_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Optional["_models.GatewayRouteListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_learned_routes_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_learned_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_learned_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes"} # type: ignore + + + @distributed_trace_async + async def begin_get_learned_routes( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.GatewayRouteListResult"]: + """This operation retrieves a list of routes the virtual network gateway has learned, including + routes learned from BGP peers. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GatewayRouteListResult or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.GatewayRouteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_learned_routes_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_learned_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes"} # type: ignore + + async def _get_advertised_routes_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + peer: str, + **kwargs: Any + ) -> Optional["_models.GatewayRouteListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_advertised_routes_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + peer=peer, + template_url=self._get_advertised_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_advertised_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes"} # type: ignore + + + @distributed_trace_async + async def begin_get_advertised_routes( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + peer: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.GatewayRouteListResult"]: + """This operation retrieves a list of routes the virtual network gateway is advertising to the + specified peer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param peer: The IP address of the peer. + :type peer: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GatewayRouteListResult or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.GatewayRouteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_advertised_routes_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + peer=peer, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_advertised_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes"} # type: ignore + + async def _set_vpnclient_ipsec_parameters_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + vpnclient_ipsec_params: "_models.VpnClientIPsecParameters", + **kwargs: Any + ) -> Optional["_models.VpnClientIPsecParameters"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnClientIPsecParameters"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpnclient_ipsec_params, 'VpnClientIPsecParameters') + + request = build_virtual_network_gateways_set_vpnclient_ipsec_parameters_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._set_vpnclient_ipsec_parameters_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _set_vpnclient_ipsec_parameters_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters"} # type: ignore + + + @distributed_trace_async + async def begin_set_vpnclient_ipsec_parameters( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + vpnclient_ipsec_params: "_models.VpnClientIPsecParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnClientIPsecParameters"]: + """The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of + virtual network gateway in the specified resource group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param vpnclient_ipsec_params: Parameters supplied to the Begin Set vpnclient ipsec parameters + of Virtual Network Gateway P2S client operation through Network resource provider. + :type vpnclient_ipsec_params: ~azure.mgmt.network.v2021_08_01.models.VpnClientIPsecParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnClientIPsecParameters or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnClientIPsecParameters] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._set_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + vpnclient_ipsec_params=vpnclient_ipsec_params, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_set_vpnclient_ipsec_parameters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters"} # type: ignore + + async def _get_vpnclient_ipsec_parameters_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> "_models.VpnClientIPsecParameters": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_vpnclient_ipsec_parameters_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_vpnclient_ipsec_parameters_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_vpnclient_ipsec_parameters_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters"} # type: ignore + + + @distributed_trace_async + async def begin_get_vpnclient_ipsec_parameters( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnClientIPsecParameters"]: + """The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec + policy for P2S client of virtual network gateway in the specified resource group through + Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The virtual network gateway name. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnClientIPsecParameters or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnClientIPsecParameters] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_vpnclient_ipsec_parameters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters"} # type: ignore + + @distributed_trace_async + async def vpn_device_configuration_script( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnDeviceScriptParameters", + **kwargs: Any + ) -> str: + """Gets a xml format representation for vpn device configuration script. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection for which the configuration script is generated. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the generate vpn device script operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnDeviceScriptParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnDeviceScriptParameters') + + request = build_virtual_network_gateways_vpn_device_configuration_script_request( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.vpn_device_configuration_script.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + vpn_device_configuration_script.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript"} # type: ignore + + + async def _start_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnPacketCaptureStartParameters') + else: + _json = None + + request = build_virtual_network_gateways_start_packet_capture_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._start_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _start_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture"} # type: ignore + + + @distributed_trace_async + async def begin_start_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Starts packet capture on virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to start packet + capture on gateway. Default value is None. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnPacketCaptureStartParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture"} # type: ignore + + async def _stop_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnPacketCaptureStopParameters') + + request = build_virtual_network_gateways_stop_packet_capture_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _stop_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture"} # type: ignore + + + @distributed_trace_async + async def begin_stop_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Stops packet capture on virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to stop packet + capture on gateway. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnPacketCaptureStopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture"} # type: ignore + + async def _get_vpnclient_connection_health_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Optional["_models.VpnClientConnectionHealthDetailListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnClientConnectionHealthDetailListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_vpnclient_connection_health_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_vpnclient_connection_health_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnClientConnectionHealthDetailListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_vpnclient_connection_health_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth"} # type: ignore + + + @distributed_trace_async + async def begin_get_vpnclient_connection_health( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnClientConnectionHealthDetailListResult"]: + """Get VPN client connection health detail per P2S client connection of the virtual network + gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + VpnClientConnectionHealthDetailListResult or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnClientConnectionHealthDetailListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientConnectionHealthDetailListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_vpnclient_connection_health_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnClientConnectionHealthDetailListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_vpnclient_connection_health.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth"} # type: ignore + + async def _disconnect_virtual_network_gateway_vpn_connections_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'P2SVpnConnectionRequest') + + request = build_virtual_network_gateways_disconnect_virtual_network_gateway_vpn_connections_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._disconnect_virtual_network_gateway_vpn_connections_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disconnect_virtual_network_gateway_vpn_connections_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections"} # type: ignore + + + @distributed_trace_async + async def begin_disconnect_virtual_network_gateway_vpn_connections( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Disconnect vpn connections of virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param request: The parameters are supplied to disconnect vpn connections. + :type request: ~azure.mgmt.network.v2021_08_01.models.P2SVpnConnectionRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._disconnect_virtual_network_gateway_vpn_connections_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + request=request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_disconnect_virtual_network_gateway_vpn_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections"} # type: ignore +class VirtualNetworkGatewayConnectionsOperations: # pylint: disable=too-many-public-methods + """VirtualNetworkGatewayConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VirtualNetworkGatewayConnection", + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') + + request = build_virtual_network_gateway_connections_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VirtualNetworkGatewayConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnection"]: + """Creates or updates a virtual network gateway connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the create or update virtual network gateway + connection operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnection or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayConnection": + """Gets the specified virtual network gateway connection by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkGatewayConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_get_request( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified virtual network Gateway connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.VirtualNetworkGatewayConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGatewayConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_virtual_network_gateway_connections_update_tags_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_update_tags( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnection"]: + """Updates a virtual network gateway connection tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to update virtual network gateway connection tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnection or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + async def _set_shared_key_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionSharedKey", + **kwargs: Any + ) -> "_models.ConnectionSharedKey": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ConnectionSharedKey') + + request = build_virtual_network_gateway_connections_set_shared_key_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._set_shared_key_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _set_shared_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey"} # type: ignore + + + @distributed_trace_async + async def begin_set_shared_key( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionSharedKey", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConnectionSharedKey"]: + """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway + connection shared key for passed virtual network gateway connection in the specified resource + group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The virtual network gateway connection name. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection + Shared key operation throughNetwork resource provider. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ConnectionSharedKey + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConnectionSharedKey or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectionSharedKey] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._set_shared_key_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_set_shared_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey"} # type: ignore + + @distributed_trace_async + async def get_shared_key( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> "_models.ConnectionSharedKey": + """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the + specified virtual network gateway connection shared key through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The virtual network gateway connection shared + key name. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionSharedKey, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ConnectionSharedKey + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_get_shared_key_request( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_shared_key.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_shared_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkGatewayConnectionListResult"]: + """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways + connections created. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_gateway_connections_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_gateway_connections_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkGatewayConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections"} # type: ignore + + async def _reset_shared_key_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionResetSharedKey", + **kwargs: Any + ) -> Optional["_models.ConnectionResetSharedKey"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ConnectionResetSharedKey') + + request = build_virtual_network_gateway_connections_reset_shared_key_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._reset_shared_key_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _reset_shared_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset"} # type: ignore + + + @distributed_trace_async + async def begin_reset_shared_key( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionResetSharedKey", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConnectionResetSharedKey"]: + """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway + connection shared key for passed virtual network gateway connection in the specified resource + group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The virtual network gateway connection reset + shared key Name. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the begin reset virtual network gateway connection + shared key operation through network resource provider. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ConnectionResetSharedKey + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConnectionResetSharedKey or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectionResetSharedKey] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_shared_key_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset_shared_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset"} # type: ignore + + async def _start_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnPacketCaptureStartParameters') + else: + _json = None + + request = build_virtual_network_gateway_connections_start_packet_capture_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._start_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _start_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture"} # type: ignore + + + @distributed_trace_async + async def begin_start_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Starts packet capture on virtual network gateway connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to start packet + capture on gateway connection. Default value is None. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnPacketCaptureStartParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture"} # type: ignore + + async def _stop_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnPacketCaptureStopParameters') + + request = build_virtual_network_gateway_connections_stop_packet_capture_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _stop_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture"} # type: ignore + + + @distributed_trace_async + async def begin_stop_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Stops packet capture on virtual network gateway connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to stop packet + capture on gateway connection. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnPacketCaptureStopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture"} # type: ignore + + async def _get_ike_sas_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_get_ike_sas_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_ike_sas_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_ike_sas_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas"} # type: ignore + + + @distributed_trace_async + async def begin_get_ike_sas( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Lists IKE Security Associations for the virtual network gateway connection in the specified + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_ike_sas_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_ike_sas.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas"} # type: ignore + + async def _reset_connection_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_reset_connection_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reset_connection_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection"} # type: ignore + + + @distributed_trace_async + async def begin_reset_connection( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Resets the virtual network gateway connection specified. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_connection_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection"} # type: ignore +class LocalNetworkGatewaysOperations: + """LocalNetworkGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + local_network_gateway_name: str, + parameters: "_models.LocalNetworkGateway", + **kwargs: Any + ) -> "_models.LocalNetworkGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'LocalNetworkGateway') + + request = build_local_network_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + local_network_gateway_name: str, + parameters: "_models.LocalNetworkGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.LocalNetworkGateway"]: + """Creates or updates a local network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :param parameters: Parameters supplied to the create or update local network gateway operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either LocalNetworkGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + local_network_gateway_name: str, + **kwargs: Any + ) -> "_models.LocalNetworkGateway": + """Gets the specified local network gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocalNetworkGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_local_network_gateways_get_request( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + local_network_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_local_network_gateways_delete_request_initial( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + local_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified local network gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + local_network_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.LocalNetworkGateway": + """Updates a local network gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :param parameters: Parameters supplied to update local network gateway tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocalNetworkGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_local_network_gateways_update_tags_request( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.LocalNetworkGatewayListResult"]: + """Gets all the local network gateways in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LocalNetworkGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.LocalNetworkGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_local_network_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_local_network_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("LocalNetworkGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways"} # type: ignore +class VirtualNetworkGatewayNatRulesOperations: + """VirtualNetworkGatewayNatRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayNatRule": + """Retrieves the details of a nat rule. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkGatewayNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_nat_rules_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VirtualNetworkGatewayNatRule", + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayNatRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(nat_rule_parameters, 'VirtualNetworkGatewayNatRule') + + request = build_virtual_network_gateway_nat_rules_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VirtualNetworkGatewayNatRule", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkGatewayNatRule"]: + """Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the + existing nat rules. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :param nat_rule_parameters: Parameters supplied to create or Update a Nat Rule. + :type nat_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayNatRule or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + nat_rule_parameters=nat_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_nat_rules_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a nat rule. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + @distributed_trace + def list_by_virtual_network_gateway( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualNetworkGatewayNatRulesResult"]: + """Retrieves all nat rules for a particular virtual network gateway. + + :param resource_group_name: The resource group name of the virtual network gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualNetworkGatewayNatRulesResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualNetworkGatewayNatRulesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualNetworkGatewayNatRulesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + template_url=self.list_by_virtual_network_gateway.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualNetworkGatewayNatRulesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_virtual_network_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules"} # type: ignore +class VirtualNetworkTapsOperations: + """VirtualNetworkTapsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + tap_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_taps_delete_request_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + tap_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified virtual network tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the virtual network tap. + :type tap_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + tap_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkTap": + """Gets information about the specified virtual network tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of virtual network tap. + :type tap_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkTap, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_taps_get_request( + resource_group_name=resource_group_name, + tap_name=tap_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + tap_name: str, + parameters: "_models.VirtualNetworkTap", + **kwargs: Any + ) -> "_models.VirtualNetworkTap": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualNetworkTap') + + request = build_virtual_network_taps_create_or_update_request_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + tap_name: str, + parameters: "_models.VirtualNetworkTap", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkTap"]: + """Creates or updates a Virtual Network Tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the virtual network tap. + :type tap_name: str + :param parameters: Parameters supplied to the create or update virtual network tap operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkTap or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + tap_name: str, + tap_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualNetworkTap": + """Updates an VirtualNetworkTap tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the tap. + :type tap_name: str + :param tap_parameters: Parameters supplied to update VirtualNetworkTap tags. + :type tap_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkTap, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(tap_parameters, 'TagsObject') + + request = build_virtual_network_taps_update_tags_request( + resource_group_name=resource_group_name, + tap_name=tap_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkTapListResult"]: + """Gets all the VirtualNetworkTaps in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkTapListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTapListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTapListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_taps_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_taps_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkTapListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkTapListResult"]: + """Gets all the VirtualNetworkTaps in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkTapListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTapListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTapListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_taps_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_taps_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkTapListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps"} # type: ignore +class VirtualRoutersOperations: + """VirtualRoutersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_router_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_routers_delete_request_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_router_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_router_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.VirtualRouter": + """Gets the specified Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualRouter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualRouter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_routers_get_request( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualRouter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_router_name: str, + parameters: "_models.VirtualRouter", + **kwargs: Any + ) -> "_models.VirtualRouter": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualRouter') + + request = build_virtual_routers_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualRouter', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualRouter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_router_name: str, + parameters: "_models.VirtualRouter", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualRouter"]: + """Creates or updates the specified Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param parameters: Parameters supplied to the create or update Virtual Router. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualRouter + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualRouter or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualRouter] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualRouter', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualRouterListResult"]: + """Lists all Virtual Routers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualRouterListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualRouterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_routers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_routers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualRouterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualRouterListResult"]: + """Gets all the Virtual Routers in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualRouterListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualRouterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_routers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_routers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualRouterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters"} # type: ignore +class VirtualRouterPeeringsOperations: + """VirtualRouterPeeringsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_router_peerings_delete_request_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified peering from a Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.VirtualRouterPeering": + """Gets the specified Virtual Router Peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the Virtual Router Peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualRouterPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_router_peerings_get_request( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + parameters: "_models.VirtualRouterPeering", + **kwargs: Any + ) -> "_models.VirtualRouterPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualRouterPeering') + + request = build_virtual_router_peerings_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + parameters: "_models.VirtualRouterPeering", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualRouterPeering"]: + """Creates or updates the specified Virtual Router Peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the Virtual Router Peering. + :type peering_name: str + :param parameters: Parameters supplied to the create or update Virtual Router Peering + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeering + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualRouterPeering or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeering] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_router_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualRouterPeeringListResult"]: + """Lists all Virtual Router Peerings in a Virtual Router resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualRouterPeeringListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeeringListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeeringListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_router_peerings_list_request( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_router_peerings_list_request( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualRouterPeeringListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings"} # type: ignore +class VirtualWansOperations: + """VirtualWansOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> "_models.VirtualWAN": + """Retrieves the details of a VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being retrieved. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWAN, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWAN + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_wans_get_request( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.VirtualWAN", + **kwargs: Any + ) -> "_models.VirtualWAN": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(wan_parameters, 'VirtualWAN') + + request = build_virtual_wans_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.VirtualWAN", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualWAN"]: + """Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being created or updated. + :type virtual_wan_name: str + :param wan_parameters: Parameters supplied to create or update VirtualWAN. + :type wan_parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualWAN + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualWAN or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualWAN] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + wan_parameters=wan_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualWAN', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualWAN": + """Updates a VirtualWAN tags. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being updated. + :type virtual_wan_name: str + :param wan_parameters: Parameters supplied to Update VirtualWAN tags. + :type wan_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWAN, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWAN + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(wan_parameters, 'TagsObject') + + request = build_virtual_wans_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_wans_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being deleted. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualWANsResult"]: + """Lists all the VirtualWANs in a resource group. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualWANsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualWANsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualWANsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_wans_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_wans_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualWANsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualWANsResult"]: + """Lists all the VirtualWANs in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualWANsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualWANsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualWANsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_wans_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_wans_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualWANsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans"} # type: ignore +class VpnSitesOperations: + """VpnSitesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> "_models.VpnSite": + """Retrieves the details of a VPN site. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being retrieved. + :type vpn_site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_sites_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.VpnSite", + **kwargs: Any + ) -> "_models.VpnSite": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_site_parameters, 'VpnSite') + + request = build_vpn_sites_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnSite', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.VpnSite", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnSite"]: + """Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being created or updated. + :type vpn_site_name: str + :param vpn_site_parameters: Parameters supplied to create or update VpnSite. + :type vpn_site_parameters: ~azure.mgmt.network.v2021_08_01.models.VpnSite + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnSite or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnSite] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + vpn_site_parameters=vpn_site_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnSite', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VpnSite": + """Updates VpnSite tags. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being updated. + :type vpn_site_name: str + :param vpn_site_parameters: Parameters supplied to update VpnSite tags. + :type vpn_site_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_site_parameters, 'TagsObject') + + request = build_vpn_sites_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_sites_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VpnSite. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being deleted. + :type vpn_site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnSitesResult"]: + """Lists all the vpnSites in a resource group. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSitesResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnSitesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSitesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_sites_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_sites_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnSitesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnSitesResult"]: + """Lists all the VpnSites in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSitesResult or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnSitesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSitesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_sites_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_sites_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnSitesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites"} # type: ignore +class VpnSiteLinksOperations: + """VpnSiteLinksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_link_name: str, + **kwargs: Any + ) -> "_models.VpnSiteLink": + """Retrieves the details of a VPN site link. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite. + :type vpn_site_name: str + :param vpn_site_link_name: The name of the VpnSiteLink being retrieved. + :type vpn_site_link_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSiteLink, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnSiteLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSiteLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_site_links_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + vpn_site_link_name=vpn_site_link_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSiteLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}"} # type: ignore + + + @distributed_trace + def list_by_vpn_site( + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnSiteLinksResult"]: + """Lists all the vpnSiteLinks in a resource group for a vpn site. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite. + :type vpn_site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSiteLinksResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnSiteLinksResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSiteLinksResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_site_links_list_by_vpn_site_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + template_url=self.list_by_vpn_site.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_site_links_list_by_vpn_site_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnSiteLinksResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_vpn_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks"} # type: ignore +class VpnSitesConfigurationOperations: + """VpnSitesConfigurationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _download_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_wan_name: str, + request: "_models.GetVpnSitesConfigurationRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'GetVpnSitesConfigurationRequest') + + request = build_vpn_sites_configuration_download_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._download_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _download_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration"} # type: ignore + + + @distributed_trace_async + async def begin_download( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_wan_name: str, + request: "_models.GetVpnSitesConfigurationRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Gives the sas-url to download the configurations for vpn-sites in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN for which configuration of all vpn-sites is + needed. + :type virtual_wan_name: str + :param request: Parameters supplied to download vpn-sites configuration. + :type request: ~azure.mgmt.network.v2021_08_01.models.GetVpnSitesConfigurationRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._download_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + request=request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_download.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration"} # type: ignore +class VpnServerConfigurationsOperations: + """VpnServerConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + """Retrieves the details of a VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being retrieved. + :type vpn_server_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_server_configurations_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.VpnServerConfiguration", + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_server_configuration_parameters, 'VpnServerConfiguration') + + request = build_vpn_server_configurations_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.VpnServerConfiguration", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnServerConfiguration"]: + """Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing + VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being created or + updated. + :type vpn_server_configuration_name: str + :param vpn_server_configuration_parameters: Parameters supplied to create or update + VpnServerConfiguration. + :type vpn_server_configuration_parameters: + ~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnServerConfiguration or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + vpn_server_configuration_parameters=vpn_server_configuration_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + """Updates VpnServerConfiguration tags. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being updated. + :type vpn_server_configuration_name: str + :param vpn_server_configuration_parameters: Parameters supplied to update + VpnServerConfiguration tags. + :type vpn_server_configuration_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_server_configuration_parameters, 'TagsObject') + + request = build_vpn_server_configurations_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_server_configurations_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being deleted. + :type vpn_server_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnServerConfigurationsResult"]: + """Lists all the vpnServerConfigurations in a resource group. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnServerConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_server_configurations_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_server_configurations_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnServerConfigurationsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnServerConfigurationsResult"]: + """Lists all the VpnServerConfigurations in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnServerConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_server_configurations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_server_configurations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnServerConfigurationsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations"} # type: ignore +class ConfigurationPolicyGroupsOperations: + """ConfigurationPolicyGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + vpn_server_configuration_policy_group_parameters: "_models.VpnServerConfigurationPolicyGroup", + **kwargs: Any + ) -> "_models.VpnServerConfigurationPolicyGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationPolicyGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_server_configuration_policy_group_parameters, 'VpnServerConfigurationPolicyGroup') + + request = build_configuration_policy_groups_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfigurationPolicyGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnServerConfigurationPolicyGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + vpn_server_configuration_policy_group_parameters: "_models.VpnServerConfigurationPolicyGroup", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnServerConfigurationPolicyGroup"]: + """Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. + + :param resource_group_name: The resource group name of the ConfigurationPolicyGroup. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration. + :type vpn_server_configuration_name: str + :param configuration_policy_group_name: The name of the ConfigurationPolicyGroup. + :type configuration_policy_group_name: str + :param vpn_server_configuration_policy_group_parameters: Parameters supplied to create or + update a VpnServerConfiguration PolicyGroup. + :type vpn_server_configuration_policy_group_parameters: + ~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnServerConfigurationPolicyGroup or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationPolicyGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + vpn_server_configuration_policy_group_parameters=vpn_server_configuration_policy_group_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnServerConfigurationPolicyGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_configuration_policy_groups_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a ConfigurationPolicyGroup. + + :param resource_group_name: The resource group name of the ConfigurationPolicyGroup. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration. + :type vpn_server_configuration_name: str + :param configuration_policy_group_name: The name of the ConfigurationPolicyGroup. + :type configuration_policy_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + **kwargs: Any + ) -> "_models.VpnServerConfigurationPolicyGroup": + """Retrieves the details of a ConfigurationPolicyGroup. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration. + :type vpn_server_configuration_name: str + :param configuration_policy_group_name: The name of the ConfigurationPolicyGroup being + retrieved. + :type configuration_policy_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfigurationPolicyGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationPolicyGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_configuration_policy_groups_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfigurationPolicyGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + + @distributed_trace + def list_by_vpn_server_configuration( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnServerConfigurationPolicyGroupsResult"]: + """Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration. + :type vpn_server_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationPolicyGroupsResult or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnServerConfigurationPolicyGroupsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationPolicyGroupsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_configuration_policy_groups_list_by_vpn_server_configuration_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + template_url=self.list_by_vpn_server_configuration.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_configuration_policy_groups_list_by_vpn_server_configuration_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnServerConfigurationPolicyGroupsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_vpn_server_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups"} # type: ignore +class VirtualHubsOperations: + """VirtualHubsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> "_models.VirtualHub": + """Retrieves the details of a VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHub, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hubs_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.VirtualHub", + **kwargs: Any + ) -> "_models.VirtualHub": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(virtual_hub_parameters, 'VirtualHub') + + request = build_virtual_hubs_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.VirtualHub", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualHub"]: + """Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param virtual_hub_parameters: Parameters supplied to create or update VirtualHub. + :type virtual_hub_parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualHub + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualHub or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualHub] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + virtual_hub_parameters=virtual_hub_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualHub', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + @distributed_trace_async + async def update_tags( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualHub": + """Updates VirtualHub tags. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param virtual_hub_parameters: Parameters supplied to update VirtualHub tags. + :type virtual_hub_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHub, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(virtual_hub_parameters, 'TagsObject') + + request = build_virtual_hubs_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hubs_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualHubsResult"]: + """Lists all the VirtualHubs in a resource group. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hubs_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hubs_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualHubsResult"]: + """Lists all the VirtualHubs in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hubs_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hubs_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs"} # type: ignore + + async def _get_effective_virtual_hub_routes_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + effective_routes_parameters: Optional["_models.EffectiveRoutesParameters"] = None, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if effective_routes_parameters is not None: + _json = self._serialize.body(effective_routes_parameters, 'EffectiveRoutesParameters') + else: + _json = None + + request = build_virtual_hubs_get_effective_virtual_hub_routes_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_effective_virtual_hub_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _get_effective_virtual_hub_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes"} # type: ignore + + + @distributed_trace_async + async def begin_get_effective_virtual_hub_routes( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + effective_routes_parameters: Optional["_models.EffectiveRoutesParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Gets the effective routes configured for the Virtual Hub resource or the specified resource . + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param effective_routes_parameters: Parameters supplied to get the effective routes for a + specific resource. Default value is None. + :type effective_routes_parameters: + ~azure.mgmt.network.v2021_08_01.models.EffectiveRoutesParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_effective_virtual_hub_routes_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + effective_routes_parameters=effective_routes_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_effective_virtual_hub_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes"} # type: ignore +class HubVirtualNetworkConnectionsOperations: + """HubVirtualNetworkConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + hub_virtual_network_connection_parameters: "_models.HubVirtualNetworkConnection", + **kwargs: Any + ) -> "_models.HubVirtualNetworkConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(hub_virtual_network_connection_parameters, 'HubVirtualNetworkConnection') + + request = build_hub_virtual_network_connections_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + hub_virtual_network_connection_parameters: "_models.HubVirtualNetworkConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.HubVirtualNetworkConnection"]: + """Creates a hub virtual network connection if it doesn't exist else updates the existing one. + + :param resource_group_name: The resource group name of the HubVirtualNetworkConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the HubVirtualNetworkConnection. + :type connection_name: str + :param hub_virtual_network_connection_parameters: Parameters supplied to create or update a hub + virtual network connection. + :type hub_virtual_network_connection_parameters: + ~azure.mgmt.network.v2021_08_01.models.HubVirtualNetworkConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either HubVirtualNetworkConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.HubVirtualNetworkConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + hub_virtual_network_connection_parameters=hub_virtual_network_connection_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_hub_virtual_network_connections_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a HubVirtualNetworkConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the HubVirtualNetworkConnection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.HubVirtualNetworkConnection": + """Retrieves the details of a HubVirtualNetworkConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubVirtualNetworkConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.HubVirtualNetworkConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_hub_virtual_network_connections_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListHubVirtualNetworkConnectionsResult"]: + """Retrieves the details of all HubVirtualNetworkConnections. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListHubVirtualNetworkConnectionsResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListHubVirtualNetworkConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListHubVirtualNetworkConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_hub_virtual_network_connections_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_hub_virtual_network_connections_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListHubVirtualNetworkConnectionsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections"} # type: ignore +class VpnGatewaysOperations: + """VpnGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> "_models.VpnGateway": + """Retrieves the details of a virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_gateways_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.VpnGateway", + **kwargs: Any + ) -> "_models.VpnGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_gateway_parameters, 'VpnGateway') + + request = build_vpn_gateways_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.VpnGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnGateway"]: + """Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_gateway_parameters: Parameters supplied to create or Update a virtual wan vpn + gateway. + :type vpn_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.VpnGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnGateway or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_gateway_parameters=vpn_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.VpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_gateway_parameters, 'TagsObject') + + request = build_vpn_gateways_update_tags_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_update_tags( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnGateway"]: + """Updates virtual wan vpn gateway tags. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_gateway_parameters: Parameters supplied to update a virtual wan vpn gateway tags. + :type vpn_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnGateway or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_gateway_parameters=vpn_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_gateways_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + async def _reset_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Optional["_models.VpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_gateways_reset_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reset_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _reset_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset"} # type: ignore + + + @distributed_trace_async + async def begin_reset( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnGateway"]: + """Resets the primary of the vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnGateway or the result of + cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset"} # type: ignore + + async def _start_packet_capture_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnGatewayPacketCaptureStartParameters') + else: + _json = None + + request = build_vpn_gateways_start_packet_capture_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._start_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _start_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture"} # type: ignore + + + @distributed_trace_async + async def begin_start_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Starts packet capture on vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param parameters: Vpn gateway packet capture parameters supplied to start packet capture on + vpn gateway. Default value is None. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnGatewayPacketCaptureStartParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture"} # type: ignore + + async def _stop_packet_capture_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnGatewayPacketCaptureStopParameters') + else: + _json = None + + request = build_vpn_gateways_stop_packet_capture_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _stop_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture"} # type: ignore + + + @distributed_trace_async + async def begin_stop_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Stops packet capture on vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param parameters: Vpn gateway packet capture parameters supplied to stop packet capture on vpn + gateway. Default value is None. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnGatewayPacketCaptureStopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnGatewaysResult"]: + """Lists all the VpnGateways in a resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnGatewaysResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_gateways_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_gateways_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnGatewaysResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnGatewaysResult"]: + """Lists all the VpnGateways in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnGatewaysResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_gateways_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_gateways_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnGatewaysResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways"} # type: ignore +class VpnLinkConnectionsOperations: + """VpnLinkConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _reset_connection_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_link_connections_reset_connection_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + template_url=self._reset_connection_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection"} # type: ignore + + + @distributed_trace_async + async def begin_reset_connection( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Resets the VpnLink connection specified. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn link connection. + :type link_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_connection_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection"} # type: ignore + + async def _get_ike_sas_initial( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_link_connections_get_ike_sas_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + template_url=self._get_ike_sas_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_ike_sas_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas"} # type: ignore + + + @distributed_trace_async + async def begin_get_ike_sas( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn link connection. + :type link_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_ike_sas_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_ike_sas.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas"} # type: ignore + + @distributed_trace + def list_by_vpn_connection( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnSiteLinkConnectionsResult"]: + """Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn + connection. + + :param resource_group_name: The resource group name of the vpn gateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSiteLinkConnectionsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnSiteLinkConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSiteLinkConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_link_connections_list_by_vpn_connection_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + template_url=self.list_by_vpn_connection.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_link_connections_list_by_vpn_connection_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnSiteLinkConnectionsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_vpn_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections"} # type: ignore +class VpnConnectionsOperations: + """VpnConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.VpnConnection": + """Retrieves the details of a vpn connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_connections_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + vpn_connection_parameters: "_models.VpnConnection", + **kwargs: Any + ) -> "_models.VpnConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_connection_parameters, 'VpnConnection') + + request = build_vpn_connections_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + vpn_connection_parameters: "_models.VpnConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnConnection"]: + """Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the + existing connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :param vpn_connection_parameters: Parameters supplied to create or Update a VPN Connection. + :type vpn_connection_parameters: ~azure.mgmt.network.v2021_08_01.models.VpnConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnConnection or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + vpn_connection_parameters=vpn_connection_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_connections_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a vpn connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + async def _start_packet_capture_initial( + self, + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnConnectionPacketCaptureStartParameters') + else: + _json = None + + request = build_vpn_connections_start_packet_capture_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._start_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _start_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture"} # type: ignore + + + @distributed_trace_async + async def begin_start_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Starts packet capture on Vpn connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_connection_name: The name of the vpn connection. + :type vpn_connection_name: str + :param parameters: Vpn Connection packet capture parameters supplied to start packet capture on + gateway connection. Default value is None. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.VpnConnectionPacketCaptureStartParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture"} # type: ignore + + async def _stop_packet_capture_initial( + self, + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnConnectionPacketCaptureStopParameters') + else: + _json = None + + request = build_vpn_connections_stop_packet_capture_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _stop_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture"} # type: ignore + + + @distributed_trace_async + async def begin_stop_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Stops packet capture on Vpn connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_connection_name: The name of the vpn connection. + :type vpn_connection_name: str + :param parameters: Vpn Connection packet capture parameters supplied to stop packet capture on + gateway connection. Default value is None. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.VpnConnectionPacketCaptureStopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture"} # type: ignore + + @distributed_trace + def list_by_vpn_gateway( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnConnectionsResult"]: + """Retrieves all vpn connections for a particular virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnConnectionsResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_connections_list_by_vpn_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self.list_by_vpn_gateway.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_connections_list_by_vpn_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnConnectionsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_vpn_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections"} # type: ignore +class VpnSiteLinkConnectionsOperations: + """VpnSiteLinkConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> "_models.VpnSiteLinkConnection": + """Retrieves the details of a vpn site link connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn connection. + :type link_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSiteLinkConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnSiteLinkConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSiteLinkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_site_link_connections_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSiteLinkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}"} # type: ignore + +class NatRulesOperations: + """NatRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> "_models.VpnGatewayNatRule": + """Retrieves the details of a nat ruleGet. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnGatewayNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_nat_rules_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VpnGatewayNatRule", + **kwargs: Any + ) -> "_models.VpnGatewayNatRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(nat_rule_parameters, 'VpnGatewayNatRule') + + request = build_nat_rules_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VpnGatewayNatRule", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnGatewayNatRule"]: + """Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat + rules. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :param nat_rule_parameters: Parameters supplied to create or Update a Nat Rule. + :type nat_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnGatewayNatRule or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + nat_rule_parameters=nat_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_nat_rules_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a nat rule. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + @distributed_trace + def list_by_vpn_gateway( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnGatewayNatRulesResult"]: + """Retrieves all nat rules for a particular virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnGatewayNatRulesResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnGatewayNatRulesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewayNatRulesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_nat_rules_list_by_vpn_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self.list_by_vpn_gateway.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_nat_rules_list_by_vpn_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnGatewayNatRulesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_vpn_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules"} # type: ignore +class P2SVpnGatewaysOperations: + """P2SVpnGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> "_models.P2SVpnGateway": + """Retrieves the details of a virtual wan p2s vpn gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: P2SVpnGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_p2_svpn_gateways_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.P2SVpnGateway", + **kwargs: Any + ) -> "_models.P2SVpnGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(p2_s_vpn_gateway_parameters, 'P2SVpnGateway') + + request = build_p2_svpn_gateways_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.P2SVpnGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnGateway"]: + """Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param p2_s_vpn_gateway_parameters: Parameters supplied to create or Update a virtual wan p2s + vpn gateway. + :type p2_s_vpn_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + p2_s_vpn_gateway_parameters=p2_s_vpn_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(p2_s_vpn_gateway_parameters, 'TagsObject') + + request = build_p2_svpn_gateways_update_tags_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_update_tags( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnGateway"]: + """Updates virtual wan p2s vpn gateway tags. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param p2_s_vpn_gateway_parameters: Parameters supplied to update a virtual wan p2s vpn gateway + tags. + :type p2_s_vpn_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + p2_s_vpn_gateway_parameters=p2_s_vpn_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_p2_svpn_gateways_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a virtual wan p2s vpn gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListP2SVpnGatewaysResult"]: + """Lists all the P2SVpnGateways in a resource group. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListP2SVpnGatewaysResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListP2SVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListP2SVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_p2_svpn_gateways_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_p2_svpn_gateways_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListP2SVpnGatewaysResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListP2SVpnGatewaysResult"]: + """Lists all the P2SVpnGateways in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListP2SVpnGatewaysResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListP2SVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListP2SVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_p2_svpn_gateways_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_p2_svpn_gateways_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListP2SVpnGatewaysResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways"} # type: ignore + + async def _reset_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_p2_svpn_gateways_reset_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reset_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _reset_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset"} # type: ignore + + + @distributed_trace_async + async def begin_reset( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnGateway"]: + """Resets the primary of the p2s vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset"} # type: ignore + + async def _generate_vpn_profile_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: "_models.P2SVpnProfileParameters", + **kwargs: Any + ) -> Optional["_models.VpnProfileResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnProfileResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'P2SVpnProfileParameters') + + request = build_p2_svpn_gateways_generate_vpn_profile_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._generate_vpn_profile_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _generate_vpn_profile_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile"} # type: ignore + + + @distributed_trace_async + async def begin_generate_vpn_profile( + self, + resource_group_name: str, + gateway_name: str, + parameters: "_models.P2SVpnProfileParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnProfileResponse"]: + """Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :param parameters: Parameters supplied to the generate P2SVpnGateway VPN client package + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.P2SVpnProfileParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnProfileResponse or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnProfileResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnProfileResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._generate_vpn_profile_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_generate_vpn_profile.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile"} # type: ignore + + async def _get_p2_s_vpn_connection_health_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_p2_svpn_gateways_get_p2_s_vpn_connection_health_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_p2_s_vpn_connection_health_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_p2_s_vpn_connection_health_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth"} # type: ignore + + + @distributed_trace_async + async def begin_get_p2_s_vpn_connection_health( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnGateway"]: + """Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_p2_s_vpn_connection_health_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_p2_s_vpn_connection_health.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth"} # type: ignore + + async def _get_p2_s_vpn_connection_health_detailed_initial( + self, + resource_group_name: str, + gateway_name: str, + request: "_models.P2SVpnConnectionHealthRequest", + **kwargs: Any + ) -> Optional["_models.P2SVpnConnectionHealth"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnConnectionHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'P2SVpnConnectionHealthRequest') + + request = build_p2_svpn_gateways_get_p2_s_vpn_connection_health_detailed_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_p2_s_vpn_connection_health_detailed_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnConnectionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_p2_s_vpn_connection_health_detailed_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed"} # type: ignore + + + @distributed_trace_async + async def begin_get_p2_s_vpn_connection_health_detailed( + self, + resource_group_name: str, + gateway_name: str, + request: "_models.P2SVpnConnectionHealthRequest", + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnConnectionHealth"]: + """Gets the sas url to get the connection health detail of P2S clients of the virtual wan + P2SVpnGateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :param request: Request parameters supplied to get p2s vpn connections detailed health. + :type request: ~azure.mgmt.network.v2021_08_01.models.P2SVpnConnectionHealthRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnConnectionHealth or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnConnectionHealth] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnConnectionHealth"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_p2_s_vpn_connection_health_detailed_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + request=request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnConnectionHealth', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_p2_s_vpn_connection_health_detailed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed"} # type: ignore + + async def _disconnect_p2_s_vpn_connections_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + p2_s_vpn_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'P2SVpnConnectionRequest') + + request = build_p2_svpn_gateways_disconnect_p2_s_vpn_connections_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + p2_s_vpn_gateway_name=p2_s_vpn_gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._disconnect_p2_s_vpn_connections_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disconnect_p2_s_vpn_connections_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections"} # type: ignore + + + @distributed_trace_async + async def begin_disconnect_p2_s_vpn_connections( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + p2_s_vpn_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param p2_s_vpn_gateway_name: The name of the P2S Vpn Gateway. + :type p2_s_vpn_gateway_name: str + :param request: The parameters are supplied to disconnect p2s vpn connections. + :type request: ~azure.mgmt.network.v2021_08_01.models.P2SVpnConnectionRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._disconnect_p2_s_vpn_connections_initial( + resource_group_name=resource_group_name, + p2_s_vpn_gateway_name=p2_s_vpn_gateway_name, + request=request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_disconnect_p2_s_vpn_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections"} # type: ignore +class VpnServerConfigurationsAssociatedWithVirtualWanOperations: + """VpnServerConfigurationsAssociatedWithVirtualWanOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _list_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> Optional["_models.VpnServerConfigurationsResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnServerConfigurationsResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_server_configurations_associated_with_virtual_wan_list_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + template_url=self._list_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfigurationsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations"} # type: ignore + + + @distributed_trace_async + async def begin_list( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnServerConfigurationsResponse"]: + """Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnServerConfigurationsResponse or + the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationsResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationsResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnServerConfigurationsResponse', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations"} # type: ignore +class VirtualHubRouteTableV2SOperations: + """VirtualHubRouteTableV2SOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> "_models.VirtualHubRouteTableV2": + """Retrieves the details of a VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHubRouteTableV2. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHubRouteTableV2, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_route_table_v2_s_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + virtual_hub_route_table_v2_parameters: "_models.VirtualHubRouteTableV2", + **kwargs: Any + ) -> "_models.VirtualHubRouteTableV2": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(virtual_hub_route_table_v2_parameters, 'VirtualHubRouteTableV2') + + request = build_virtual_hub_route_table_v2_s_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + virtual_hub_route_table_v2_parameters: "_models.VirtualHubRouteTableV2", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualHubRouteTableV2"]: + """Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing + VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :param virtual_hub_route_table_v2_parameters: Parameters supplied to create or update + VirtualHubRouteTableV2. + :type virtual_hub_route_table_v2_parameters: + ~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2 + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualHubRouteTableV2 or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + virtual_hub_route_table_v2_parameters=virtual_hub_route_table_v2_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_route_table_v2_s_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHubRouteTableV2. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualHubRouteTableV2SResult"]: + """Retrieves the details of all VirtualHubRouteTableV2s. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubRouteTableV2SResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubRouteTableV2SResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubRouteTableV2SResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hub_route_table_v2_s_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hub_route_table_v2_s_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubRouteTableV2SResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables"} # type: ignore +class ExpressRouteGatewaysOperations: + """ExpressRouteGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list_by_subscription( + self, + **kwargs: Any + ) -> "_models.ExpressRouteGatewayList": + """Lists ExpressRoute gateways under a given subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGatewayList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGatewayList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGatewayList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_gateways_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGatewayList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways"} # type: ignore + + + @distributed_trace_async + async def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteGatewayList": + """Lists ExpressRoute gateways in a given resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGatewayList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGatewayList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGatewayList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_gateways_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGatewayList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + put_express_route_gateway_parameters: "_models.ExpressRouteGateway", + **kwargs: Any + ) -> "_models.ExpressRouteGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(put_express_route_gateway_parameters, 'ExpressRouteGateway') + + request = build_express_route_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + express_route_gateway_name: str, + put_express_route_gateway_parameters: "_models.ExpressRouteGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteGateway"]: + """Creates or updates a ExpressRoute gateway in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param put_express_route_gateway_parameters: Parameters required in an ExpressRoute gateway PUT + operation. + :type put_express_route_gateway_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + put_express_route_gateway_parameters=put_express_route_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + express_route_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.ExpressRouteGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(express_route_gateway_parameters, 'TagsObject') + + request = build_express_route_gateways_update_tags_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_update_tags( + self, + resource_group_name: str, + express_route_gateway_name: str, + express_route_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteGateway"]: + """Updates express route gateway tags. + + :param resource_group_name: The resource group name of the ExpressRouteGateway. + :type resource_group_name: str + :param express_route_gateway_name: The name of the gateway. + :type express_route_gateway_name: str + :param express_route_gateway_parameters: Parameters supplied to update a virtual wan express + route gateway tags. + :type express_route_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + express_route_gateway_parameters=express_route_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteGateway": + """Fetches the details of a ExpressRoute gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_gateways_get_request( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_gateways_delete_request_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway + resource can only be deleted when there are no connection subresources. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore +class ExpressRouteConnectionsOperations: + """ExpressRouteConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + put_express_route_connection_parameters: "_models.ExpressRouteConnection", + **kwargs: Any + ) -> "_models.ExpressRouteConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(put_express_route_connection_parameters, 'ExpressRouteConnection') + + request = build_express_route_connections_create_or_update_request_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + put_express_route_connection_parameters: "_models.ExpressRouteConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteConnection"]: + """Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :param put_express_route_connection_parameters: Parameters required in an + ExpressRouteConnection PUT operation. + :type put_express_route_connection_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteConnection or the result + of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + put_express_route_connection_parameters=put_express_route_connection_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteConnection": + """Gets the specified ExpressRouteConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the ExpressRoute connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_connections_get_request( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_connections_delete_request_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a connection to a ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + @distributed_trace_async + async def list( + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteConnectionList": + """Lists ExpressRouteConnections. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteConnectionList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnectionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnectionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_connections_list_request( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteConnectionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections"} # type: ignore + +class VirtualHubBgpConnectionOperations: + """VirtualHubBgpConnectionOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.BgpConnection": + """Retrieves the details of a Virtual Hub Bgp Connection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BgpConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.BgpConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_bgp_connection_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + parameters: "_models.BgpConnection", + **kwargs: Any + ) -> "_models.BgpConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BgpConnection') + + request = build_virtual_hub_bgp_connection_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + parameters: "_models.BgpConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.BgpConnection"]: + """Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing + VirtualHubBgpConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :param parameters: Parameters of Bgp connection. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.BgpConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BgpConnection or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.BgpConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BgpConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_bgp_connection_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VirtualHubBgpConnection. + + :param resource_group_name: The resource group name of the VirtualHubBgpConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore +class VirtualHubBgpConnectionsOperations: + """VirtualHubBgpConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualHubBgpConnectionResults"]: + """Retrieves the details of all VirtualHubBgpConnections. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubBgpConnectionResults or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubBgpConnectionResults] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubBgpConnectionResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hub_bgp_connections_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hub_bgp_connections_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubBgpConnectionResults", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections"} # type: ignore + + async def _list_learned_routes_initial( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> Optional["_models.PeerRouteList"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PeerRouteList"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_bgp_connections_list_learned_routes_request_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_learned_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_learned_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes"} # type: ignore + + + @distributed_trace_async + async def begin_list_learned_routes( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.PeerRouteList"]: + """Retrieves a list of routes the virtual hub bgp connection has learned. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param hub_name: The name of the virtual hub. + :type hub_name: str + :param connection_name: The name of the virtual hub bgp connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PeerRouteList or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PeerRouteList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerRouteList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_learned_routes_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PeerRouteList', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_learned_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes"} # type: ignore + + async def _list_advertised_routes_initial( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> Optional["_models.PeerRouteList"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PeerRouteList"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_bgp_connections_list_advertised_routes_request_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_advertised_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_advertised_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes"} # type: ignore + + + @distributed_trace_async + async def begin_list_advertised_routes( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.PeerRouteList"]: + """Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param hub_name: The name of the virtual hub. + :type hub_name: str + :param connection_name: The name of the virtual hub bgp connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PeerRouteList or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.PeerRouteList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerRouteList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_advertised_routes_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PeerRouteList', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_advertised_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes"} # type: ignore +class VirtualHubIpConfigurationOperations: + """VirtualHubIpConfigurationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + **kwargs: Any + ) -> "_models.HubIpConfiguration": + """Retrieves the details of a Virtual Hub Ip configuration. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubIpConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.HubIpConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_ip_configuration_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + parameters: "_models.HubIpConfiguration", + **kwargs: Any + ) -> "_models.HubIpConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'HubIpConfiguration') + + request = build_virtual_hub_ip_configuration_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + parameters: "_models.HubIpConfiguration", + **kwargs: Any + ) -> AsyncLROPoller["_models.HubIpConfiguration"]: + """Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing + VirtualHubIpConfiguration. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :param parameters: Hub Ip Configuration parameters. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.HubIpConfiguration + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either HubIpConfiguration or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.HubIpConfiguration] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_ip_configuration_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VirtualHubIpConfiguration. + + :param resource_group_name: The resource group name of the VirtualHubBgpConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualHubIpConfigurationResults"]: + """Retrieves the details of all VirtualHubIpConfigurations. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubIpConfigurationResults or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubIpConfigurationResults] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubIpConfigurationResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hub_ip_configuration_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hub_ip_configuration_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubIpConfigurationResults", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations"} # type: ignore +class HubRouteTablesOperations: + """HubRouteTablesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + route_table_parameters: "_models.HubRouteTable", + **kwargs: Any + ) -> "_models.HubRouteTable": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(route_table_parameters, 'HubRouteTable') + + request = build_hub_route_tables_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HubRouteTable', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubRouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + route_table_parameters: "_models.HubRouteTable", + **kwargs: Any + ) -> AsyncLROPoller["_models.HubRouteTable"]: + """Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. + :type route_table_name: str + :param route_table_parameters: Parameters supplied to create or update RouteTable. + :type route_table_parameters: ~azure.mgmt.network.v2021_08_01.models.HubRouteTable + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either HubRouteTable or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.HubRouteTable] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + route_table_parameters=route_table_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('HubRouteTable', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> "_models.HubRouteTable": + """Retrieves the details of a RouteTable. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubRouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.HubRouteTable + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_hub_route_tables_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubRouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_hub_route_tables_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a RouteTable. + + :param resource_group_name: The resource group name of the RouteTable. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListHubRouteTablesResult"]: + """Retrieves the details of all RouteTables. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListHubRouteTablesResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListHubRouteTablesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListHubRouteTablesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_hub_route_tables_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_hub_route_tables_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListHubRouteTablesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables"} # type: ignore +class RoutingIntentOperations: + """RoutingIntentOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + routing_intent_parameters: "_models.RoutingIntent", + **kwargs: Any + ) -> "_models.RoutingIntent": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(routing_intent_parameters, 'RoutingIntent') + + request = build_routing_intent_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RoutingIntent', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RoutingIntent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + routing_intent_parameters: "_models.RoutingIntent", + **kwargs: Any + ) -> AsyncLROPoller["_models.RoutingIntent"]: + """Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. + + :param resource_group_name: The resource group name of the RoutingIntent. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the per VirtualHub singleton Routing Intent resource. + :type routing_intent_name: str + :param routing_intent_parameters: Parameters supplied to create or update RoutingIntent. + :type routing_intent_parameters: ~azure.mgmt.network.v2021_08_01.models.RoutingIntent + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either RoutingIntent or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_08_01.models.RoutingIntent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + routing_intent_parameters=routing_intent_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('RoutingIntent', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + **kwargs: Any + ) -> "_models.RoutingIntent": + """Retrieves the details of a RoutingIntent. + + :param resource_group_name: The resource group name of the RoutingIntent. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the RoutingIntent. + :type routing_intent_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoutingIntent, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RoutingIntent + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_routing_intent_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RoutingIntent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_routing_intent_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a RoutingIntent. + + :param resource_group_name: The resource group name of the RoutingIntent. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the RoutingIntent. + :type routing_intent_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListRoutingIntentResult"]: + """Retrieves the details of all RoutingIntent child resources of the VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListRoutingIntentResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.ListRoutingIntentResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListRoutingIntentResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_routing_intent_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_routing_intent_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ListRoutingIntentResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent"} # type: ignore +class WebApplicationFirewallPoliciesOperations: + """WebApplicationFirewallPoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.WebApplicationFirewallPolicyListResult"]: + """Lists all of the protection policies within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_web_application_firewall_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_web_application_firewall_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WebApplicationFirewallPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.WebApplicationFirewallPolicyListResult"]: + """Gets all the WAF policies in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_web_application_firewall_policies_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_web_application_firewall_policies_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WebApplicationFirewallPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> "_models.WebApplicationFirewallPolicy": + """Retrieve protection policy with specified 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 policy. + :type policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_web_application_firewall_policies_get_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + policy_name: str, + parameters: "_models.WebApplicationFirewallPolicy", + **kwargs: Any + ) -> "_models.WebApplicationFirewallPolicy": + """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 policy. + :type policy_name: str + :param parameters: Policy to be created. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicy + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'WebApplicationFirewallPolicy') + + request = build_web_application_firewall_policies_create_or_update_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}"} # type: ignore + + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_web_application_firewall_policies_delete_request_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param policy_name: The name of the policy. + :type policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}"} # type: ignore diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/__init__.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/__init__.py new file mode 100644 index 00000000000..ce8e118c2c5 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/__init__.py @@ -0,0 +1,1567 @@ +# 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 ._models_py3 import AadAuthenticationParameters +from ._models_py3 import AddressSpace +from ._models_py3 import ApplicationGateway +from ._models_py3 import ApplicationGatewayAuthenticationCertificate +from ._models_py3 import ApplicationGatewayAutoscaleConfiguration +from ._models_py3 import ApplicationGatewayAvailableSslOptions +from ._models_py3 import ApplicationGatewayAvailableSslPredefinedPolicies +from ._models_py3 import ApplicationGatewayAvailableWafRuleSetsResult +from ._models_py3 import ApplicationGatewayBackendAddress +from ._models_py3 import ApplicationGatewayBackendAddressPool +from ._models_py3 import ApplicationGatewayBackendHealth +from ._models_py3 import ApplicationGatewayBackendHealthHttpSettings +from ._models_py3 import ApplicationGatewayBackendHealthOnDemand +from ._models_py3 import ApplicationGatewayBackendHealthPool +from ._models_py3 import ApplicationGatewayBackendHealthServer +from ._models_py3 import ApplicationGatewayBackendHttpSettings +from ._models_py3 import ApplicationGatewayBackendSettings +from ._models_py3 import ApplicationGatewayClientAuthConfiguration +from ._models_py3 import ApplicationGatewayConnectionDraining +from ._models_py3 import ApplicationGatewayCustomError +from ._models_py3 import ApplicationGatewayFirewallDisabledRuleGroup +from ._models_py3 import ApplicationGatewayFirewallExclusion +from ._models_py3 import ApplicationGatewayFirewallRule +from ._models_py3 import ApplicationGatewayFirewallRuleGroup +from ._models_py3 import ApplicationGatewayFirewallRuleSet +from ._models_py3 import ApplicationGatewayFrontendIPConfiguration +from ._models_py3 import ApplicationGatewayFrontendPort +from ._models_py3 import ApplicationGatewayGlobalConfiguration +from ._models_py3 import ApplicationGatewayHeaderConfiguration +from ._models_py3 import ApplicationGatewayHttpListener +from ._models_py3 import ApplicationGatewayIPConfiguration +from ._models_py3 import ApplicationGatewayListResult +from ._models_py3 import ApplicationGatewayListener +from ._models_py3 import ApplicationGatewayLoadDistributionPolicy +from ._models_py3 import ApplicationGatewayLoadDistributionTarget +from ._models_py3 import ApplicationGatewayOnDemandProbe +from ._models_py3 import ApplicationGatewayPathRule +from ._models_py3 import ApplicationGatewayPrivateEndpointConnection +from ._models_py3 import ApplicationGatewayPrivateEndpointConnectionListResult +from ._models_py3 import ApplicationGatewayPrivateLinkConfiguration +from ._models_py3 import ApplicationGatewayPrivateLinkIpConfiguration +from ._models_py3 import ApplicationGatewayPrivateLinkResource +from ._models_py3 import ApplicationGatewayPrivateLinkResourceListResult +from ._models_py3 import ApplicationGatewayProbe +from ._models_py3 import ApplicationGatewayProbeHealthResponseMatch +from ._models_py3 import ApplicationGatewayRedirectConfiguration +from ._models_py3 import ApplicationGatewayRequestRoutingRule +from ._models_py3 import ApplicationGatewayRewriteRule +from ._models_py3 import ApplicationGatewayRewriteRuleActionSet +from ._models_py3 import ApplicationGatewayRewriteRuleCondition +from ._models_py3 import ApplicationGatewayRewriteRuleSet +from ._models_py3 import ApplicationGatewayRoutingRule +from ._models_py3 import ApplicationGatewaySku +from ._models_py3 import ApplicationGatewaySslCertificate +from ._models_py3 import ApplicationGatewaySslPolicy +from ._models_py3 import ApplicationGatewaySslPredefinedPolicy +from ._models_py3 import ApplicationGatewaySslProfile +from ._models_py3 import ApplicationGatewayTrustedClientCertificate +from ._models_py3 import ApplicationGatewayTrustedRootCertificate +from ._models_py3 import ApplicationGatewayUrlConfiguration +from ._models_py3 import ApplicationGatewayUrlPathMap +from ._models_py3 import ApplicationGatewayWebApplicationFirewallConfiguration +from ._models_py3 import ApplicationRule +from ._models_py3 import ApplicationSecurityGroup +from ._models_py3 import ApplicationSecurityGroupListResult +from ._models_py3 import AuthorizationListResult +from ._models_py3 import AutoApprovedPrivateLinkService +from ._models_py3 import AutoApprovedPrivateLinkServicesResult +from ._models_py3 import Availability +from ._models_py3 import AvailableDelegation +from ._models_py3 import AvailableDelegationsResult +from ._models_py3 import AvailablePrivateEndpointType +from ._models_py3 import AvailablePrivateEndpointTypesResult +from ._models_py3 import AvailableProvidersList +from ._models_py3 import AvailableProvidersListCity +from ._models_py3 import AvailableProvidersListCountry +from ._models_py3 import AvailableProvidersListParameters +from ._models_py3 import AvailableProvidersListState +from ._models_py3 import AvailableServiceAlias +from ._models_py3 import AvailableServiceAliasesResult +from ._models_py3 import AzureAsyncOperationResult +from ._models_py3 import AzureFirewall +from ._models_py3 import AzureFirewallApplicationRule +from ._models_py3 import AzureFirewallApplicationRuleCollection +from ._models_py3 import AzureFirewallApplicationRuleProtocol +from ._models_py3 import AzureFirewallFqdnTag +from ._models_py3 import AzureFirewallFqdnTagListResult +from ._models_py3 import AzureFirewallIPConfiguration +from ._models_py3 import AzureFirewallIpGroups +from ._models_py3 import AzureFirewallListResult +from ._models_py3 import AzureFirewallNatRCAction +from ._models_py3 import AzureFirewallNatRule +from ._models_py3 import AzureFirewallNatRuleCollection +from ._models_py3 import AzureFirewallNetworkRule +from ._models_py3 import AzureFirewallNetworkRuleCollection +from ._models_py3 import AzureFirewallPublicIPAddress +from ._models_py3 import AzureFirewallRCAction +from ._models_py3 import AzureFirewallSku +from ._models_py3 import AzureReachabilityReport +from ._models_py3 import AzureReachabilityReportItem +from ._models_py3 import AzureReachabilityReportLatencyInfo +from ._models_py3 import AzureReachabilityReportLocation +from ._models_py3 import AzureReachabilityReportParameters +from ._models_py3 import AzureWebCategory +from ._models_py3 import AzureWebCategoryListResult +from ._models_py3 import BGPCommunity +from ._models_py3 import BackendAddressInboundNatRulePortMappings +from ._models_py3 import BackendAddressPool +from ._models_py3 import BastionActiveSession +from ._models_py3 import BastionActiveSessionListResult +from ._models_py3 import BastionHost +from ._models_py3 import BastionHostIPConfiguration +from ._models_py3 import BastionHostListResult +from ._models_py3 import BastionSessionDeleteResult +from ._models_py3 import BastionSessionState +from ._models_py3 import BastionShareableLink +from ._models_py3 import BastionShareableLinkListRequest +from ._models_py3 import BastionShareableLinkListResult +from ._models_py3 import BgpConnection +from ._models_py3 import BgpPeerStatus +from ._models_py3 import BgpPeerStatusListResult +from ._models_py3 import BgpServiceCommunity +from ._models_py3 import BgpServiceCommunityListResult +from ._models_py3 import BgpSettings +from ._models_py3 import BreakOutCategoryPolicies +from ._models_py3 import CheckPrivateLinkServiceVisibilityRequest +from ._models_py3 import CloudErrorBody +from ._models_py3 import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties +from ._models_py3 import ConnectionMonitor +from ._models_py3 import ConnectionMonitorDestination +from ._models_py3 import ConnectionMonitorEndpoint +from ._models_py3 import ConnectionMonitorEndpointFilter +from ._models_py3 import ConnectionMonitorEndpointFilterItem +from ._models_py3 import ConnectionMonitorEndpointScope +from ._models_py3 import ConnectionMonitorEndpointScopeItem +from ._models_py3 import ConnectionMonitorHttpConfiguration +from ._models_py3 import ConnectionMonitorIcmpConfiguration +from ._models_py3 import ConnectionMonitorListResult +from ._models_py3 import ConnectionMonitorOutput +from ._models_py3 import ConnectionMonitorParameters +from ._models_py3 import ConnectionMonitorQueryResult +from ._models_py3 import ConnectionMonitorResult +from ._models_py3 import ConnectionMonitorResultProperties +from ._models_py3 import ConnectionMonitorSource +from ._models_py3 import ConnectionMonitorSuccessThreshold +from ._models_py3 import ConnectionMonitorTcpConfiguration +from ._models_py3 import ConnectionMonitorTestConfiguration +from ._models_py3 import ConnectionMonitorTestGroup +from ._models_py3 import ConnectionMonitorWorkspaceSettings +from ._models_py3 import ConnectionResetSharedKey +from ._models_py3 import ConnectionSharedKey +from ._models_py3 import ConnectionStateSnapshot +from ._models_py3 import ConnectivityDestination +from ._models_py3 import ConnectivityHop +from ._models_py3 import ConnectivityInformation +from ._models_py3 import ConnectivityIssue +from ._models_py3 import ConnectivityParameters +from ._models_py3 import ConnectivitySource +from ._models_py3 import Container +from ._models_py3 import ContainerNetworkInterface +from ._models_py3 import ContainerNetworkInterfaceConfiguration +from ._models_py3 import ContainerNetworkInterfaceIpConfiguration +from ._models_py3 import CustomDnsConfigPropertiesFormat +from ._models_py3 import CustomIpPrefix +from ._models_py3 import CustomIpPrefixListResult +from ._models_py3 import DdosCustomPolicy +from ._models_py3 import DdosProtectionPlan +from ._models_py3 import DdosProtectionPlanListResult +from ._models_py3 import DdosSettings +from ._models_py3 import Delegation +from ._models_py3 import DeviceProperties +from ._models_py3 import DhcpOptions +from ._models_py3 import Dimension +from ._models_py3 import DnsNameAvailabilityResult +from ._models_py3 import DnsSettings +from ._models_py3 import DscpConfiguration +from ._models_py3 import DscpConfigurationListResult +from ._models_py3 import EffectiveNetworkSecurityGroup +from ._models_py3 import EffectiveNetworkSecurityGroupAssociation +from ._models_py3 import EffectiveNetworkSecurityGroupListResult +from ._models_py3 import EffectiveNetworkSecurityRule +from ._models_py3 import EffectiveRoute +from ._models_py3 import EffectiveRouteListResult +from ._models_py3 import EffectiveRoutesParameters +from ._models_py3 import EndpointServiceResult +from ._models_py3 import EndpointServicesListResult +from ._models_py3 import Error +from ._models_py3 import ErrorDetails +from ._models_py3 import ErrorResponse +from ._models_py3 import EvaluatedNetworkSecurityGroup +from ._models_py3 import ExclusionManagedRule +from ._models_py3 import ExclusionManagedRuleGroup +from ._models_py3 import ExclusionManagedRuleSet +from ._models_py3 import ExplicitProxySettings +from ._models_py3 import ExpressRouteCircuit +from ._models_py3 import ExpressRouteCircuitArpTable +from ._models_py3 import ExpressRouteCircuitAuthorization +from ._models_py3 import ExpressRouteCircuitConnection +from ._models_py3 import ExpressRouteCircuitConnectionListResult +from ._models_py3 import ExpressRouteCircuitListResult +from ._models_py3 import ExpressRouteCircuitPeering +from ._models_py3 import ExpressRouteCircuitPeeringConfig +from ._models_py3 import ExpressRouteCircuitPeeringId +from ._models_py3 import ExpressRouteCircuitPeeringListResult +from ._models_py3 import ExpressRouteCircuitReference +from ._models_py3 import ExpressRouteCircuitRoutesTable +from ._models_py3 import ExpressRouteCircuitRoutesTableSummary +from ._models_py3 import ExpressRouteCircuitServiceProviderProperties +from ._models_py3 import ExpressRouteCircuitSku +from ._models_py3 import ExpressRouteCircuitStats +from ._models_py3 import ExpressRouteCircuitsArpTableListResult +from ._models_py3 import ExpressRouteCircuitsRoutesTableListResult +from ._models_py3 import ExpressRouteCircuitsRoutesTableSummaryListResult +from ._models_py3 import ExpressRouteConnection +from ._models_py3 import ExpressRouteConnectionId +from ._models_py3 import ExpressRouteConnectionList +from ._models_py3 import ExpressRouteCrossConnection +from ._models_py3 import ExpressRouteCrossConnectionListResult +from ._models_py3 import ExpressRouteCrossConnectionPeering +from ._models_py3 import ExpressRouteCrossConnectionPeeringList +from ._models_py3 import ExpressRouteCrossConnectionRoutesTableSummary +from ._models_py3 import ExpressRouteCrossConnectionsRoutesTableSummaryListResult +from ._models_py3 import ExpressRouteGateway +from ._models_py3 import ExpressRouteGatewayList +from ._models_py3 import ExpressRouteGatewayPropertiesAutoScaleConfiguration +from ._models_py3 import ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds +from ._models_py3 import ExpressRouteLink +from ._models_py3 import ExpressRouteLinkListResult +from ._models_py3 import ExpressRouteLinkMacSecConfig +from ._models_py3 import ExpressRoutePort +from ._models_py3 import ExpressRoutePortAuthorization +from ._models_py3 import ExpressRoutePortAuthorizationListResult +from ._models_py3 import ExpressRoutePortListResult +from ._models_py3 import ExpressRoutePortsLocation +from ._models_py3 import ExpressRoutePortsLocationBandwidths +from ._models_py3 import ExpressRoutePortsLocationListResult +from ._models_py3 import ExpressRouteServiceProvider +from ._models_py3 import ExpressRouteServiceProviderBandwidthsOffered +from ._models_py3 import ExpressRouteServiceProviderListResult +from ._models_py3 import ExtendedLocation +from ._models_py3 import FilterItems +from ._models_py3 import FirewallPolicy +from ._models_py3 import FirewallPolicyCertificateAuthority +from ._models_py3 import FirewallPolicyFilterRuleCollection +from ._models_py3 import FirewallPolicyFilterRuleCollectionAction +from ._models_py3 import FirewallPolicyInsights +from ._models_py3 import FirewallPolicyIntrusionDetection +from ._models_py3 import FirewallPolicyIntrusionDetectionBypassTrafficSpecifications +from ._models_py3 import FirewallPolicyIntrusionDetectionConfiguration +from ._models_py3 import FirewallPolicyIntrusionDetectionSignatureSpecification +from ._models_py3 import FirewallPolicyListResult +from ._models_py3 import FirewallPolicyLogAnalyticsResources +from ._models_py3 import FirewallPolicyLogAnalyticsWorkspace +from ._models_py3 import FirewallPolicyNatRuleCollection +from ._models_py3 import FirewallPolicyNatRuleCollectionAction +from ._models_py3 import FirewallPolicyRule +from ._models_py3 import FirewallPolicyRuleApplicationProtocol +from ._models_py3 import FirewallPolicyRuleCollection +from ._models_py3 import FirewallPolicyRuleCollectionGroup +from ._models_py3 import FirewallPolicyRuleCollectionGroupListResult +from ._models_py3 import FirewallPolicySNAT +from ._models_py3 import FirewallPolicySQL +from ._models_py3 import FirewallPolicySku +from ._models_py3 import FirewallPolicyThreatIntelWhitelist +from ._models_py3 import FirewallPolicyTransportSecurity +from ._models_py3 import FlowLog +from ._models_py3 import FlowLogFormatParameters +from ._models_py3 import FlowLogInformation +from ._models_py3 import FlowLogListResult +from ._models_py3 import FlowLogStatusParameters +from ._models_py3 import FrontendIPConfiguration +from ._models_py3 import GatewayCustomBgpIpAddressIpConfiguration +from ._models_py3 import GatewayLoadBalancerTunnelInterface +from ._models_py3 import GatewayRoute +from ._models_py3 import GatewayRouteListResult +from ._models_py3 import GenerateExpressRoutePortsLOARequest +from ._models_py3 import GenerateExpressRoutePortsLOAResult +from ._models_py3 import GetVpnSitesConfigurationRequest +from ._models_py3 import HTTPConfiguration +from ._models_py3 import HTTPHeader +from ._models_py3 import HopLink +from ._models_py3 import HubIPAddresses +from ._models_py3 import HubIpConfiguration +from ._models_py3 import HubPublicIPAddresses +from ._models_py3 import HubRoute +from ._models_py3 import HubRouteTable +from ._models_py3 import HubVirtualNetworkConnection +from ._models_py3 import IDPSQueryObject +from ._models_py3 import IPAddressAvailabilityResult +from ._models_py3 import IPConfiguration +from ._models_py3 import IPConfigurationBgpPeeringAddress +from ._models_py3 import IPConfigurationProfile +from ._models_py3 import InboundNatPool +from ._models_py3 import InboundNatRule +from ._models_py3 import InboundNatRuleListResult +from ._models_py3 import InboundNatRulePortMapping +from ._models_py3 import InboundSecurityRule +from ._models_py3 import InboundSecurityRules +from ._models_py3 import IpAllocation +from ._models_py3 import IpAllocationListResult +from ._models_py3 import IpGroup +from ._models_py3 import IpGroupListResult +from ._models_py3 import IpTag +from ._models_py3 import IpsecPolicy +from ._models_py3 import Ipv6CircuitConnectionConfig +from ._models_py3 import Ipv6ExpressRouteCircuitPeeringConfig +from ._models_py3 import ListHubRouteTablesResult +from ._models_py3 import ListHubVirtualNetworkConnectionsResult +from ._models_py3 import ListP2SVpnGatewaysResult +from ._models_py3 import ListRoutingIntentResult +from ._models_py3 import ListVirtualHubBgpConnectionResults +from ._models_py3 import ListVirtualHubIpConfigurationResults +from ._models_py3 import ListVirtualHubRouteTableV2SResult +from ._models_py3 import ListVirtualHubsResult +from ._models_py3 import ListVirtualNetworkGatewayNatRulesResult +from ._models_py3 import ListVirtualWANsResult +from ._models_py3 import ListVpnConnectionsResult +from ._models_py3 import ListVpnGatewayNatRulesResult +from ._models_py3 import ListVpnGatewaysResult +from ._models_py3 import ListVpnServerConfigurationPolicyGroupsResult +from ._models_py3 import ListVpnServerConfigurationsResult +from ._models_py3 import ListVpnSiteLinkConnectionsResult +from ._models_py3 import ListVpnSiteLinksResult +from ._models_py3 import ListVpnSitesResult +from ._models_py3 import LoadBalancer +from ._models_py3 import LoadBalancerBackendAddress +from ._models_py3 import LoadBalancerBackendAddressPoolListResult +from ._models_py3 import LoadBalancerFrontendIPConfigurationListResult +from ._models_py3 import LoadBalancerListResult +from ._models_py3 import LoadBalancerLoadBalancingRuleListResult +from ._models_py3 import LoadBalancerOutboundRuleListResult +from ._models_py3 import LoadBalancerProbeListResult +from ._models_py3 import LoadBalancerSku +from ._models_py3 import LoadBalancerVipSwapRequest +from ._models_py3 import LoadBalancerVipSwapRequestFrontendIPConfiguration +from ._models_py3 import LoadBalancingRule +from ._models_py3 import LocalNetworkGateway +from ._models_py3 import LocalNetworkGatewayListResult +from ._models_py3 import LogSpecification +from ._models_py3 import ManagedRuleGroupOverride +from ._models_py3 import ManagedRuleOverride +from ._models_py3 import ManagedRuleSet +from ._models_py3 import ManagedRulesDefinition +from ._models_py3 import ManagedServiceIdentity +from ._models_py3 import MatchCondition +from ._models_py3 import MatchVariable +from ._models_py3 import MatchedRule +from ._models_py3 import MetricSpecification +from ._models_py3 import NatGateway +from ._models_py3 import NatGatewayListResult +from ._models_py3 import NatGatewaySku +from ._models_py3 import NatRule +from ._models_py3 import NatRulePortMapping +from ._models_py3 import NetworkConfigurationDiagnosticParameters +from ._models_py3 import NetworkConfigurationDiagnosticProfile +from ._models_py3 import NetworkConfigurationDiagnosticResponse +from ._models_py3 import NetworkConfigurationDiagnosticResult +from ._models_py3 import NetworkIntentPolicy +from ._models_py3 import NetworkIntentPolicyConfiguration +from ._models_py3 import NetworkInterface +from ._models_py3 import NetworkInterfaceAssociation +from ._models_py3 import NetworkInterfaceDnsSettings +from ._models_py3 import NetworkInterfaceIPConfiguration +from ._models_py3 import NetworkInterfaceIPConfigurationListResult +from ._models_py3 import NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties +from ._models_py3 import NetworkInterfaceListResult +from ._models_py3 import NetworkInterfaceLoadBalancerListResult +from ._models_py3 import NetworkInterfaceTapConfiguration +from ._models_py3 import NetworkInterfaceTapConfigurationListResult +from ._models_py3 import NetworkProfile +from ._models_py3 import NetworkProfileListResult +from ._models_py3 import NetworkRule +from ._models_py3 import NetworkSecurityGroup +from ._models_py3 import NetworkSecurityGroupListResult +from ._models_py3 import NetworkSecurityGroupResult +from ._models_py3 import NetworkSecurityRulesEvaluationResult +from ._models_py3 import NetworkVirtualAppliance +from ._models_py3 import NetworkVirtualApplianceListResult +from ._models_py3 import NetworkVirtualApplianceSiteListResult +from ._models_py3 import NetworkVirtualApplianceSku +from ._models_py3 import NetworkVirtualApplianceSkuInstances +from ._models_py3 import NetworkVirtualApplianceSkuListResult +from ._models_py3 import NetworkWatcher +from ._models_py3 import NetworkWatcherListResult +from ._models_py3 import NextHopParameters +from ._models_py3 import NextHopResult +from ._models_py3 import O365BreakOutCategoryPolicies +from ._models_py3 import O365PolicyProperties +from ._models_py3 import Office365PolicyProperties +from ._models_py3 import Operation +from ._models_py3 import OperationDisplay +from ._models_py3 import OperationListResult +from ._models_py3 import OperationPropertiesFormatServiceSpecification +from ._models_py3 import OrderBy +from ._models_py3 import OutboundRule +from ._models_py3 import OwaspCrsExclusionEntry +from ._models_py3 import P2SConnectionConfiguration +from ._models_py3 import P2SVpnConnectionHealth +from ._models_py3 import P2SVpnConnectionHealthRequest +from ._models_py3 import P2SVpnConnectionRequest +from ._models_py3 import P2SVpnGateway +from ._models_py3 import P2SVpnProfileParameters +from ._models_py3 import PacketCapture +from ._models_py3 import PacketCaptureFilter +from ._models_py3 import PacketCaptureListResult +from ._models_py3 import PacketCaptureParameters +from ._models_py3 import PacketCaptureQueryStatusResult +from ._models_py3 import PacketCaptureResult +from ._models_py3 import PacketCaptureResultProperties +from ._models_py3 import PacketCaptureStorageLocation +from ._models_py3 import PatchRouteFilter +from ._models_py3 import PatchRouteFilterRule +from ._models_py3 import PeerExpressRouteCircuitConnection +from ._models_py3 import PeerExpressRouteCircuitConnectionListResult +from ._models_py3 import PeerRoute +from ._models_py3 import PeerRouteList +from ._models_py3 import PolicySettings +from ._models_py3 import PrepareNetworkPoliciesRequest +from ._models_py3 import PrivateDnsZoneConfig +from ._models_py3 import PrivateDnsZoneGroup +from ._models_py3 import PrivateDnsZoneGroupListResult +from ._models_py3 import PrivateEndpoint +from ._models_py3 import PrivateEndpointConnection +from ._models_py3 import PrivateEndpointConnectionListResult +from ._models_py3 import PrivateEndpointIPConfiguration +from ._models_py3 import PrivateEndpointListResult +from ._models_py3 import PrivateLinkService +from ._models_py3 import PrivateLinkServiceConnection +from ._models_py3 import PrivateLinkServiceConnectionState +from ._models_py3 import PrivateLinkServiceIpConfiguration +from ._models_py3 import PrivateLinkServiceListResult +from ._models_py3 import PrivateLinkServicePropertiesAutoApproval +from ._models_py3 import PrivateLinkServicePropertiesVisibility +from ._models_py3 import PrivateLinkServiceVisibility +from ._models_py3 import Probe +from ._models_py3 import PropagatedRouteTable +from ._models_py3 import ProtocolConfiguration +from ._models_py3 import ProtocolCustomSettingsFormat +from ._models_py3 import PublicIPAddress +from ._models_py3 import PublicIPAddressDnsSettings +from ._models_py3 import PublicIPAddressListResult +from ._models_py3 import PublicIPAddressSku +from ._models_py3 import PublicIPPrefix +from ._models_py3 import PublicIPPrefixListResult +from ._models_py3 import PublicIPPrefixSku +from ._models_py3 import QosDefinition +from ._models_py3 import QosIpRange +from ._models_py3 import QosPortRange +from ._models_py3 import QueryInboundNatRulePortMappingRequest +from ._models_py3 import QueryResults +from ._models_py3 import QueryTroubleshootingParameters +from ._models_py3 import RadiusServer +from ._models_py3 import RecordSet +from ._models_py3 import ReferencedPublicIpAddress +from ._models_py3 import Resource +from ._models_py3 import ResourceNavigationLink +from ._models_py3 import ResourceNavigationLinksListResult +from ._models_py3 import ResourceSet +from ._models_py3 import RetentionPolicyParameters +from ._models_py3 import Route +from ._models_py3 import RouteFilter +from ._models_py3 import RouteFilterListResult +from ._models_py3 import RouteFilterRule +from ._models_py3 import RouteFilterRuleListResult +from ._models_py3 import RouteListResult +from ._models_py3 import RouteTable +from ._models_py3 import RouteTableListResult +from ._models_py3 import RoutingConfiguration +from ._models_py3 import RoutingIntent +from ._models_py3 import RoutingPolicy +from ._models_py3 import SecurityGroupNetworkInterface +from ._models_py3 import SecurityGroupViewParameters +from ._models_py3 import SecurityGroupViewResult +from ._models_py3 import SecurityPartnerProvider +from ._models_py3 import SecurityPartnerProviderListResult +from ._models_py3 import SecurityRule +from ._models_py3 import SecurityRuleAssociations +from ._models_py3 import SecurityRuleListResult +from ._models_py3 import ServiceAssociationLink +from ._models_py3 import ServiceAssociationLinksListResult +from ._models_py3 import ServiceEndpointPolicy +from ._models_py3 import ServiceEndpointPolicyDefinition +from ._models_py3 import ServiceEndpointPolicyDefinitionListResult +from ._models_py3 import ServiceEndpointPolicyListResult +from ._models_py3 import ServiceEndpointPropertiesFormat +from ._models_py3 import ServiceTagInformation +from ._models_py3 import ServiceTagInformationListResult +from ._models_py3 import ServiceTagInformationPropertiesFormat +from ._models_py3 import ServiceTagsListResult +from ._models_py3 import SessionIds +from ._models_py3 import SignatureOverridesFilterValuesQuery +from ._models_py3 import SignatureOverridesFilterValuesResponse +from ._models_py3 import SignaturesOverrides +from ._models_py3 import SignaturesOverridesList +from ._models_py3 import SignaturesOverridesProperties +from ._models_py3 import SingleQueryResult +from ._models_py3 import Sku +from ._models_py3 import StaticRoute +from ._models_py3 import SubResource +from ._models_py3 import Subnet +from ._models_py3 import SubnetAssociation +from ._models_py3 import SubnetListResult +from ._models_py3 import TagsObject +from ._models_py3 import Topology +from ._models_py3 import TopologyAssociation +from ._models_py3 import TopologyParameters +from ._models_py3 import TopologyResource +from ._models_py3 import TrafficAnalyticsConfigurationProperties +from ._models_py3 import TrafficAnalyticsProperties +from ._models_py3 import TrafficSelectorPolicy +from ._models_py3 import TroubleshootingDetails +from ._models_py3 import TroubleshootingParameters +from ._models_py3 import TroubleshootingRecommendedActions +from ._models_py3 import TroubleshootingResult +from ._models_py3 import TunnelConnectionHealth +from ._models_py3 import UnprepareNetworkPoliciesRequest +from ._models_py3 import Usage +from ._models_py3 import UsageName +from ._models_py3 import UsagesListResult +from ._models_py3 import VM +from ._models_py3 import VerificationIPFlowParameters +from ._models_py3 import VerificationIPFlowResult +from ._models_py3 import VirtualApplianceNicProperties +from ._models_py3 import VirtualApplianceSite +from ._models_py3 import VirtualApplianceSkuProperties +from ._models_py3 import VirtualHub +from ._models_py3 import VirtualHubEffectiveRoute +from ._models_py3 import VirtualHubEffectiveRouteList +from ._models_py3 import VirtualHubId +from ._models_py3 import VirtualHubRoute +from ._models_py3 import VirtualHubRouteTable +from ._models_py3 import VirtualHubRouteTableV2 +from ._models_py3 import VirtualHubRouteV2 +from ._models_py3 import VirtualNetwork +from ._models_py3 import VirtualNetworkBgpCommunities +from ._models_py3 import VirtualNetworkConnectionGatewayReference +from ._models_py3 import VirtualNetworkEncryption +from ._models_py3 import VirtualNetworkGateway +from ._models_py3 import VirtualNetworkGatewayConnection +from ._models_py3 import VirtualNetworkGatewayConnectionListEntity +from ._models_py3 import VirtualNetworkGatewayConnectionListResult +from ._models_py3 import VirtualNetworkGatewayIPConfiguration +from ._models_py3 import VirtualNetworkGatewayListConnectionsResult +from ._models_py3 import VirtualNetworkGatewayListResult +from ._models_py3 import VirtualNetworkGatewayNatRule +from ._models_py3 import VirtualNetworkGatewaySku +from ._models_py3 import VirtualNetworkListResult +from ._models_py3 import VirtualNetworkListUsageResult +from ._models_py3 import VirtualNetworkPeering +from ._models_py3 import VirtualNetworkPeeringListResult +from ._models_py3 import VirtualNetworkTap +from ._models_py3 import VirtualNetworkTapListResult +from ._models_py3 import VirtualNetworkUsage +from ._models_py3 import VirtualNetworkUsageName +from ._models_py3 import VirtualRouter +from ._models_py3 import VirtualRouterListResult +from ._models_py3 import VirtualRouterPeering +from ._models_py3 import VirtualRouterPeeringListResult +from ._models_py3 import VirtualWAN +from ._models_py3 import VirtualWanSecurityProvider +from ._models_py3 import VirtualWanSecurityProviders +from ._models_py3 import VirtualWanVpnProfileParameters +from ._models_py3 import VnetRoute +from ._models_py3 import VpnClientConfiguration +from ._models_py3 import VpnClientConnectionHealth +from ._models_py3 import VpnClientConnectionHealthDetail +from ._models_py3 import VpnClientConnectionHealthDetailListResult +from ._models_py3 import VpnClientIPsecParameters +from ._models_py3 import VpnClientParameters +from ._models_py3 import VpnClientRevokedCertificate +from ._models_py3 import VpnClientRootCertificate +from ._models_py3 import VpnConnection +from ._models_py3 import VpnConnectionPacketCaptureStartParameters +from ._models_py3 import VpnConnectionPacketCaptureStopParameters +from ._models_py3 import VpnDeviceScriptParameters +from ._models_py3 import VpnGateway +from ._models_py3 import VpnGatewayIpConfiguration +from ._models_py3 import VpnGatewayNatRule +from ._models_py3 import VpnGatewayPacketCaptureStartParameters +from ._models_py3 import VpnGatewayPacketCaptureStopParameters +from ._models_py3 import VpnLinkBgpSettings +from ._models_py3 import VpnLinkProviderProperties +from ._models_py3 import VpnNatRuleMapping +from ._models_py3 import VpnPacketCaptureStartParameters +from ._models_py3 import VpnPacketCaptureStopParameters +from ._models_py3 import VpnProfileResponse +from ._models_py3 import VpnServerConfigRadiusClientRootCertificate +from ._models_py3 import VpnServerConfigRadiusServerRootCertificate +from ._models_py3 import VpnServerConfigVpnClientRevokedCertificate +from ._models_py3 import VpnServerConfigVpnClientRootCertificate +from ._models_py3 import VpnServerConfiguration +from ._models_py3 import VpnServerConfigurationPolicyGroup +from ._models_py3 import VpnServerConfigurationPolicyGroupMember +from ._models_py3 import VpnServerConfigurationsResponse +from ._models_py3 import VpnSite +from ._models_py3 import VpnSiteId +from ._models_py3 import VpnSiteLink +from ._models_py3 import VpnSiteLinkConnection +from ._models_py3 import WebApplicationFirewallCustomRule +from ._models_py3 import WebApplicationFirewallPolicy +from ._models_py3 import WebApplicationFirewallPolicyListResult + + +from ._network_management_client_enums import ( + Access, + ApplicationGatewayBackendHealthServerHealth, + ApplicationGatewayCookieBasedAffinity, + ApplicationGatewayCustomErrorStatusCode, + ApplicationGatewayFirewallMode, + ApplicationGatewayLoadDistributionAlgorithm, + ApplicationGatewayOperationalState, + ApplicationGatewayProtocol, + ApplicationGatewayRedirectType, + ApplicationGatewayRequestRoutingRuleType, + ApplicationGatewaySkuName, + ApplicationGatewaySslCipherSuite, + ApplicationGatewaySslPolicyName, + ApplicationGatewaySslPolicyType, + ApplicationGatewaySslProtocol, + ApplicationGatewayTier, + AssociationType, + AuthenticationMethod, + AuthorizationUseStatus, + AzureFirewallApplicationRuleProtocolType, + AzureFirewallNatRCActionType, + AzureFirewallNetworkRuleProtocol, + AzureFirewallRCActionType, + AzureFirewallSkuName, + AzureFirewallSkuTier, + AzureFirewallThreatIntelMode, + BastionConnectProtocol, + BastionHostSkuName, + BgpPeerState, + CircuitConnectionStatus, + CommissionedState, + ConnectionMonitorEndpointFilterItemType, + ConnectionMonitorEndpointFilterType, + ConnectionMonitorSourceStatus, + ConnectionMonitorTestConfigurationProtocol, + ConnectionMonitorType, + ConnectionState, + ConnectionStatus, + CoverageLevel, + DdosCustomPolicyProtocol, + DdosCustomPolicyTriggerSensitivityOverride, + DdosSettingsProtectionCoverage, + DeleteOptions, + DestinationPortBehavior, + DhGroup, + Direction, + EffectiveRouteSource, + EffectiveRouteState, + EffectiveSecurityRuleProtocol, + EndpointType, + EvaluationState, + ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, + ExpressRouteCircuitPeeringState, + ExpressRouteCircuitSkuFamily, + ExpressRouteCircuitSkuTier, + ExpressRouteLinkAdminState, + ExpressRouteLinkConnectorType, + ExpressRouteLinkMacSecCipher, + ExpressRouteLinkMacSecSciState, + ExpressRoutePeeringState, + ExpressRoutePeeringType, + ExpressRoutePortAuthorizationUseStatus, + ExpressRoutePortsEncapsulation, + ExtendedLocationTypes, + FirewallPolicyFilterRuleCollectionActionType, + FirewallPolicyIDPSQuerySortOrder, + FirewallPolicyIDPSSignatureDirection, + FirewallPolicyIDPSSignatureMode, + FirewallPolicyIDPSSignatureSeverity, + FirewallPolicyIntrusionDetectionProtocol, + FirewallPolicyIntrusionDetectionStateType, + FirewallPolicyNatRuleCollectionActionType, + FirewallPolicyRuleApplicationProtocolType, + FirewallPolicyRuleCollectionType, + FirewallPolicyRuleNetworkProtocol, + FirewallPolicyRuleType, + FirewallPolicySkuTier, + FlowLogFormatType, + GatewayLoadBalancerTunnelInterfaceType, + GatewayLoadBalancerTunnelProtocol, + HTTPConfigurationMethod, + HTTPMethod, + HubBgpConnectionStatus, + HubRoutingPreference, + HubVirtualNetworkConnectionStatus, + IPAllocationMethod, + IPVersion, + IkeEncryption, + IkeIntegrity, + InboundSecurityRulesProtocol, + IpAllocationType, + IpFlowProtocol, + IpsecEncryption, + IpsecIntegrity, + IssueType, + LoadBalancerBackendAddressAdminState, + LoadBalancerOutboundRuleProtocol, + LoadBalancerSkuName, + LoadBalancerSkuTier, + LoadDistribution, + ManagedRuleEnabledState, + NatGatewaySkuName, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceMigrationPhase, + NetworkInterfaceNicType, + NetworkOperationStatus, + NextHopType, + OfficeTrafficCategory, + Origin, + OutputType, + OwaspCrsExclusionEntryMatchVariable, + OwaspCrsExclusionEntrySelectorMatchOperator, + PcError, + PcProtocol, + PcStatus, + PfsGroup, + PreferredIPVersion, + PreferredRoutingGateway, + ProbeProtocol, + ProcessorArchitecture, + Protocol, + ProtocolType, + ProvisioningState, + PublicIPAddressMigrationPhase, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPPrefixSkuName, + PublicIPPrefixSkuTier, + ResourceIdentityType, + RouteFilterRuleType, + RouteNextHopType, + RoutingState, + SecurityPartnerProviderConnectionStatus, + SecurityProviderName, + SecurityRuleAccess, + SecurityRuleDirection, + SecurityRuleProtocol, + ServiceProviderProvisioningState, + Severity, + SyncRemoteAddressSpace, + TransportProtocol, + TunnelConnectionStatus, + UsageUnit, + VerbosityLevel, + VirtualNetworkEncryptionEnforcement, + VirtualNetworkGatewayConnectionMode, + VirtualNetworkGatewayConnectionProtocol, + VirtualNetworkGatewayConnectionStatus, + VirtualNetworkGatewayConnectionType, + VirtualNetworkGatewaySkuName, + VirtualNetworkGatewaySkuTier, + VirtualNetworkGatewayType, + VirtualNetworkPeeringLevel, + VirtualNetworkPeeringState, + VirtualNetworkPrivateEndpointNetworkPolicies, + VirtualNetworkPrivateLinkServiceNetworkPolicies, + VirtualWanSecurityProviderType, + VpnAuthenticationType, + VpnClientProtocol, + VpnConnectionStatus, + VpnGatewayGeneration, + VpnGatewayTunnelingProtocol, + VpnLinkConnectionMode, + VpnNatRuleMode, + VpnNatRuleType, + VpnPolicyMemberAttributeType, + VpnType, + WebApplicationFirewallAction, + WebApplicationFirewallEnabledState, + WebApplicationFirewallMatchVariable, + WebApplicationFirewallMode, + WebApplicationFirewallOperator, + WebApplicationFirewallPolicyResourceState, + WebApplicationFirewallRuleType, + WebApplicationFirewallTransform, +) + +__all__ = [ + 'AadAuthenticationParameters', + 'AddressSpace', + 'ApplicationGateway', + 'ApplicationGatewayAuthenticationCertificate', + 'ApplicationGatewayAutoscaleConfiguration', + 'ApplicationGatewayAvailableSslOptions', + 'ApplicationGatewayAvailableSslPredefinedPolicies', + 'ApplicationGatewayAvailableWafRuleSetsResult', + 'ApplicationGatewayBackendAddress', + 'ApplicationGatewayBackendAddressPool', + 'ApplicationGatewayBackendHealth', + 'ApplicationGatewayBackendHealthHttpSettings', + 'ApplicationGatewayBackendHealthOnDemand', + 'ApplicationGatewayBackendHealthPool', + 'ApplicationGatewayBackendHealthServer', + 'ApplicationGatewayBackendHttpSettings', + 'ApplicationGatewayBackendSettings', + 'ApplicationGatewayClientAuthConfiguration', + 'ApplicationGatewayConnectionDraining', + 'ApplicationGatewayCustomError', + 'ApplicationGatewayFirewallDisabledRuleGroup', + 'ApplicationGatewayFirewallExclusion', + 'ApplicationGatewayFirewallRule', + 'ApplicationGatewayFirewallRuleGroup', + 'ApplicationGatewayFirewallRuleSet', + 'ApplicationGatewayFrontendIPConfiguration', + 'ApplicationGatewayFrontendPort', + 'ApplicationGatewayGlobalConfiguration', + 'ApplicationGatewayHeaderConfiguration', + 'ApplicationGatewayHttpListener', + 'ApplicationGatewayIPConfiguration', + 'ApplicationGatewayListResult', + 'ApplicationGatewayListener', + 'ApplicationGatewayLoadDistributionPolicy', + 'ApplicationGatewayLoadDistributionTarget', + 'ApplicationGatewayOnDemandProbe', + 'ApplicationGatewayPathRule', + 'ApplicationGatewayPrivateEndpointConnection', + 'ApplicationGatewayPrivateEndpointConnectionListResult', + 'ApplicationGatewayPrivateLinkConfiguration', + 'ApplicationGatewayPrivateLinkIpConfiguration', + 'ApplicationGatewayPrivateLinkResource', + 'ApplicationGatewayPrivateLinkResourceListResult', + 'ApplicationGatewayProbe', + 'ApplicationGatewayProbeHealthResponseMatch', + 'ApplicationGatewayRedirectConfiguration', + 'ApplicationGatewayRequestRoutingRule', + 'ApplicationGatewayRewriteRule', + 'ApplicationGatewayRewriteRuleActionSet', + 'ApplicationGatewayRewriteRuleCondition', + 'ApplicationGatewayRewriteRuleSet', + 'ApplicationGatewayRoutingRule', + 'ApplicationGatewaySku', + 'ApplicationGatewaySslCertificate', + 'ApplicationGatewaySslPolicy', + 'ApplicationGatewaySslPredefinedPolicy', + 'ApplicationGatewaySslProfile', + 'ApplicationGatewayTrustedClientCertificate', + 'ApplicationGatewayTrustedRootCertificate', + 'ApplicationGatewayUrlConfiguration', + 'ApplicationGatewayUrlPathMap', + 'ApplicationGatewayWebApplicationFirewallConfiguration', + 'ApplicationRule', + 'ApplicationSecurityGroup', + 'ApplicationSecurityGroupListResult', + 'AuthorizationListResult', + 'AutoApprovedPrivateLinkService', + 'AutoApprovedPrivateLinkServicesResult', + 'Availability', + 'AvailableDelegation', + 'AvailableDelegationsResult', + 'AvailablePrivateEndpointType', + 'AvailablePrivateEndpointTypesResult', + 'AvailableProvidersList', + 'AvailableProvidersListCity', + 'AvailableProvidersListCountry', + 'AvailableProvidersListParameters', + 'AvailableProvidersListState', + 'AvailableServiceAlias', + 'AvailableServiceAliasesResult', + 'AzureAsyncOperationResult', + 'AzureFirewall', + 'AzureFirewallApplicationRule', + 'AzureFirewallApplicationRuleCollection', + 'AzureFirewallApplicationRuleProtocol', + 'AzureFirewallFqdnTag', + 'AzureFirewallFqdnTagListResult', + 'AzureFirewallIPConfiguration', + 'AzureFirewallIpGroups', + 'AzureFirewallListResult', + 'AzureFirewallNatRCAction', + 'AzureFirewallNatRule', + 'AzureFirewallNatRuleCollection', + 'AzureFirewallNetworkRule', + 'AzureFirewallNetworkRuleCollection', + 'AzureFirewallPublicIPAddress', + 'AzureFirewallRCAction', + 'AzureFirewallSku', + 'AzureReachabilityReport', + 'AzureReachabilityReportItem', + 'AzureReachabilityReportLatencyInfo', + 'AzureReachabilityReportLocation', + 'AzureReachabilityReportParameters', + 'AzureWebCategory', + 'AzureWebCategoryListResult', + 'BGPCommunity', + 'BackendAddressInboundNatRulePortMappings', + 'BackendAddressPool', + 'BastionActiveSession', + 'BastionActiveSessionListResult', + 'BastionHost', + 'BastionHostIPConfiguration', + 'BastionHostListResult', + 'BastionSessionDeleteResult', + 'BastionSessionState', + 'BastionShareableLink', + 'BastionShareableLinkListRequest', + 'BastionShareableLinkListResult', + 'BgpConnection', + 'BgpPeerStatus', + 'BgpPeerStatusListResult', + 'BgpServiceCommunity', + 'BgpServiceCommunityListResult', + 'BgpSettings', + 'BreakOutCategoryPolicies', + 'CheckPrivateLinkServiceVisibilityRequest', + 'CloudErrorBody', + 'Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ConnectionMonitor', + 'ConnectionMonitorDestination', + 'ConnectionMonitorEndpoint', + 'ConnectionMonitorEndpointFilter', + 'ConnectionMonitorEndpointFilterItem', + 'ConnectionMonitorEndpointScope', + 'ConnectionMonitorEndpointScopeItem', + 'ConnectionMonitorHttpConfiguration', + 'ConnectionMonitorIcmpConfiguration', + 'ConnectionMonitorListResult', + 'ConnectionMonitorOutput', + 'ConnectionMonitorParameters', + 'ConnectionMonitorQueryResult', + 'ConnectionMonitorResult', + 'ConnectionMonitorResultProperties', + 'ConnectionMonitorSource', + 'ConnectionMonitorSuccessThreshold', + 'ConnectionMonitorTcpConfiguration', + 'ConnectionMonitorTestConfiguration', + 'ConnectionMonitorTestGroup', + 'ConnectionMonitorWorkspaceSettings', + 'ConnectionResetSharedKey', + 'ConnectionSharedKey', + 'ConnectionStateSnapshot', + 'ConnectivityDestination', + 'ConnectivityHop', + 'ConnectivityInformation', + 'ConnectivityIssue', + 'ConnectivityParameters', + 'ConnectivitySource', + 'Container', + 'ContainerNetworkInterface', + 'ContainerNetworkInterfaceConfiguration', + 'ContainerNetworkInterfaceIpConfiguration', + 'CustomDnsConfigPropertiesFormat', + 'CustomIpPrefix', + 'CustomIpPrefixListResult', + 'DdosCustomPolicy', + 'DdosProtectionPlan', + 'DdosProtectionPlanListResult', + 'DdosSettings', + 'Delegation', + 'DeviceProperties', + 'DhcpOptions', + 'Dimension', + 'DnsNameAvailabilityResult', + 'DnsSettings', + 'DscpConfiguration', + 'DscpConfigurationListResult', + 'EffectiveNetworkSecurityGroup', + 'EffectiveNetworkSecurityGroupAssociation', + 'EffectiveNetworkSecurityGroupListResult', + 'EffectiveNetworkSecurityRule', + 'EffectiveRoute', + 'EffectiveRouteListResult', + 'EffectiveRoutesParameters', + 'EndpointServiceResult', + 'EndpointServicesListResult', + 'Error', + 'ErrorDetails', + 'ErrorResponse', + 'EvaluatedNetworkSecurityGroup', + 'ExclusionManagedRule', + 'ExclusionManagedRuleGroup', + 'ExclusionManagedRuleSet', + 'ExplicitProxySettings', + 'ExpressRouteCircuit', + 'ExpressRouteCircuitArpTable', + 'ExpressRouteCircuitAuthorization', + 'ExpressRouteCircuitConnection', + 'ExpressRouteCircuitConnectionListResult', + 'ExpressRouteCircuitListResult', + 'ExpressRouteCircuitPeering', + 'ExpressRouteCircuitPeeringConfig', + 'ExpressRouteCircuitPeeringId', + 'ExpressRouteCircuitPeeringListResult', + 'ExpressRouteCircuitReference', + 'ExpressRouteCircuitRoutesTable', + 'ExpressRouteCircuitRoutesTableSummary', + 'ExpressRouteCircuitServiceProviderProperties', + 'ExpressRouteCircuitSku', + 'ExpressRouteCircuitStats', + 'ExpressRouteCircuitsArpTableListResult', + 'ExpressRouteCircuitsRoutesTableListResult', + 'ExpressRouteCircuitsRoutesTableSummaryListResult', + 'ExpressRouteConnection', + 'ExpressRouteConnectionId', + 'ExpressRouteConnectionList', + 'ExpressRouteCrossConnection', + 'ExpressRouteCrossConnectionListResult', + 'ExpressRouteCrossConnectionPeering', + 'ExpressRouteCrossConnectionPeeringList', + 'ExpressRouteCrossConnectionRoutesTableSummary', + 'ExpressRouteCrossConnectionsRoutesTableSummaryListResult', + 'ExpressRouteGateway', + 'ExpressRouteGatewayList', + 'ExpressRouteGatewayPropertiesAutoScaleConfiguration', + 'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds', + 'ExpressRouteLink', + 'ExpressRouteLinkListResult', + 'ExpressRouteLinkMacSecConfig', + 'ExpressRoutePort', + 'ExpressRoutePortAuthorization', + 'ExpressRoutePortAuthorizationListResult', + 'ExpressRoutePortListResult', + 'ExpressRoutePortsLocation', + 'ExpressRoutePortsLocationBandwidths', + 'ExpressRoutePortsLocationListResult', + 'ExpressRouteServiceProvider', + 'ExpressRouteServiceProviderBandwidthsOffered', + 'ExpressRouteServiceProviderListResult', + 'ExtendedLocation', + 'FilterItems', + 'FirewallPolicy', + 'FirewallPolicyCertificateAuthority', + 'FirewallPolicyFilterRuleCollection', + 'FirewallPolicyFilterRuleCollectionAction', + 'FirewallPolicyInsights', + 'FirewallPolicyIntrusionDetection', + 'FirewallPolicyIntrusionDetectionBypassTrafficSpecifications', + 'FirewallPolicyIntrusionDetectionConfiguration', + 'FirewallPolicyIntrusionDetectionSignatureSpecification', + 'FirewallPolicyListResult', + 'FirewallPolicyLogAnalyticsResources', + 'FirewallPolicyLogAnalyticsWorkspace', + 'FirewallPolicyNatRuleCollection', + 'FirewallPolicyNatRuleCollectionAction', + 'FirewallPolicyRule', + 'FirewallPolicyRuleApplicationProtocol', + 'FirewallPolicyRuleCollection', + 'FirewallPolicyRuleCollectionGroup', + 'FirewallPolicyRuleCollectionGroupListResult', + 'FirewallPolicySNAT', + 'FirewallPolicySQL', + 'FirewallPolicySku', + 'FirewallPolicyThreatIntelWhitelist', + 'FirewallPolicyTransportSecurity', + 'FlowLog', + 'FlowLogFormatParameters', + 'FlowLogInformation', + 'FlowLogListResult', + 'FlowLogStatusParameters', + 'FrontendIPConfiguration', + 'GatewayCustomBgpIpAddressIpConfiguration', + 'GatewayLoadBalancerTunnelInterface', + 'GatewayRoute', + 'GatewayRouteListResult', + 'GenerateExpressRoutePortsLOARequest', + 'GenerateExpressRoutePortsLOAResult', + 'GetVpnSitesConfigurationRequest', + 'HTTPConfiguration', + 'HTTPHeader', + 'HopLink', + 'HubIPAddresses', + 'HubIpConfiguration', + 'HubPublicIPAddresses', + 'HubRoute', + 'HubRouteTable', + 'HubVirtualNetworkConnection', + 'IDPSQueryObject', + 'IPAddressAvailabilityResult', + 'IPConfiguration', + 'IPConfigurationBgpPeeringAddress', + 'IPConfigurationProfile', + 'InboundNatPool', + 'InboundNatRule', + 'InboundNatRuleListResult', + 'InboundNatRulePortMapping', + 'InboundSecurityRule', + 'InboundSecurityRules', + 'IpAllocation', + 'IpAllocationListResult', + 'IpGroup', + 'IpGroupListResult', + 'IpTag', + 'IpsecPolicy', + 'Ipv6CircuitConnectionConfig', + 'Ipv6ExpressRouteCircuitPeeringConfig', + 'ListHubRouteTablesResult', + 'ListHubVirtualNetworkConnectionsResult', + 'ListP2SVpnGatewaysResult', + 'ListRoutingIntentResult', + 'ListVirtualHubBgpConnectionResults', + 'ListVirtualHubIpConfigurationResults', + 'ListVirtualHubRouteTableV2SResult', + 'ListVirtualHubsResult', + 'ListVirtualNetworkGatewayNatRulesResult', + 'ListVirtualWANsResult', + 'ListVpnConnectionsResult', + 'ListVpnGatewayNatRulesResult', + 'ListVpnGatewaysResult', + 'ListVpnServerConfigurationPolicyGroupsResult', + 'ListVpnServerConfigurationsResult', + 'ListVpnSiteLinkConnectionsResult', + 'ListVpnSiteLinksResult', + 'ListVpnSitesResult', + 'LoadBalancer', + 'LoadBalancerBackendAddress', + 'LoadBalancerBackendAddressPoolListResult', + 'LoadBalancerFrontendIPConfigurationListResult', + 'LoadBalancerListResult', + 'LoadBalancerLoadBalancingRuleListResult', + 'LoadBalancerOutboundRuleListResult', + 'LoadBalancerProbeListResult', + 'LoadBalancerSku', + 'LoadBalancerVipSwapRequest', + 'LoadBalancerVipSwapRequestFrontendIPConfiguration', + 'LoadBalancingRule', + 'LocalNetworkGateway', + 'LocalNetworkGatewayListResult', + 'LogSpecification', + 'ManagedRuleGroupOverride', + 'ManagedRuleOverride', + 'ManagedRuleSet', + 'ManagedRulesDefinition', + 'ManagedServiceIdentity', + 'MatchCondition', + 'MatchVariable', + 'MatchedRule', + 'MetricSpecification', + 'NatGateway', + 'NatGatewayListResult', + 'NatGatewaySku', + 'NatRule', + 'NatRulePortMapping', + 'NetworkConfigurationDiagnosticParameters', + 'NetworkConfigurationDiagnosticProfile', + 'NetworkConfigurationDiagnosticResponse', + 'NetworkConfigurationDiagnosticResult', + 'NetworkIntentPolicy', + 'NetworkIntentPolicyConfiguration', + 'NetworkInterface', + 'NetworkInterfaceAssociation', + 'NetworkInterfaceDnsSettings', + 'NetworkInterfaceIPConfiguration', + 'NetworkInterfaceIPConfigurationListResult', + 'NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties', + 'NetworkInterfaceListResult', + 'NetworkInterfaceLoadBalancerListResult', + 'NetworkInterfaceTapConfiguration', + 'NetworkInterfaceTapConfigurationListResult', + 'NetworkProfile', + 'NetworkProfileListResult', + 'NetworkRule', + 'NetworkSecurityGroup', + 'NetworkSecurityGroupListResult', + 'NetworkSecurityGroupResult', + 'NetworkSecurityRulesEvaluationResult', + 'NetworkVirtualAppliance', + 'NetworkVirtualApplianceListResult', + 'NetworkVirtualApplianceSiteListResult', + 'NetworkVirtualApplianceSku', + 'NetworkVirtualApplianceSkuInstances', + 'NetworkVirtualApplianceSkuListResult', + 'NetworkWatcher', + 'NetworkWatcherListResult', + 'NextHopParameters', + 'NextHopResult', + 'O365BreakOutCategoryPolicies', + 'O365PolicyProperties', + 'Office365PolicyProperties', + 'Operation', + 'OperationDisplay', + 'OperationListResult', + 'OperationPropertiesFormatServiceSpecification', + 'OrderBy', + 'OutboundRule', + 'OwaspCrsExclusionEntry', + 'P2SConnectionConfiguration', + 'P2SVpnConnectionHealth', + 'P2SVpnConnectionHealthRequest', + 'P2SVpnConnectionRequest', + 'P2SVpnGateway', + 'P2SVpnProfileParameters', + 'PacketCapture', + 'PacketCaptureFilter', + 'PacketCaptureListResult', + 'PacketCaptureParameters', + 'PacketCaptureQueryStatusResult', + 'PacketCaptureResult', + 'PacketCaptureResultProperties', + 'PacketCaptureStorageLocation', + 'PatchRouteFilter', + 'PatchRouteFilterRule', + 'PeerExpressRouteCircuitConnection', + 'PeerExpressRouteCircuitConnectionListResult', + 'PeerRoute', + 'PeerRouteList', + 'PolicySettings', + 'PrepareNetworkPoliciesRequest', + 'PrivateDnsZoneConfig', + 'PrivateDnsZoneGroup', + 'PrivateDnsZoneGroupListResult', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateEndpointIPConfiguration', + 'PrivateEndpointListResult', + 'PrivateLinkService', + 'PrivateLinkServiceConnection', + 'PrivateLinkServiceConnectionState', + 'PrivateLinkServiceIpConfiguration', + 'PrivateLinkServiceListResult', + 'PrivateLinkServicePropertiesAutoApproval', + 'PrivateLinkServicePropertiesVisibility', + 'PrivateLinkServiceVisibility', + 'Probe', + 'PropagatedRouteTable', + 'ProtocolConfiguration', + 'ProtocolCustomSettingsFormat', + 'PublicIPAddress', + 'PublicIPAddressDnsSettings', + 'PublicIPAddressListResult', + 'PublicIPAddressSku', + 'PublicIPPrefix', + 'PublicIPPrefixListResult', + 'PublicIPPrefixSku', + 'QosDefinition', + 'QosIpRange', + 'QosPortRange', + 'QueryInboundNatRulePortMappingRequest', + 'QueryResults', + 'QueryTroubleshootingParameters', + 'RadiusServer', + 'RecordSet', + 'ReferencedPublicIpAddress', + 'Resource', + 'ResourceNavigationLink', + 'ResourceNavigationLinksListResult', + 'ResourceSet', + 'RetentionPolicyParameters', + 'Route', + 'RouteFilter', + 'RouteFilterListResult', + 'RouteFilterRule', + 'RouteFilterRuleListResult', + 'RouteListResult', + 'RouteTable', + 'RouteTableListResult', + 'RoutingConfiguration', + 'RoutingIntent', + 'RoutingPolicy', + 'SecurityGroupNetworkInterface', + 'SecurityGroupViewParameters', + 'SecurityGroupViewResult', + 'SecurityPartnerProvider', + 'SecurityPartnerProviderListResult', + 'SecurityRule', + 'SecurityRuleAssociations', + 'SecurityRuleListResult', + 'ServiceAssociationLink', + 'ServiceAssociationLinksListResult', + 'ServiceEndpointPolicy', + 'ServiceEndpointPolicyDefinition', + 'ServiceEndpointPolicyDefinitionListResult', + 'ServiceEndpointPolicyListResult', + 'ServiceEndpointPropertiesFormat', + 'ServiceTagInformation', + 'ServiceTagInformationListResult', + 'ServiceTagInformationPropertiesFormat', + 'ServiceTagsListResult', + 'SessionIds', + 'SignatureOverridesFilterValuesQuery', + 'SignatureOverridesFilterValuesResponse', + 'SignaturesOverrides', + 'SignaturesOverridesList', + 'SignaturesOverridesProperties', + 'SingleQueryResult', + 'Sku', + 'StaticRoute', + 'SubResource', + 'Subnet', + 'SubnetAssociation', + 'SubnetListResult', + 'TagsObject', + 'Topology', + 'TopologyAssociation', + 'TopologyParameters', + 'TopologyResource', + 'TrafficAnalyticsConfigurationProperties', + 'TrafficAnalyticsProperties', + 'TrafficSelectorPolicy', + 'TroubleshootingDetails', + 'TroubleshootingParameters', + 'TroubleshootingRecommendedActions', + 'TroubleshootingResult', + 'TunnelConnectionHealth', + 'UnprepareNetworkPoliciesRequest', + 'Usage', + 'UsageName', + 'UsagesListResult', + 'VM', + 'VerificationIPFlowParameters', + 'VerificationIPFlowResult', + 'VirtualApplianceNicProperties', + 'VirtualApplianceSite', + 'VirtualApplianceSkuProperties', + 'VirtualHub', + 'VirtualHubEffectiveRoute', + 'VirtualHubEffectiveRouteList', + 'VirtualHubId', + 'VirtualHubRoute', + 'VirtualHubRouteTable', + 'VirtualHubRouteTableV2', + 'VirtualHubRouteV2', + 'VirtualNetwork', + 'VirtualNetworkBgpCommunities', + 'VirtualNetworkConnectionGatewayReference', + 'VirtualNetworkEncryption', + 'VirtualNetworkGateway', + 'VirtualNetworkGatewayConnection', + 'VirtualNetworkGatewayConnectionListEntity', + 'VirtualNetworkGatewayConnectionListResult', + 'VirtualNetworkGatewayIPConfiguration', + 'VirtualNetworkGatewayListConnectionsResult', + 'VirtualNetworkGatewayListResult', + 'VirtualNetworkGatewayNatRule', + 'VirtualNetworkGatewaySku', + 'VirtualNetworkListResult', + 'VirtualNetworkListUsageResult', + 'VirtualNetworkPeering', + 'VirtualNetworkPeeringListResult', + 'VirtualNetworkTap', + 'VirtualNetworkTapListResult', + 'VirtualNetworkUsage', + 'VirtualNetworkUsageName', + 'VirtualRouter', + 'VirtualRouterListResult', + 'VirtualRouterPeering', + 'VirtualRouterPeeringListResult', + 'VirtualWAN', + 'VirtualWanSecurityProvider', + 'VirtualWanSecurityProviders', + 'VirtualWanVpnProfileParameters', + 'VnetRoute', + 'VpnClientConfiguration', + 'VpnClientConnectionHealth', + 'VpnClientConnectionHealthDetail', + 'VpnClientConnectionHealthDetailListResult', + 'VpnClientIPsecParameters', + 'VpnClientParameters', + 'VpnClientRevokedCertificate', + 'VpnClientRootCertificate', + 'VpnConnection', + 'VpnConnectionPacketCaptureStartParameters', + 'VpnConnectionPacketCaptureStopParameters', + 'VpnDeviceScriptParameters', + 'VpnGateway', + 'VpnGatewayIpConfiguration', + 'VpnGatewayNatRule', + 'VpnGatewayPacketCaptureStartParameters', + 'VpnGatewayPacketCaptureStopParameters', + 'VpnLinkBgpSettings', + 'VpnLinkProviderProperties', + 'VpnNatRuleMapping', + 'VpnPacketCaptureStartParameters', + 'VpnPacketCaptureStopParameters', + 'VpnProfileResponse', + 'VpnServerConfigRadiusClientRootCertificate', + 'VpnServerConfigRadiusServerRootCertificate', + 'VpnServerConfigVpnClientRevokedCertificate', + 'VpnServerConfigVpnClientRootCertificate', + 'VpnServerConfiguration', + 'VpnServerConfigurationPolicyGroup', + 'VpnServerConfigurationPolicyGroupMember', + 'VpnServerConfigurationsResponse', + 'VpnSite', + 'VpnSiteId', + 'VpnSiteLink', + 'VpnSiteLinkConnection', + 'WebApplicationFirewallCustomRule', + 'WebApplicationFirewallPolicy', + 'WebApplicationFirewallPolicyListResult', + 'Access', + 'ApplicationGatewayBackendHealthServerHealth', + 'ApplicationGatewayCookieBasedAffinity', + 'ApplicationGatewayCustomErrorStatusCode', + 'ApplicationGatewayFirewallMode', + 'ApplicationGatewayLoadDistributionAlgorithm', + 'ApplicationGatewayOperationalState', + 'ApplicationGatewayProtocol', + 'ApplicationGatewayRedirectType', + 'ApplicationGatewayRequestRoutingRuleType', + 'ApplicationGatewaySkuName', + 'ApplicationGatewaySslCipherSuite', + 'ApplicationGatewaySslPolicyName', + 'ApplicationGatewaySslPolicyType', + 'ApplicationGatewaySslProtocol', + 'ApplicationGatewayTier', + 'AssociationType', + 'AuthenticationMethod', + 'AuthorizationUseStatus', + 'AzureFirewallApplicationRuleProtocolType', + 'AzureFirewallNatRCActionType', + 'AzureFirewallNetworkRuleProtocol', + 'AzureFirewallRCActionType', + 'AzureFirewallSkuName', + 'AzureFirewallSkuTier', + 'AzureFirewallThreatIntelMode', + 'BastionConnectProtocol', + 'BastionHostSkuName', + 'BgpPeerState', + 'CircuitConnectionStatus', + 'CommissionedState', + 'ConnectionMonitorEndpointFilterItemType', + 'ConnectionMonitorEndpointFilterType', + 'ConnectionMonitorSourceStatus', + 'ConnectionMonitorTestConfigurationProtocol', + 'ConnectionMonitorType', + 'ConnectionState', + 'ConnectionStatus', + 'CoverageLevel', + 'DdosCustomPolicyProtocol', + 'DdosCustomPolicyTriggerSensitivityOverride', + 'DdosSettingsProtectionCoverage', + 'DeleteOptions', + 'DestinationPortBehavior', + 'DhGroup', + 'Direction', + 'EffectiveRouteSource', + 'EffectiveRouteState', + 'EffectiveSecurityRuleProtocol', + 'EndpointType', + 'EvaluationState', + 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixState', + 'ExpressRouteCircuitPeeringState', + 'ExpressRouteCircuitSkuFamily', + 'ExpressRouteCircuitSkuTier', + 'ExpressRouteLinkAdminState', + 'ExpressRouteLinkConnectorType', + 'ExpressRouteLinkMacSecCipher', + 'ExpressRouteLinkMacSecSciState', + 'ExpressRoutePeeringState', + 'ExpressRoutePeeringType', + 'ExpressRoutePortAuthorizationUseStatus', + 'ExpressRoutePortsEncapsulation', + 'ExtendedLocationTypes', + 'FirewallPolicyFilterRuleCollectionActionType', + 'FirewallPolicyIDPSQuerySortOrder', + 'FirewallPolicyIDPSSignatureDirection', + 'FirewallPolicyIDPSSignatureMode', + 'FirewallPolicyIDPSSignatureSeverity', + 'FirewallPolicyIntrusionDetectionProtocol', + 'FirewallPolicyIntrusionDetectionStateType', + 'FirewallPolicyNatRuleCollectionActionType', + 'FirewallPolicyRuleApplicationProtocolType', + 'FirewallPolicyRuleCollectionType', + 'FirewallPolicyRuleNetworkProtocol', + 'FirewallPolicyRuleType', + 'FirewallPolicySkuTier', + 'FlowLogFormatType', + 'GatewayLoadBalancerTunnelInterfaceType', + 'GatewayLoadBalancerTunnelProtocol', + 'HTTPConfigurationMethod', + 'HTTPMethod', + 'HubBgpConnectionStatus', + 'HubRoutingPreference', + 'HubVirtualNetworkConnectionStatus', + 'IPAllocationMethod', + 'IPVersion', + 'IkeEncryption', + 'IkeIntegrity', + 'InboundSecurityRulesProtocol', + 'IpAllocationType', + 'IpFlowProtocol', + 'IpsecEncryption', + 'IpsecIntegrity', + 'IssueType', + 'LoadBalancerBackendAddressAdminState', + 'LoadBalancerOutboundRuleProtocol', + 'LoadBalancerSkuName', + 'LoadBalancerSkuTier', + 'LoadDistribution', + 'ManagedRuleEnabledState', + 'NatGatewaySkuName', + 'NetworkInterfaceAuxiliaryMode', + 'NetworkInterfaceMigrationPhase', + 'NetworkInterfaceNicType', + 'NetworkOperationStatus', + 'NextHopType', + 'OfficeTrafficCategory', + 'Origin', + 'OutputType', + 'OwaspCrsExclusionEntryMatchVariable', + 'OwaspCrsExclusionEntrySelectorMatchOperator', + 'PcError', + 'PcProtocol', + 'PcStatus', + 'PfsGroup', + 'PreferredIPVersion', + 'PreferredRoutingGateway', + 'ProbeProtocol', + 'ProcessorArchitecture', + 'Protocol', + 'ProtocolType', + 'ProvisioningState', + 'PublicIPAddressMigrationPhase', + 'PublicIPAddressSkuName', + 'PublicIPAddressSkuTier', + 'PublicIPPrefixSkuName', + 'PublicIPPrefixSkuTier', + 'ResourceIdentityType', + 'RouteFilterRuleType', + 'RouteNextHopType', + 'RoutingState', + 'SecurityPartnerProviderConnectionStatus', + 'SecurityProviderName', + 'SecurityRuleAccess', + 'SecurityRuleDirection', + 'SecurityRuleProtocol', + 'ServiceProviderProvisioningState', + 'Severity', + 'SyncRemoteAddressSpace', + 'TransportProtocol', + 'TunnelConnectionStatus', + 'UsageUnit', + 'VerbosityLevel', + 'VirtualNetworkEncryptionEnforcement', + 'VirtualNetworkGatewayConnectionMode', + 'VirtualNetworkGatewayConnectionProtocol', + 'VirtualNetworkGatewayConnectionStatus', + 'VirtualNetworkGatewayConnectionType', + 'VirtualNetworkGatewaySkuName', + 'VirtualNetworkGatewaySkuTier', + 'VirtualNetworkGatewayType', + 'VirtualNetworkPeeringLevel', + 'VirtualNetworkPeeringState', + 'VirtualNetworkPrivateEndpointNetworkPolicies', + 'VirtualNetworkPrivateLinkServiceNetworkPolicies', + 'VirtualWanSecurityProviderType', + 'VpnAuthenticationType', + 'VpnClientProtocol', + 'VpnConnectionStatus', + 'VpnGatewayGeneration', + 'VpnGatewayTunnelingProtocol', + 'VpnLinkConnectionMode', + 'VpnNatRuleMode', + 'VpnNatRuleType', + 'VpnPolicyMemberAttributeType', + 'VpnType', + 'WebApplicationFirewallAction', + 'WebApplicationFirewallEnabledState', + 'WebApplicationFirewallMatchVariable', + 'WebApplicationFirewallMode', + 'WebApplicationFirewallOperator', + 'WebApplicationFirewallPolicyResourceState', + 'WebApplicationFirewallRuleType', + 'WebApplicationFirewallTransform', +] diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/_models_py3.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/_models_py3.py new file mode 100644 index 00000000000..7847ddd9a34 --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/_models_py3.py @@ -0,0 +1,34275 @@ +# 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 datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._network_management_client_enums import * + + +class AadAuthenticationParameters(msrest.serialization.Model): + """AAD Vpn authentication type related parameters. + + :ivar aad_tenant: AAD Vpn authentication parameter AAD tenant. + :vartype aad_tenant: str + :ivar aad_audience: AAD Vpn authentication parameter AAD audience. + :vartype aad_audience: str + :ivar aad_issuer: AAD Vpn authentication parameter AAD issuer. + :vartype aad_issuer: str + """ + + _attribute_map = { + 'aad_tenant': {'key': 'aadTenant', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + 'aad_issuer': {'key': 'aadIssuer', 'type': 'str'}, + } + + def __init__( + self, + *, + aad_tenant: Optional[str] = None, + aad_audience: Optional[str] = None, + aad_issuer: Optional[str] = None, + **kwargs + ): + """ + :keyword aad_tenant: AAD Vpn authentication parameter AAD tenant. + :paramtype aad_tenant: str + :keyword aad_audience: AAD Vpn authentication parameter AAD audience. + :paramtype aad_audience: str + :keyword aad_issuer: AAD Vpn authentication parameter AAD issuer. + :paramtype aad_issuer: str + """ + super(AadAuthenticationParameters, self).__init__(**kwargs) + self.aad_tenant = aad_tenant + self.aad_audience = aad_audience + self.aad_issuer = aad_issuer + + +class AddressSpace(msrest.serialization.Model): + """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. + + :ivar address_prefixes: A list of address blocks reserved for this virtual network in CIDR + notation. + :vartype address_prefixes: list[str] + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + } + + def __init__( + self, + *, + address_prefixes: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword address_prefixes: A list of address blocks reserved for this virtual network in CIDR + notation. + :paramtype address_prefixes: list[str] + """ + super(AddressSpace, self).__init__(**kwargs) + self.address_prefixes = address_prefixes + + +class Resource(msrest.serialization.Model): + """Common resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'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}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(Resource, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ApplicationGateway(Resource): + """Application gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar zones: A list of availability zones denoting where the resource needs to come from. + :vartype zones: list[str] + :ivar identity: The identity of the application gateway, if configured. + :vartype identity: ~azure.mgmt.network.v2021_08_01.models.ManagedServiceIdentity + :ivar sku: SKU of the application gateway resource. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySku + :ivar ssl_policy: SSL policy of the application gateway resource. + :vartype ssl_policy: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicy + :ivar operational_state: Operational state of the application gateway resource. Possible values + include: "Stopped", "Starting", "Running", "Stopping". + :vartype operational_state: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayOperationalState + :ivar gateway_ip_configurations: Subnets of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :vartype gateway_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayIPConfiguration] + :ivar authentication_certificates: Authentication certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :vartype authentication_certificates: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAuthenticationCertificate] + :ivar trusted_root_certificates: Trusted Root certificates of the application gateway resource. + For default limits, see `Application Gateway limits + `_. + :vartype trusted_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayTrustedRootCertificate] + :ivar trusted_client_certificates: Trusted client certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :vartype trusted_client_certificates: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayTrustedClientCertificate] + :ivar ssl_certificates: SSL certificates of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :vartype ssl_certificates: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslCertificate] + :ivar frontend_ip_configurations: Frontend IP addresses of the application gateway resource. + For default limits, see `Application Gateway limits + `_. + :vartype frontend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFrontendIPConfiguration] + :ivar frontend_ports: Frontend ports of the application gateway resource. For default limits, + see `Application Gateway limits + `_. + :vartype frontend_ports: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFrontendPort] + :ivar probes: Probes of the application gateway resource. + :vartype probes: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProbe] + :ivar backend_address_pools: Backend address pool of the application gateway resource. For + default limits, see `Application Gateway limits + `_. + :vartype backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddressPool] + :ivar backend_http_settings_collection: Backend http settings of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :vartype backend_http_settings_collection: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHttpSettings] + :ivar backend_settings_collection: Backend settings of the application gateway resource. For + default limits, see `Application Gateway limits + `_. + :vartype backend_settings_collection: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendSettings] + :ivar http_listeners: Http listeners of the application gateway resource. For default limits, + see `Application Gateway limits + `_. + :vartype http_listeners: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayHttpListener] + :ivar listeners: Listeners of the application gateway resource. For default limits, see + `Application Gateway limits + `_. + :vartype listeners: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayListener] + :ivar ssl_profiles: SSL profiles of the application gateway resource. For default limits, see + `Application Gateway limits + `_. + :vartype ssl_profiles: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProfile] + :ivar url_path_maps: URL path map of the application gateway resource. For default limits, see + `Application Gateway limits + `_. + :vartype url_path_maps: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayUrlPathMap] + :ivar request_routing_rules: Request routing rules of the application gateway resource. + :vartype request_routing_rules: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRequestRoutingRule] + :ivar routing_rules: Routing rules of the application gateway resource. + :vartype routing_rules: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRoutingRule] + :ivar rewrite_rule_sets: Rewrite rules for the application gateway resource. + :vartype rewrite_rule_sets: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRewriteRuleSet] + :ivar redirect_configurations: Redirect configurations of the application gateway resource. For + default limits, see `Application Gateway limits + `_. + :vartype redirect_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRedirectConfiguration] + :ivar web_application_firewall_configuration: Web application firewall configuration. + :vartype web_application_firewall_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayWebApplicationFirewallConfiguration + :ivar firewall_policy: Reference to the FirewallPolicy resource. + :vartype firewall_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar enable_http2: Whether HTTP2 is enabled on the application gateway resource. + :vartype enable_http2: bool + :ivar enable_fips: Whether FIPS is enabled on the application gateway resource. + :vartype enable_fips: bool + :ivar autoscale_configuration: Autoscale Configuration. + :vartype autoscale_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAutoscaleConfiguration + :ivar private_link_configurations: PrivateLink configurations on application gateway. + :vartype private_link_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateLinkConfiguration] + :ivar private_endpoint_connections: Private Endpoint connections on application gateway. + :vartype private_endpoint_connections: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection] + :ivar resource_guid: The resource GUID property of the application gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the application gateway resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar custom_error_configurations: Custom error configurations of the application gateway + resource. + :vartype custom_error_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayCustomError] + :ivar force_firewall_policy_association: If true, associates a firewall policy with an + application gateway regardless whether the policy differs from the WAF Config. + :vartype force_firewall_policy_association: bool + :ivar load_distribution_policies: Load distribution policies of the application gateway + resource. + :vartype load_distribution_policies: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayLoadDistributionPolicy] + :ivar global_configuration: Global Configuration. + :vartype global_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayGlobalConfiguration + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'operational_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, + 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, + 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, + 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, + 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[ApplicationGatewayTrustedRootCertificate]'}, + 'trusted_client_certificates': {'key': 'properties.trustedClientCertificates', 'type': '[ApplicationGatewayTrustedClientCertificate]'}, + 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, + 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, + 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, + 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, + 'backend_settings_collection': {'key': 'properties.backendSettingsCollection', 'type': '[ApplicationGatewayBackendSettings]'}, + 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, + 'listeners': {'key': 'properties.listeners', 'type': '[ApplicationGatewayListener]'}, + 'ssl_profiles': {'key': 'properties.sslProfiles', 'type': '[ApplicationGatewaySslProfile]'}, + 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, + 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, + 'routing_rules': {'key': 'properties.routingRules', 'type': '[ApplicationGatewayRoutingRule]'}, + 'rewrite_rule_sets': {'key': 'properties.rewriteRuleSets', 'type': '[ApplicationGatewayRewriteRuleSet]'}, + 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, + 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'enable_http2': {'key': 'properties.enableHttp2', 'type': 'bool'}, + 'enable_fips': {'key': 'properties.enableFips', 'type': 'bool'}, + 'autoscale_configuration': {'key': 'properties.autoscaleConfiguration', 'type': 'ApplicationGatewayAutoscaleConfiguration'}, + 'private_link_configurations': {'key': 'properties.privateLinkConfigurations', 'type': '[ApplicationGatewayPrivateLinkConfiguration]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ApplicationGatewayPrivateEndpointConnection]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'custom_error_configurations': {'key': 'properties.customErrorConfigurations', 'type': '[ApplicationGatewayCustomError]'}, + 'force_firewall_policy_association': {'key': 'properties.forceFirewallPolicyAssociation', 'type': 'bool'}, + 'load_distribution_policies': {'key': 'properties.loadDistributionPolicies', 'type': '[ApplicationGatewayLoadDistributionPolicy]'}, + 'global_configuration': {'key': 'properties.globalConfiguration', 'type': 'ApplicationGatewayGlobalConfiguration'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + zones: Optional[List[str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + sku: Optional["ApplicationGatewaySku"] = None, + ssl_policy: Optional["ApplicationGatewaySslPolicy"] = None, + gateway_ip_configurations: Optional[List["ApplicationGatewayIPConfiguration"]] = None, + authentication_certificates: Optional[List["ApplicationGatewayAuthenticationCertificate"]] = None, + trusted_root_certificates: Optional[List["ApplicationGatewayTrustedRootCertificate"]] = None, + trusted_client_certificates: Optional[List["ApplicationGatewayTrustedClientCertificate"]] = None, + ssl_certificates: Optional[List["ApplicationGatewaySslCertificate"]] = None, + frontend_ip_configurations: Optional[List["ApplicationGatewayFrontendIPConfiguration"]] = None, + frontend_ports: Optional[List["ApplicationGatewayFrontendPort"]] = None, + probes: Optional[List["ApplicationGatewayProbe"]] = None, + backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, + backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHttpSettings"]] = None, + backend_settings_collection: Optional[List["ApplicationGatewayBackendSettings"]] = None, + http_listeners: Optional[List["ApplicationGatewayHttpListener"]] = None, + listeners: Optional[List["ApplicationGatewayListener"]] = None, + ssl_profiles: Optional[List["ApplicationGatewaySslProfile"]] = None, + url_path_maps: Optional[List["ApplicationGatewayUrlPathMap"]] = None, + request_routing_rules: Optional[List["ApplicationGatewayRequestRoutingRule"]] = None, + routing_rules: Optional[List["ApplicationGatewayRoutingRule"]] = None, + rewrite_rule_sets: Optional[List["ApplicationGatewayRewriteRuleSet"]] = None, + redirect_configurations: Optional[List["ApplicationGatewayRedirectConfiguration"]] = None, + web_application_firewall_configuration: Optional["ApplicationGatewayWebApplicationFirewallConfiguration"] = None, + firewall_policy: Optional["SubResource"] = None, + enable_http2: Optional[bool] = None, + enable_fips: Optional[bool] = None, + autoscale_configuration: Optional["ApplicationGatewayAutoscaleConfiguration"] = None, + private_link_configurations: Optional[List["ApplicationGatewayPrivateLinkConfiguration"]] = None, + custom_error_configurations: Optional[List["ApplicationGatewayCustomError"]] = None, + force_firewall_policy_association: Optional[bool] = None, + load_distribution_policies: Optional[List["ApplicationGatewayLoadDistributionPolicy"]] = None, + global_configuration: Optional["ApplicationGatewayGlobalConfiguration"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword zones: A list of availability zones denoting where the resource needs to come from. + :paramtype zones: list[str] + :keyword identity: The identity of the application gateway, if configured. + :paramtype identity: ~azure.mgmt.network.v2021_08_01.models.ManagedServiceIdentity + :keyword sku: SKU of the application gateway resource. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySku + :keyword ssl_policy: SSL policy of the application gateway resource. + :paramtype ssl_policy: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicy + :keyword gateway_ip_configurations: Subnets of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :paramtype gateway_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayIPConfiguration] + :keyword authentication_certificates: Authentication certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :paramtype authentication_certificates: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAuthenticationCertificate] + :keyword trusted_root_certificates: Trusted Root certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :paramtype trusted_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayTrustedRootCertificate] + :keyword trusted_client_certificates: Trusted client certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :paramtype trusted_client_certificates: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayTrustedClientCertificate] + :keyword ssl_certificates: SSL certificates of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :paramtype ssl_certificates: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslCertificate] + :keyword frontend_ip_configurations: Frontend IP addresses of the application gateway resource. + For default limits, see `Application Gateway limits + `_. + :paramtype frontend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFrontendIPConfiguration] + :keyword frontend_ports: Frontend ports of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :paramtype frontend_ports: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFrontendPort] + :keyword probes: Probes of the application gateway resource. + :paramtype probes: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProbe] + :keyword backend_address_pools: Backend address pool of the application gateway resource. For + default limits, see `Application Gateway limits + `_. + :paramtype backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddressPool] + :keyword backend_http_settings_collection: Backend http settings of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :paramtype backend_http_settings_collection: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHttpSettings] + :keyword backend_settings_collection: Backend settings of the application gateway resource. For + default limits, see `Application Gateway limits + `_. + :paramtype backend_settings_collection: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendSettings] + :keyword http_listeners: Http listeners of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :paramtype http_listeners: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayHttpListener] + :keyword listeners: Listeners of the application gateway resource. For default limits, see + `Application Gateway limits + `_. + :paramtype listeners: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayListener] + :keyword ssl_profiles: SSL profiles of the application gateway resource. For default limits, + see `Application Gateway limits + `_. + :paramtype ssl_profiles: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProfile] + :keyword url_path_maps: URL path map of the application gateway resource. For default limits, + see `Application Gateway limits + `_. + :paramtype url_path_maps: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayUrlPathMap] + :keyword request_routing_rules: Request routing rules of the application gateway resource. + :paramtype request_routing_rules: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRequestRoutingRule] + :keyword routing_rules: Routing rules of the application gateway resource. + :paramtype routing_rules: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRoutingRule] + :keyword rewrite_rule_sets: Rewrite rules for the application gateway resource. + :paramtype rewrite_rule_sets: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRewriteRuleSet] + :keyword redirect_configurations: Redirect configurations of the application gateway resource. + For default limits, see `Application Gateway limits + `_. + :paramtype redirect_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRedirectConfiguration] + :keyword web_application_firewall_configuration: Web application firewall configuration. + :paramtype web_application_firewall_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayWebApplicationFirewallConfiguration + :keyword firewall_policy: Reference to the FirewallPolicy resource. + :paramtype firewall_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword enable_http2: Whether HTTP2 is enabled on the application gateway resource. + :paramtype enable_http2: bool + :keyword enable_fips: Whether FIPS is enabled on the application gateway resource. + :paramtype enable_fips: bool + :keyword autoscale_configuration: Autoscale Configuration. + :paramtype autoscale_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAutoscaleConfiguration + :keyword private_link_configurations: PrivateLink configurations on application gateway. + :paramtype private_link_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateLinkConfiguration] + :keyword custom_error_configurations: Custom error configurations of the application gateway + resource. + :paramtype custom_error_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayCustomError] + :keyword force_firewall_policy_association: If true, associates a firewall policy with an + application gateway regardless whether the policy differs from the WAF Config. + :paramtype force_firewall_policy_association: bool + :keyword load_distribution_policies: Load distribution policies of the application gateway + resource. + :paramtype load_distribution_policies: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayLoadDistributionPolicy] + :keyword global_configuration: Global Configuration. + :paramtype global_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayGlobalConfiguration + """ + super(ApplicationGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.zones = zones + self.identity = identity + self.sku = sku + self.ssl_policy = ssl_policy + self.operational_state = None + self.gateway_ip_configurations = gateway_ip_configurations + self.authentication_certificates = authentication_certificates + self.trusted_root_certificates = trusted_root_certificates + self.trusted_client_certificates = trusted_client_certificates + self.ssl_certificates = ssl_certificates + self.frontend_ip_configurations = frontend_ip_configurations + self.frontend_ports = frontend_ports + self.probes = probes + self.backend_address_pools = backend_address_pools + self.backend_http_settings_collection = backend_http_settings_collection + self.backend_settings_collection = backend_settings_collection + self.http_listeners = http_listeners + self.listeners = listeners + self.ssl_profiles = ssl_profiles + self.url_path_maps = url_path_maps + self.request_routing_rules = request_routing_rules + self.routing_rules = routing_rules + self.rewrite_rule_sets = rewrite_rule_sets + self.redirect_configurations = redirect_configurations + self.web_application_firewall_configuration = web_application_firewall_configuration + self.firewall_policy = firewall_policy + self.enable_http2 = enable_http2 + self.enable_fips = enable_fips + self.autoscale_configuration = autoscale_configuration + self.private_link_configurations = private_link_configurations + self.private_endpoint_connections = None + self.resource_guid = None + self.provisioning_state = None + self.custom_error_configurations = custom_error_configurations + self.force_firewall_policy_association = force_firewall_policy_association + self.load_distribution_policies = load_distribution_policies + self.global_configuration = global_configuration + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + :ivar id: Resource ID. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + """ + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ApplicationGatewayAuthenticationCertificate(SubResource): + """Authentication certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the authentication certificate that is unique within an Application + Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar data: Certificate public data. + :vartype data: str + :ivar provisioning_state: The provisioning state of the authentication certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + data: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the authentication certificate that is unique within an Application + Gateway. + :paramtype name: str + :keyword data: Certificate public data. + :paramtype data: str + """ + super(ApplicationGatewayAuthenticationCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.data = data + self.provisioning_state = None + + +class ApplicationGatewayAutoscaleConfiguration(msrest.serialization.Model): + """Application Gateway autoscale configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar min_capacity: Required. Lower bound on number of Application Gateway capacity. + :vartype min_capacity: int + :ivar max_capacity: Upper bound on number of Application Gateway capacity. + :vartype max_capacity: int + """ + + _validation = { + 'min_capacity': {'required': True, 'minimum': 0}, + 'max_capacity': {'minimum': 2}, + } + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'int'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'int'}, + } + + def __init__( + self, + *, + min_capacity: int, + max_capacity: Optional[int] = None, + **kwargs + ): + """ + :keyword min_capacity: Required. Lower bound on number of Application Gateway capacity. + :paramtype min_capacity: int + :keyword max_capacity: Upper bound on number of Application Gateway capacity. + :paramtype max_capacity: int + """ + super(ApplicationGatewayAutoscaleConfiguration, self).__init__(**kwargs) + self.min_capacity = min_capacity + self.max_capacity = max_capacity + + +class ApplicationGatewayAvailableSslOptions(Resource): + """Response for ApplicationGatewayAvailableSslOptions API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar predefined_policies: List of available Ssl predefined policy. + :vartype predefined_policies: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar default_policy: Name of the Ssl predefined policy applied by default to application + gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", + "AppGwSslPolicy20170401S". + :vartype default_policy: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicyName + :ivar available_cipher_suites: List of available Ssl cipher suites. + :vartype available_cipher_suites: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslCipherSuite] + :ivar available_protocols: List of available Ssl protocols. + :vartype available_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProtocol] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'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}'}, + 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, + 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, + 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, + 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + predefined_policies: Optional[List["SubResource"]] = None, + default_policy: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, + available_cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, + available_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword predefined_policies: List of available Ssl predefined policy. + :paramtype predefined_policies: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword default_policy: Name of the Ssl predefined policy applied by default to application + gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", + "AppGwSslPolicy20170401S". + :paramtype default_policy: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicyName + :keyword available_cipher_suites: List of available Ssl cipher suites. + :paramtype available_cipher_suites: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslCipherSuite] + :keyword available_protocols: List of available Ssl protocols. + :paramtype available_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProtocol] + """ + super(ApplicationGatewayAvailableSslOptions, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.predefined_policies = predefined_policies + self.default_policy = default_policy + self.available_cipher_suites = available_cipher_suites + self.available_protocols = available_protocols + + +class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): + """Response for ApplicationGatewayAvailableSslOptions API service call. + + :ivar value: List of available Ssl predefined policy. + :vartype value: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPredefinedPolicy] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGatewaySslPredefinedPolicy"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of available Ssl predefined policy. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPredefinedPolicy] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): + """Response for ApplicationGatewayAvailableWafRuleSets API service call. + + :ivar value: The list of application gateway rule sets. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallRuleSet] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGatewayFirewallRuleSet"]] = None, + **kwargs + ): + """ + :keyword value: The list of application gateway rule sets. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallRuleSet] + """ + super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) + self.value = value + + +class ApplicationGatewayBackendAddress(msrest.serialization.Model): + """Backend address of an application gateway. + + :ivar fqdn: Fully qualified domain name (FQDN). + :vartype fqdn: str + :ivar ip_address: IP address. + :vartype ip_address: str + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + fqdn: Optional[str] = None, + ip_address: Optional[str] = None, + **kwargs + ): + """ + :keyword fqdn: Fully qualified domain name (FQDN). + :paramtype fqdn: str + :keyword ip_address: IP address. + :paramtype ip_address: str + """ + super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) + self.fqdn = fqdn + self.ip_address = ip_address + + +class ApplicationGatewayBackendAddressPool(SubResource): + """Backend Address Pool of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the backend address pool that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar backend_ip_configurations: Collection of references to IPs defined in network interfaces. + :vartype backend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration] + :ivar backend_addresses: Backend addresses. + :vartype backend_addresses: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddress] + :ivar provisioning_state: The provisioning state of the backend address pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configurations': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + backend_addresses: Optional[List["ApplicationGatewayBackendAddress"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the backend address pool that is unique within an Application Gateway. + :paramtype name: str + :keyword backend_addresses: Backend addresses. + :paramtype backend_addresses: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddress] + """ + super(ApplicationGatewayBackendAddressPool, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.backend_ip_configurations = None + self.backend_addresses = backend_addresses + self.provisioning_state = None + + +class ApplicationGatewayBackendHealth(msrest.serialization.Model): + """Response for ApplicationGatewayBackendHealth API service call. + + :ivar backend_address_pools: A list of ApplicationGatewayBackendHealthPool resources. + :vartype backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthPool] + """ + + _attribute_map = { + 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, + } + + def __init__( + self, + *, + backend_address_pools: Optional[List["ApplicationGatewayBackendHealthPool"]] = None, + **kwargs + ): + """ + :keyword backend_address_pools: A list of ApplicationGatewayBackendHealthPool resources. + :paramtype backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthPool] + """ + super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) + self.backend_address_pools = backend_address_pools + + +class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): + """Application gateway BackendHealthHttp settings. + + :ivar backend_http_settings: Reference to an ApplicationGatewayBackendHttpSettings resource. + :vartype backend_http_settings: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHttpSettings + :ivar servers: List of ApplicationGatewayBackendHealthServer resources. + :vartype servers: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthServer] + """ + + _attribute_map = { + 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, + 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, + } + + def __init__( + self, + *, + backend_http_settings: Optional["ApplicationGatewayBackendHttpSettings"] = None, + servers: Optional[List["ApplicationGatewayBackendHealthServer"]] = None, + **kwargs + ): + """ + :keyword backend_http_settings: Reference to an ApplicationGatewayBackendHttpSettings resource. + :paramtype backend_http_settings: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHttpSettings + :keyword servers: List of ApplicationGatewayBackendHealthServer resources. + :paramtype servers: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthServer] + """ + super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) + self.backend_http_settings = backend_http_settings + self.servers = servers + + +class ApplicationGatewayBackendHealthOnDemand(msrest.serialization.Model): + """Result of on demand test probe. + + :ivar backend_address_pool: Reference to an ApplicationGatewayBackendAddressPool resource. + :vartype backend_address_pool: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddressPool + :ivar backend_health_http_settings: Application gateway BackendHealthHttp settings. + :vartype backend_health_http_settings: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthHttpSettings + """ + + _attribute_map = { + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, + 'backend_health_http_settings': {'key': 'backendHealthHttpSettings', 'type': 'ApplicationGatewayBackendHealthHttpSettings'}, + } + + def __init__( + self, + *, + backend_address_pool: Optional["ApplicationGatewayBackendAddressPool"] = None, + backend_health_http_settings: Optional["ApplicationGatewayBackendHealthHttpSettings"] = None, + **kwargs + ): + """ + :keyword backend_address_pool: Reference to an ApplicationGatewayBackendAddressPool resource. + :paramtype backend_address_pool: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddressPool + :keyword backend_health_http_settings: Application gateway BackendHealthHttp settings. + :paramtype backend_health_http_settings: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthHttpSettings + """ + super(ApplicationGatewayBackendHealthOnDemand, self).__init__(**kwargs) + self.backend_address_pool = backend_address_pool + self.backend_health_http_settings = backend_health_http_settings + + +class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): + """Application gateway BackendHealth pool. + + :ivar backend_address_pool: Reference to an ApplicationGatewayBackendAddressPool resource. + :vartype backend_address_pool: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddressPool + :ivar backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings + resources. + :vartype backend_http_settings_collection: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthHttpSettings] + """ + + _attribute_map = { + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, + 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, + } + + def __init__( + self, + *, + backend_address_pool: Optional["ApplicationGatewayBackendAddressPool"] = None, + backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHealthHttpSettings"]] = None, + **kwargs + ): + """ + :keyword backend_address_pool: Reference to an ApplicationGatewayBackendAddressPool resource. + :paramtype backend_address_pool: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddressPool + :keyword backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings + resources. + :paramtype backend_http_settings_collection: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthHttpSettings] + """ + super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) + self.backend_address_pool = backend_address_pool + self.backend_http_settings_collection = backend_http_settings_collection + + +class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): + """Application gateway backendhealth http settings. + + :ivar address: IP address or FQDN of backend server. + :vartype address: str + :ivar ip_configuration: Reference to IP configuration of backend server. + :vartype ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :ivar health: Health of backend server. Possible values include: "Unknown", "Up", "Down", + "Partial", "Draining". + :vartype health: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthServerHealth + :ivar health_probe_log: Health Probe Log. + :vartype health_probe_log: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'health': {'key': 'health', 'type': 'str'}, + 'health_probe_log': {'key': 'healthProbeLog', 'type': 'str'}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + ip_configuration: Optional["NetworkInterfaceIPConfiguration"] = None, + health: Optional[Union[str, "ApplicationGatewayBackendHealthServerHealth"]] = None, + health_probe_log: Optional[str] = None, + **kwargs + ): + """ + :keyword address: IP address or FQDN of backend server. + :paramtype address: str + :keyword ip_configuration: Reference to IP configuration of backend server. + :paramtype ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :keyword health: Health of backend server. Possible values include: "Unknown", "Up", "Down", + "Partial", "Draining". + :paramtype health: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthServerHealth + :keyword health_probe_log: Health Probe Log. + :paramtype health_probe_log: str + """ + super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) + self.address = address + self.ip_configuration = ip_configuration + self.health = health + self.health_probe_log = health_probe_log + + +class ApplicationGatewayBackendHttpSettings(SubResource): + """Backend address pool settings of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the backend http settings that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar port: The destination port on the backend. + :vartype port: int + :ivar protocol: The protocol used to communicate with the backend. Possible values include: + "Http", "Https", "Tcp", "Tls". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :ivar cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", + "Disabled". + :vartype cookie_based_affinity: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayCookieBasedAffinity + :ivar request_timeout: Request timeout in seconds. Application Gateway will fail the request if + response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 + seconds. + :vartype request_timeout: int + :ivar probe: Probe resource of an application gateway. + :vartype probe: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar authentication_certificates: Array of references to application gateway authentication + certificates. + :vartype authentication_certificates: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar trusted_root_certificates: Array of references to application gateway trusted root + certificates. + :vartype trusted_root_certificates: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar connection_draining: Connection draining of the backend http settings resource. + :vartype connection_draining: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayConnectionDraining + :ivar host_name: Host header to be sent to the backend servers. + :vartype host_name: str + :ivar pick_host_name_from_backend_address: Whether to pick host header should be picked from + the host name of the backend server. Default value is false. + :vartype pick_host_name_from_backend_address: bool + :ivar affinity_cookie_name: Cookie name to use for the affinity cookie. + :vartype affinity_cookie_name: str + :ivar probe_enabled: Whether the probe is enabled. Default value is false. + :vartype probe_enabled: bool + :ivar path: Path which should be used as a prefix for all HTTP requests. Null means no path + will be prefixed. Default value is null. + :vartype path: str + :ivar provisioning_state: The provisioning state of the backend HTTP settings resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, + 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, + 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, + 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[SubResource]'}, + 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, + 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, + 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + cookie_based_affinity: Optional[Union[str, "ApplicationGatewayCookieBasedAffinity"]] = None, + request_timeout: Optional[int] = None, + probe: Optional["SubResource"] = None, + authentication_certificates: Optional[List["SubResource"]] = None, + trusted_root_certificates: Optional[List["SubResource"]] = None, + connection_draining: Optional["ApplicationGatewayConnectionDraining"] = None, + host_name: Optional[str] = None, + pick_host_name_from_backend_address: Optional[bool] = None, + affinity_cookie_name: Optional[str] = None, + probe_enabled: Optional[bool] = None, + path: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the backend http settings that is unique within an Application Gateway. + :paramtype name: str + :keyword port: The destination port on the backend. + :paramtype port: int + :keyword protocol: The protocol used to communicate with the backend. Possible values include: + "Http", "Https", "Tcp", "Tls". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :keyword cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", + "Disabled". + :paramtype cookie_based_affinity: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayCookieBasedAffinity + :keyword request_timeout: Request timeout in seconds. Application Gateway will fail the request + if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 + seconds. + :paramtype request_timeout: int + :keyword probe: Probe resource of an application gateway. + :paramtype probe: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword authentication_certificates: Array of references to application gateway authentication + certificates. + :paramtype authentication_certificates: + list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword trusted_root_certificates: Array of references to application gateway trusted root + certificates. + :paramtype trusted_root_certificates: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword connection_draining: Connection draining of the backend http settings resource. + :paramtype connection_draining: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayConnectionDraining + :keyword host_name: Host header to be sent to the backend servers. + :paramtype host_name: str + :keyword pick_host_name_from_backend_address: Whether to pick host header should be picked from + the host name of the backend server. Default value is false. + :paramtype pick_host_name_from_backend_address: bool + :keyword affinity_cookie_name: Cookie name to use for the affinity cookie. + :paramtype affinity_cookie_name: str + :keyword probe_enabled: Whether the probe is enabled. Default value is false. + :paramtype probe_enabled: bool + :keyword path: Path which should be used as a prefix for all HTTP requests. Null means no path + will be prefixed. Default value is null. + :paramtype path: str + """ + super(ApplicationGatewayBackendHttpSettings, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.port = port + self.protocol = protocol + self.cookie_based_affinity = cookie_based_affinity + self.request_timeout = request_timeout + self.probe = probe + self.authentication_certificates = authentication_certificates + self.trusted_root_certificates = trusted_root_certificates + self.connection_draining = connection_draining + self.host_name = host_name + self.pick_host_name_from_backend_address = pick_host_name_from_backend_address + self.affinity_cookie_name = affinity_cookie_name + self.probe_enabled = probe_enabled + self.path = path + self.provisioning_state = None + + +class ApplicationGatewayBackendSettings(SubResource): + """Backend address pool settings of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the backend settings that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar port: The destination port on the backend. + :vartype port: int + :ivar protocol: The protocol used to communicate with the backend. Possible values include: + "Http", "Https", "Tcp", "Tls". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :ivar timeout: Connection timeout in seconds. Application Gateway will fail the request if + response is not received within ConnectionTimeout. Acceptable values are from 1 second to 86400 + seconds. + :vartype timeout: int + :ivar probe: Probe resource of an application gateway. + :vartype probe: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar trusted_root_certificates: Array of references to application gateway trusted root + certificates. + :vartype trusted_root_certificates: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar host_name: Server name indication to be sent to the backend servers for Tls protocol. + :vartype host_name: str + :ivar pick_host_name_from_backend_address: Whether to pick server name indication from the host + name of the backend server for Tls protocol. Default value is false. + :vartype pick_host_name_from_backend_address: bool + :ivar provisioning_state: The provisioning state of the backend HTTP settings resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'timeout': {'key': 'properties.timeout', 'type': 'int'}, + 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[SubResource]'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + timeout: Optional[int] = None, + probe: Optional["SubResource"] = None, + trusted_root_certificates: Optional[List["SubResource"]] = None, + host_name: Optional[str] = None, + pick_host_name_from_backend_address: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the backend settings that is unique within an Application Gateway. + :paramtype name: str + :keyword port: The destination port on the backend. + :paramtype port: int + :keyword protocol: The protocol used to communicate with the backend. Possible values include: + "Http", "Https", "Tcp", "Tls". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :keyword timeout: Connection timeout in seconds. Application Gateway will fail the request if + response is not received within ConnectionTimeout. Acceptable values are from 1 second to 86400 + seconds. + :paramtype timeout: int + :keyword probe: Probe resource of an application gateway. + :paramtype probe: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword trusted_root_certificates: Array of references to application gateway trusted root + certificates. + :paramtype trusted_root_certificates: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword host_name: Server name indication to be sent to the backend servers for Tls protocol. + :paramtype host_name: str + :keyword pick_host_name_from_backend_address: Whether to pick server name indication from the + host name of the backend server for Tls protocol. Default value is false. + :paramtype pick_host_name_from_backend_address: bool + """ + super(ApplicationGatewayBackendSettings, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.port = port + self.protocol = protocol + self.timeout = timeout + self.probe = probe + self.trusted_root_certificates = trusted_root_certificates + self.host_name = host_name + self.pick_host_name_from_backend_address = pick_host_name_from_backend_address + self.provisioning_state = None + + +class ApplicationGatewayClientAuthConfiguration(msrest.serialization.Model): + """Application gateway client authentication configuration. + + :ivar verify_client_cert_issuer_dn: Verify client certificate issuer name on the application + gateway. + :vartype verify_client_cert_issuer_dn: bool + """ + + _attribute_map = { + 'verify_client_cert_issuer_dn': {'key': 'verifyClientCertIssuerDN', 'type': 'bool'}, + } + + def __init__( + self, + *, + verify_client_cert_issuer_dn: Optional[bool] = None, + **kwargs + ): + """ + :keyword verify_client_cert_issuer_dn: Verify client certificate issuer name on the application + gateway. + :paramtype verify_client_cert_issuer_dn: bool + """ + super(ApplicationGatewayClientAuthConfiguration, self).__init__(**kwargs) + self.verify_client_cert_issuer_dn = verify_client_cert_issuer_dn + + +class ApplicationGatewayConnectionDraining(msrest.serialization.Model): + """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Required. Whether connection draining is enabled or not. + :vartype enabled: bool + :ivar drain_timeout_in_sec: Required. The number of seconds connection draining is active. + Acceptable values are from 1 second to 3600 seconds. + :vartype drain_timeout_in_sec: int + """ + + _validation = { + 'enabled': {'required': True}, + 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, + } + + def __init__( + self, + *, + enabled: bool, + drain_timeout_in_sec: int, + **kwargs + ): + """ + :keyword enabled: Required. Whether connection draining is enabled or not. + :paramtype enabled: bool + :keyword drain_timeout_in_sec: Required. The number of seconds connection draining is active. + Acceptable values are from 1 second to 3600 seconds. + :paramtype drain_timeout_in_sec: int + """ + super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) + self.enabled = enabled + self.drain_timeout_in_sec = drain_timeout_in_sec + + +class ApplicationGatewayCustomError(msrest.serialization.Model): + """Customer error of an application gateway. + + :ivar status_code: Status code of the application gateway customer error. Possible values + include: "HttpStatus403", "HttpStatus502". + :vartype status_code: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayCustomErrorStatusCode + :ivar custom_error_page_url: Error page URL of the application gateway customer error. + :vartype custom_error_page_url: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'custom_error_page_url': {'key': 'customErrorPageUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + status_code: Optional[Union[str, "ApplicationGatewayCustomErrorStatusCode"]] = None, + custom_error_page_url: Optional[str] = None, + **kwargs + ): + """ + :keyword status_code: Status code of the application gateway customer error. Possible values + include: "HttpStatus403", "HttpStatus502". + :paramtype status_code: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayCustomErrorStatusCode + :keyword custom_error_page_url: Error page URL of the application gateway customer error. + :paramtype custom_error_page_url: str + """ + super(ApplicationGatewayCustomError, self).__init__(**kwargs) + self.status_code = status_code + self.custom_error_page_url = custom_error_page_url + + +class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): + """Allows to disable rules within a rule group or an entire rule group. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_group_name: Required. The name of the rule group that will be disabled. + :vartype rule_group_name: str + :ivar rules: The list of rules that will be disabled. If null, all rules of the rule group will + be disabled. + :vartype rules: list[int] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[int]'}, + } + + def __init__( + self, + *, + rule_group_name: str, + rules: Optional[List[int]] = None, + **kwargs + ): + """ + :keyword rule_group_name: Required. The name of the rule group that will be disabled. + :paramtype rule_group_name: str + :keyword rules: The list of rules that will be disabled. If null, all rules of the rule group + will be disabled. + :paramtype rules: list[int] + """ + super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.rules = rules + + +class ApplicationGatewayFirewallExclusion(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :ivar match_variable: Required. The variable to be excluded. + :vartype match_variable: str + :ivar selector_match_operator: Required. When matchVariable is a collection, operate on the + selector to specify which elements in the collection this exclusion applies to. + :vartype selector_match_operator: str + :ivar selector: Required. When matchVariable is a collection, operator used to specify which + elements in the collection this exclusion applies to. + :vartype selector: str + """ + + _validation = { + 'match_variable': {'required': True}, + 'selector_match_operator': {'required': True}, + 'selector': {'required': True}, + } + + _attribute_map = { + 'match_variable': {'key': 'matchVariable', 'type': 'str'}, + 'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + } + + def __init__( + self, + *, + match_variable: str, + selector_match_operator: str, + selector: str, + **kwargs + ): + """ + :keyword match_variable: Required. The variable to be excluded. + :paramtype match_variable: str + :keyword selector_match_operator: Required. When matchVariable is a collection, operate on the + selector to specify which elements in the collection this exclusion applies to. + :paramtype selector_match_operator: str + :keyword selector: Required. When matchVariable is a collection, operator used to specify which + elements in the collection this exclusion applies to. + :paramtype selector: str + """ + super(ApplicationGatewayFirewallExclusion, self).__init__(**kwargs) + self.match_variable = match_variable + self.selector_match_operator = selector_match_operator + self.selector = selector + + +class ApplicationGatewayFirewallRule(msrest.serialization.Model): + """A web application firewall rule. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_id: Required. The identifier of the web application firewall rule. + :vartype rule_id: int + :ivar description: The description of the web application firewall rule. + :vartype description: str + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + rule_id: int, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword rule_id: Required. The identifier of the web application firewall rule. + :paramtype rule_id: int + :keyword description: The description of the web application firewall rule. + :paramtype description: str + """ + super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) + self.rule_id = rule_id + self.description = description + + +class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): + """A web application firewall rule group. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_group_name: Required. The name of the web application firewall rule group. + :vartype rule_group_name: str + :ivar description: The description of the web application firewall rule group. + :vartype description: str + :ivar rules: Required. The rules of the web application firewall rule group. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallRule] + """ + + _validation = { + 'rule_group_name': {'required': True}, + 'rules': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, + } + + def __init__( + self, + *, + rule_group_name: str, + rules: List["ApplicationGatewayFirewallRule"], + description: Optional[str] = None, + **kwargs + ): + """ + :keyword rule_group_name: Required. The name of the web application firewall rule group. + :paramtype rule_group_name: str + :keyword description: The description of the web application firewall rule group. + :paramtype description: str + :keyword rules: Required. The rules of the web application firewall rule group. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallRule] + """ + super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.description = description + self.rules = rules + + +class ApplicationGatewayFirewallRuleSet(Resource): + """A web application firewall rule set. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the web application firewall rule set. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar rule_set_type: The type of the web application firewall rule set. + :vartype rule_set_type: str + :ivar rule_set_version: The version of the web application firewall rule set type. + :vartype rule_set_version: str + :ivar rule_groups: The rule groups of the web application firewall rule set. + :vartype rule_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallRuleGroup] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + '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': '[ApplicationGatewayFirewallRuleGroup]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + rule_set_type: Optional[str] = None, + rule_set_version: Optional[str] = None, + rule_groups: Optional[List["ApplicationGatewayFirewallRuleGroup"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword rule_set_type: The type of the web application firewall rule set. + :paramtype rule_set_type: str + :keyword rule_set_version: The version of the web application firewall rule set type. + :paramtype rule_set_version: str + :keyword rule_groups: The rule groups of the web application firewall rule set. + :paramtype rule_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallRuleGroup] + """ + super(ApplicationGatewayFirewallRuleSet, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.rule_groups = rule_groups + + +class ApplicationGatewayFrontendIPConfiguration(SubResource): + """Frontend IP configuration of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the frontend IP configuration that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar private_ip_address: PrivateIPAddress of the network interface IP Configuration. + :vartype private_ip_address: str + :ivar private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar subnet: Reference to the subnet resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar public_ip_address: Reference to the PublicIP resource. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar private_link_configuration: Reference to the application gateway private link + configuration. + :vartype private_link_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the frontend IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'private_link_configuration': {'key': 'properties.privateLinkConfiguration', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["SubResource"] = None, + public_ip_address: Optional["SubResource"] = None, + private_link_configuration: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the frontend IP configuration that is unique within an Application + Gateway. + :paramtype name: str + :keyword private_ip_address: PrivateIPAddress of the network interface IP Configuration. + :paramtype private_ip_address: str + :keyword private_ip_allocation_method: The private IP address allocation method. Possible + values include: "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword subnet: Reference to the subnet resource. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword public_ip_address: Reference to the PublicIP resource. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword private_link_configuration: Reference to the application gateway private link + configuration. + :paramtype private_link_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(ApplicationGatewayFrontendIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.public_ip_address = public_ip_address + self.private_link_configuration = private_link_configuration + self.provisioning_state = None + + +class ApplicationGatewayFrontendPort(SubResource): + """Frontend port of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the frontend port that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar port: Frontend port. + :vartype port: int + :ivar provisioning_state: The provisioning state of the frontend port resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the frontend port that is unique within an Application Gateway. + :paramtype name: str + :keyword port: Frontend port. + :paramtype port: int + """ + super(ApplicationGatewayFrontendPort, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.port = port + self.provisioning_state = None + + +class ApplicationGatewayGlobalConfiguration(msrest.serialization.Model): + """Application Gateway global configuration. + + :ivar enable_request_buffering: Enable request buffering. + :vartype enable_request_buffering: bool + :ivar enable_response_buffering: Enable response buffering. + :vartype enable_response_buffering: bool + """ + + _attribute_map = { + 'enable_request_buffering': {'key': 'enableRequestBuffering', 'type': 'bool'}, + 'enable_response_buffering': {'key': 'enableResponseBuffering', 'type': 'bool'}, + } + + def __init__( + self, + *, + enable_request_buffering: Optional[bool] = None, + enable_response_buffering: Optional[bool] = None, + **kwargs + ): + """ + :keyword enable_request_buffering: Enable request buffering. + :paramtype enable_request_buffering: bool + :keyword enable_response_buffering: Enable response buffering. + :paramtype enable_response_buffering: bool + """ + super(ApplicationGatewayGlobalConfiguration, self).__init__(**kwargs) + self.enable_request_buffering = enable_request_buffering + self.enable_response_buffering = enable_response_buffering + + +class ApplicationGatewayHeaderConfiguration(msrest.serialization.Model): + """Header configuration of the Actions set in Application Gateway. + + :ivar header_name: Header name of the header configuration. + :vartype header_name: str + :ivar header_value: Header value of the header configuration. + :vartype header_value: str + """ + + _attribute_map = { + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'header_value': {'key': 'headerValue', 'type': 'str'}, + } + + def __init__( + self, + *, + header_name: Optional[str] = None, + header_value: Optional[str] = None, + **kwargs + ): + """ + :keyword header_name: Header name of the header configuration. + :paramtype header_name: str + :keyword header_value: Header value of the header configuration. + :paramtype header_value: str + """ + super(ApplicationGatewayHeaderConfiguration, self).__init__(**kwargs) + self.header_name = header_name + self.header_value = header_value + + +class ApplicationGatewayHttpListener(SubResource): + """Http listener of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the HTTP listener that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar frontend_ip_configuration: Frontend IP configuration resource of an application gateway. + :vartype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar frontend_port: Frontend port resource of an application gateway. + :vartype frontend_port: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar protocol: Protocol of the HTTP listener. Possible values include: "Http", "Https", "Tcp", + "Tls". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :ivar host_name: Host name of HTTP listener. + :vartype host_name: str + :ivar ssl_certificate: SSL certificate resource of an application gateway. + :vartype ssl_certificate: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar ssl_profile: SSL profile resource of the application gateway. + :vartype ssl_profile: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar require_server_name_indication: Applicable only if protocol is https. Enables SNI for + multi-hosting. + :vartype require_server_name_indication: bool + :ivar provisioning_state: The provisioning state of the HTTP listener resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar custom_error_configurations: Custom error configurations of the HTTP listener. + :vartype custom_error_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayCustomError] + :ivar firewall_policy: Reference to the FirewallPolicy resource. + :vartype firewall_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar host_names: List of Host names for HTTP Listener that allows special wildcard characters + as well. + :vartype host_names: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, + 'ssl_profile': {'key': 'properties.sslProfile', 'type': 'SubResource'}, + 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'custom_error_configurations': {'key': 'properties.customErrorConfigurations', 'type': '[ApplicationGatewayCustomError]'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + frontend_port: Optional["SubResource"] = None, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + host_name: Optional[str] = None, + ssl_certificate: Optional["SubResource"] = None, + ssl_profile: Optional["SubResource"] = None, + require_server_name_indication: Optional[bool] = None, + custom_error_configurations: Optional[List["ApplicationGatewayCustomError"]] = None, + firewall_policy: Optional["SubResource"] = None, + host_names: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the HTTP listener that is unique within an Application Gateway. + :paramtype name: str + :keyword frontend_ip_configuration: Frontend IP configuration resource of an application + gateway. + :paramtype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword frontend_port: Frontend port resource of an application gateway. + :paramtype frontend_port: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword protocol: Protocol of the HTTP listener. Possible values include: "Http", "Https", + "Tcp", "Tls". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :keyword host_name: Host name of HTTP listener. + :paramtype host_name: str + :keyword ssl_certificate: SSL certificate resource of an application gateway. + :paramtype ssl_certificate: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword ssl_profile: SSL profile resource of the application gateway. + :paramtype ssl_profile: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword require_server_name_indication: Applicable only if protocol is https. Enables SNI for + multi-hosting. + :paramtype require_server_name_indication: bool + :keyword custom_error_configurations: Custom error configurations of the HTTP listener. + :paramtype custom_error_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayCustomError] + :keyword firewall_policy: Reference to the FirewallPolicy resource. + :paramtype firewall_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword host_names: List of Host names for HTTP Listener that allows special wildcard + characters as well. + :paramtype host_names: list[str] + """ + super(ApplicationGatewayHttpListener, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.frontend_port = frontend_port + self.protocol = protocol + self.host_name = host_name + self.ssl_certificate = ssl_certificate + self.ssl_profile = ssl_profile + self.require_server_name_indication = require_server_name_indication + self.provisioning_state = None + self.custom_error_configurations = custom_error_configurations + self.firewall_policy = firewall_policy + self.host_names = host_names + + +class ApplicationGatewayIPConfiguration(SubResource): + """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the IP configuration that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar subnet: Reference to the subnet resource. A subnet from where application gateway gets + its private address. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the application gateway IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + subnet: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the IP configuration that is unique within an Application Gateway. + :paramtype name: str + :keyword subnet: Reference to the subnet resource. A subnet from where application gateway gets + its private address. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(ApplicationGatewayIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.subnet = subnet + self.provisioning_state = None + + +class ApplicationGatewayListener(SubResource): + """Listener of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the listener that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar frontend_ip_configuration: Frontend IP configuration resource of an application gateway. + :vartype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar frontend_port: Frontend port resource of an application gateway. + :vartype frontend_port: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar protocol: Protocol of the listener. Possible values include: "Http", "Https", "Tcp", + "Tls". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :ivar ssl_certificate: SSL certificate resource of an application gateway. + :vartype ssl_certificate: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar ssl_profile: SSL profile resource of the application gateway. + :vartype ssl_profile: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the listener resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, + 'ssl_profile': {'key': 'properties.sslProfile', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + frontend_port: Optional["SubResource"] = None, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + ssl_certificate: Optional["SubResource"] = None, + ssl_profile: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the listener that is unique within an Application Gateway. + :paramtype name: str + :keyword frontend_ip_configuration: Frontend IP configuration resource of an application + gateway. + :paramtype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword frontend_port: Frontend port resource of an application gateway. + :paramtype frontend_port: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword protocol: Protocol of the listener. Possible values include: "Http", "Https", "Tcp", + "Tls". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :keyword ssl_certificate: SSL certificate resource of an application gateway. + :paramtype ssl_certificate: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword ssl_profile: SSL profile resource of the application gateway. + :paramtype ssl_profile: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(ApplicationGatewayListener, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.frontend_port = frontend_port + self.protocol = protocol + self.ssl_certificate = ssl_certificate + self.ssl_profile = ssl_profile + self.provisioning_state = None + + +class ApplicationGatewayListResult(msrest.serialization.Model): + """Response for ListApplicationGateways API service call. + + :ivar value: List of an application gateways in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGateway] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGateway"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of an application gateways in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGateway] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(ApplicationGatewayListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ApplicationGatewayLoadDistributionPolicy(SubResource): + """Load Distribution Policy of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the load distribution policy that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar load_distribution_targets: Load Distribution Targets resource of an application gateway. + :vartype load_distribution_targets: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayLoadDistributionTarget] + :ivar load_distribution_algorithm: Load Distribution Targets resource of an application + gateway. Possible values include: "RoundRobin", "LeastConnections", "IpHash". + :vartype load_distribution_algorithm: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayLoadDistributionAlgorithm + :ivar provisioning_state: The provisioning state of the Load Distribution Policy resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'load_distribution_targets': {'key': 'properties.loadDistributionTargets', 'type': '[ApplicationGatewayLoadDistributionTarget]'}, + 'load_distribution_algorithm': {'key': 'properties.loadDistributionAlgorithm', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + load_distribution_targets: Optional[List["ApplicationGatewayLoadDistributionTarget"]] = None, + load_distribution_algorithm: Optional[Union[str, "ApplicationGatewayLoadDistributionAlgorithm"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the load distribution policy that is unique within an Application + Gateway. + :paramtype name: str + :keyword load_distribution_targets: Load Distribution Targets resource of an application + gateway. + :paramtype load_distribution_targets: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayLoadDistributionTarget] + :keyword load_distribution_algorithm: Load Distribution Targets resource of an application + gateway. Possible values include: "RoundRobin", "LeastConnections", "IpHash". + :paramtype load_distribution_algorithm: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayLoadDistributionAlgorithm + """ + super(ApplicationGatewayLoadDistributionPolicy, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.load_distribution_targets = load_distribution_targets + self.load_distribution_algorithm = load_distribution_algorithm + self.provisioning_state = None + + +class ApplicationGatewayLoadDistributionTarget(SubResource): + """Load Distribution Target of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the load distribution policy that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar weight_per_server: Weight per server. Range between 1 and 100. + :vartype weight_per_server: int + :ivar backend_address_pool: Backend address pool resource of the application gateway. + :vartype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'weight_per_server': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'weight_per_server': {'key': 'properties.weightPerServer', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + weight_per_server: Optional[int] = None, + backend_address_pool: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the load distribution policy that is unique within an Application + Gateway. + :paramtype name: str + :keyword weight_per_server: Weight per server. Range between 1 and 100. + :paramtype weight_per_server: int + :keyword backend_address_pool: Backend address pool resource of the application gateway. + :paramtype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(ApplicationGatewayLoadDistributionTarget, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.weight_per_server = weight_per_server + self.backend_address_pool = backend_address_pool + + +class ApplicationGatewayOnDemandProbe(msrest.serialization.Model): + """Details of on demand test probe request. + + :ivar protocol: The protocol used for the probe. Possible values include: "Http", "Https", + "Tcp", "Tls". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :ivar host: Host name to send the probe to. + :vartype host: str + :ivar path: Relative path of probe. Valid path starts from '/'. Probe is sent to + :code:``://:code:``::code:``:code:``. + :vartype path: str + :ivar timeout: The probe timeout in seconds. Probe marked as failed if valid response is not + received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + :vartype timeout: int + :ivar pick_host_name_from_backend_http_settings: Whether the host header should be picked from + the backend http settings. Default value is false. + :vartype pick_host_name_from_backend_http_settings: bool + :ivar match: Criterion for classifying a healthy probe response. + :vartype match: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProbeHealthResponseMatch + :ivar backend_address_pool: Reference to backend pool of application gateway to which probe + request will be sent. + :vartype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar backend_http_settings: Reference to backend http setting of application gateway to be + used for test probe. + :vartype backend_http_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'pick_host_name_from_backend_http_settings': {'key': 'pickHostNameFromBackendHttpSettings', 'type': 'bool'}, + 'match': {'key': 'match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + host: Optional[str] = None, + path: Optional[str] = None, + timeout: Optional[int] = None, + pick_host_name_from_backend_http_settings: Optional[bool] = None, + match: Optional["ApplicationGatewayProbeHealthResponseMatch"] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_http_settings: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword protocol: The protocol used for the probe. Possible values include: "Http", "Https", + "Tcp", "Tls". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :keyword host: Host name to send the probe to. + :paramtype host: str + :keyword path: Relative path of probe. Valid path starts from '/'. Probe is sent to + :code:``://:code:``::code:``:code:``. + :paramtype path: str + :keyword timeout: The probe timeout in seconds. Probe marked as failed if valid response is not + received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + :paramtype timeout: int + :keyword pick_host_name_from_backend_http_settings: Whether the host header should be picked + from the backend http settings. Default value is false. + :paramtype pick_host_name_from_backend_http_settings: bool + :keyword match: Criterion for classifying a healthy probe response. + :paramtype match: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProbeHealthResponseMatch + :keyword backend_address_pool: Reference to backend pool of application gateway to which probe + request will be sent. + :paramtype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword backend_http_settings: Reference to backend http setting of application gateway to be + used for test probe. + :paramtype backend_http_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(ApplicationGatewayOnDemandProbe, self).__init__(**kwargs) + self.protocol = protocol + self.host = host + self.path = path + self.timeout = timeout + self.pick_host_name_from_backend_http_settings = pick_host_name_from_backend_http_settings + self.match = match + self.backend_address_pool = backend_address_pool + self.backend_http_settings = backend_http_settings + + +class ApplicationGatewayPathRule(SubResource): + """Path rule of URL path map of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the path rule that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar paths: Path rules of URL path map. + :vartype paths: list[str] + :ivar backend_address_pool: Backend address pool resource of URL path map path rule. + :vartype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar backend_http_settings: Backend http settings resource of URL path map path rule. + :vartype backend_http_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar redirect_configuration: Redirect configuration resource of URL path map path rule. + :vartype redirect_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar rewrite_rule_set: Rewrite rule set resource of URL path map path rule. + :vartype rewrite_rule_set: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar load_distribution_policy: Load Distribution Policy resource of URL path map path rule. + :vartype load_distribution_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the path rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar firewall_policy: Reference to the FirewallPolicy resource. + :vartype firewall_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'paths': {'key': 'properties.paths', 'type': '[str]'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, + 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, + 'rewrite_rule_set': {'key': 'properties.rewriteRuleSet', 'type': 'SubResource'}, + 'load_distribution_policy': {'key': 'properties.loadDistributionPolicy', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + paths: Optional[List[str]] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_http_settings: Optional["SubResource"] = None, + redirect_configuration: Optional["SubResource"] = None, + rewrite_rule_set: Optional["SubResource"] = None, + load_distribution_policy: Optional["SubResource"] = None, + firewall_policy: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the path rule that is unique within an Application Gateway. + :paramtype name: str + :keyword paths: Path rules of URL path map. + :paramtype paths: list[str] + :keyword backend_address_pool: Backend address pool resource of URL path map path rule. + :paramtype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword backend_http_settings: Backend http settings resource of URL path map path rule. + :paramtype backend_http_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword redirect_configuration: Redirect configuration resource of URL path map path rule. + :paramtype redirect_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword rewrite_rule_set: Rewrite rule set resource of URL path map path rule. + :paramtype rewrite_rule_set: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword load_distribution_policy: Load Distribution Policy resource of URL path map path rule. + :paramtype load_distribution_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword firewall_policy: Reference to the FirewallPolicy resource. + :paramtype firewall_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(ApplicationGatewayPathRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.paths = paths + self.backend_address_pool = backend_address_pool + self.backend_http_settings = backend_http_settings + self.redirect_configuration = redirect_configuration + self.rewrite_rule_set = rewrite_rule_set + self.load_distribution_policy = load_distribution_policy + self.provisioning_state = None + self.firewall_policy = firewall_policy + + +class ApplicationGatewayPrivateEndpointConnection(SubResource): + """Private Endpoint connection on an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the private endpoint connection on an application gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. + :vartype private_link_service_connection_state: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the application gateway private endpoint + connection resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar link_identifier: The consumer link id. + :vartype link_identifier: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'link_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'link_identifier': {'key': 'properties.linkIdentifier', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the private endpoint connection on an application gateway. + :paramtype name: str + :keyword private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :paramtype private_link_service_connection_state: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnectionState + """ + super(ApplicationGatewayPrivateEndpointConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_endpoint = None + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + self.link_identifier = None + + +class ApplicationGatewayPrivateEndpointConnectionListResult(msrest.serialization.Model): + """Response for ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections for an application gateway. + + :ivar value: List of private endpoint connections on an application gateway. + :vartype value: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayPrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGatewayPrivateEndpointConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of private endpoint connections on an application gateway. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(ApplicationGatewayPrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ApplicationGatewayPrivateLinkConfiguration(SubResource): + """Private Link Configuration on an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the private link configuration that is unique within an Application + Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar ip_configurations: An array of application gateway private link ip configurations. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateLinkIpConfiguration] + :ivar provisioning_state: The provisioning state of the application gateway private link + configuration. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[ApplicationGatewayPrivateLinkIpConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + ip_configurations: Optional[List["ApplicationGatewayPrivateLinkIpConfiguration"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the private link configuration that is unique within an Application + Gateway. + :paramtype name: str + :keyword ip_configurations: An array of application gateway private link ip configurations. + :paramtype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateLinkIpConfiguration] + """ + super(ApplicationGatewayPrivateLinkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.ip_configurations = ip_configurations + self.provisioning_state = None + + +class ApplicationGatewayPrivateLinkIpConfiguration(SubResource): + """The application gateway private link ip configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of application gateway private link ip configuration. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + :ivar private_ip_address: The private IP address of the IP configuration. + :vartype private_ip_address: str + :ivar private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar subnet: Reference to the subnet resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar primary: Whether the ip configuration is primary or not. + :vartype primary: bool + :ivar provisioning_state: The provisioning state of the application gateway private link IP + configuration. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["SubResource"] = None, + primary: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of application gateway private link ip configuration. + :paramtype name: str + :keyword private_ip_address: The private IP address of the IP configuration. + :paramtype private_ip_address: str + :keyword private_ip_allocation_method: The private IP address allocation method. Possible + values include: "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword subnet: Reference to the subnet resource. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword primary: Whether the ip configuration is primary or not. + :paramtype primary: bool + """ + super(ApplicationGatewayPrivateLinkIpConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.primary = primary + self.provisioning_state = None + + +class ApplicationGatewayPrivateLinkResource(SubResource): + """PrivateLink Resource of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the private link resource that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar group_id: Group identifier of private link resource. + :vartype group_id: str + :ivar required_members: Required member names of private link resource. + :vartype required_members: list[str] + :ivar required_zone_names: Required DNS zone names of the the private link resource. + :vartype required_zone_names: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the private link resource that is unique within an Application Gateway. + :paramtype name: str + :keyword required_zone_names: Required DNS zone names of the the private link resource. + :paramtype required_zone_names: list[str] + """ + super(ApplicationGatewayPrivateLinkResource, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class ApplicationGatewayPrivateLinkResourceListResult(msrest.serialization.Model): + """Response for ListApplicationGatewayPrivateLinkResources API service call. Gets all private link resources for an application gateway. + + :ivar value: List of private link resources of an application gateway. + :vartype value: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateLinkResource] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayPrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGatewayPrivateLinkResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of private link resources of an application gateway. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateLinkResource] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(ApplicationGatewayPrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ApplicationGatewayProbe(SubResource): + """Probe of the application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the probe that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar protocol: The protocol used for the probe. Possible values include: "Http", "Https", + "Tcp", "Tls". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :ivar host: Host name to send the probe to. + :vartype host: str + :ivar path: Relative path of probe. Valid path starts from '/'. Probe is sent to + :code:``://:code:``::code:``:code:``. + :vartype path: str + :ivar interval: The probing interval in seconds. This is the time interval between two + consecutive probes. Acceptable values are from 1 second to 86400 seconds. + :vartype interval: int + :ivar timeout: The probe timeout in seconds. Probe marked as failed if valid response is not + received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + :vartype timeout: int + :ivar unhealthy_threshold: The probe retry count. Backend server is marked down after + consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second + to 20. + :vartype unhealthy_threshold: int + :ivar pick_host_name_from_backend_http_settings: Whether the host header should be picked from + the backend http settings. Default value is false. + :vartype pick_host_name_from_backend_http_settings: bool + :ivar pick_host_name_from_backend_settings: Whether the server name indication should be picked + from the backend settings for Tls protocol. Default value is false. + :vartype pick_host_name_from_backend_settings: bool + :ivar min_servers: Minimum number of servers that are always marked healthy. Default value is + 0. + :vartype min_servers: int + :ivar match: Criterion for classifying a healthy probe response. + :vartype match: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProbeHealthResponseMatch + :ivar provisioning_state: The provisioning state of the probe resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar port: Custom port which will be used for probing the backend servers. The valid value + ranges from 1 to 65535. In case not set, port from http settings will be used. This property is + valid for Standard_v2 and WAF_v2 only. + :vartype port: int + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'port': {'maximum': 65535, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'host': {'key': 'properties.host', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'timeout': {'key': 'properties.timeout', 'type': 'int'}, + 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, + 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, + 'pick_host_name_from_backend_settings': {'key': 'properties.pickHostNameFromBackendSettings', 'type': 'bool'}, + 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, + 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + host: Optional[str] = None, + path: Optional[str] = None, + interval: Optional[int] = None, + timeout: Optional[int] = None, + unhealthy_threshold: Optional[int] = None, + pick_host_name_from_backend_http_settings: Optional[bool] = None, + pick_host_name_from_backend_settings: Optional[bool] = None, + min_servers: Optional[int] = None, + match: Optional["ApplicationGatewayProbeHealthResponseMatch"] = None, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the probe that is unique within an Application Gateway. + :paramtype name: str + :keyword protocol: The protocol used for the probe. Possible values include: "Http", "Https", + "Tcp", "Tls". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProtocol + :keyword host: Host name to send the probe to. + :paramtype host: str + :keyword path: Relative path of probe. Valid path starts from '/'. Probe is sent to + :code:``://:code:``::code:``:code:``. + :paramtype path: str + :keyword interval: The probing interval in seconds. This is the time interval between two + consecutive probes. Acceptable values are from 1 second to 86400 seconds. + :paramtype interval: int + :keyword timeout: The probe timeout in seconds. Probe marked as failed if valid response is not + received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + :paramtype timeout: int + :keyword unhealthy_threshold: The probe retry count. Backend server is marked down after + consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second + to 20. + :paramtype unhealthy_threshold: int + :keyword pick_host_name_from_backend_http_settings: Whether the host header should be picked + from the backend http settings. Default value is false. + :paramtype pick_host_name_from_backend_http_settings: bool + :keyword pick_host_name_from_backend_settings: Whether the server name indication should be + picked from the backend settings for Tls protocol. Default value is false. + :paramtype pick_host_name_from_backend_settings: bool + :keyword min_servers: Minimum number of servers that are always marked healthy. Default value + is 0. + :paramtype min_servers: int + :keyword match: Criterion for classifying a healthy probe response. + :paramtype match: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayProbeHealthResponseMatch + :keyword port: Custom port which will be used for probing the backend servers. The valid value + ranges from 1 to 65535. In case not set, port from http settings will be used. This property is + valid for Standard_v2 and WAF_v2 only. + :paramtype port: int + """ + super(ApplicationGatewayProbe, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.protocol = protocol + self.host = host + self.path = path + self.interval = interval + self.timeout = timeout + self.unhealthy_threshold = unhealthy_threshold + self.pick_host_name_from_backend_http_settings = pick_host_name_from_backend_http_settings + self.pick_host_name_from_backend_settings = pick_host_name_from_backend_settings + self.min_servers = min_servers + self.match = match + self.provisioning_state = None + self.port = port + + +class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): + """Application gateway probe health response match. + + :ivar body: Body that must be contained in the health response. Default value is empty. + :vartype body: str + :ivar status_codes: Allowed ranges of healthy status codes. Default range of healthy status + codes is 200-399. + :vartype status_codes: list[str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, + } + + def __init__( + self, + *, + body: Optional[str] = None, + status_codes: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword body: Body that must be contained in the health response. Default value is empty. + :paramtype body: str + :keyword status_codes: Allowed ranges of healthy status codes. Default range of healthy status + codes is 200-399. + :paramtype status_codes: list[str] + """ + super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) + self.body = body + self.status_codes = status_codes + + +class ApplicationGatewayRedirectConfiguration(SubResource): + """Redirect configuration of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the redirect configuration that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar redirect_type: HTTP redirection type. Possible values include: "Permanent", "Found", + "SeeOther", "Temporary". + :vartype redirect_type: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRedirectType + :ivar target_listener: Reference to a listener to redirect the request to. + :vartype target_listener: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar target_url: Url to redirect the request to. + :vartype target_url: str + :ivar include_path: Include path in the redirected url. + :vartype include_path: bool + :ivar include_query_string: Include query string in the redirected url. + :vartype include_query_string: bool + :ivar request_routing_rules: Request routing specifying redirect configuration. + :vartype request_routing_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar url_path_maps: Url path maps specifying default redirect configuration. + :vartype url_path_maps: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar path_rules: Path rules specifying redirect configuration. + :vartype path_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, + 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, + 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, + 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, + 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, + 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, + 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, + 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + redirect_type: Optional[Union[str, "ApplicationGatewayRedirectType"]] = None, + target_listener: Optional["SubResource"] = None, + target_url: Optional[str] = None, + include_path: Optional[bool] = None, + include_query_string: Optional[bool] = None, + request_routing_rules: Optional[List["SubResource"]] = None, + url_path_maps: Optional[List["SubResource"]] = None, + path_rules: Optional[List["SubResource"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the redirect configuration that is unique within an Application Gateway. + :paramtype name: str + :keyword redirect_type: HTTP redirection type. Possible values include: "Permanent", "Found", + "SeeOther", "Temporary". + :paramtype redirect_type: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRedirectType + :keyword target_listener: Reference to a listener to redirect the request to. + :paramtype target_listener: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword target_url: Url to redirect the request to. + :paramtype target_url: str + :keyword include_path: Include path in the redirected url. + :paramtype include_path: bool + :keyword include_query_string: Include query string in the redirected url. + :paramtype include_query_string: bool + :keyword request_routing_rules: Request routing specifying redirect configuration. + :paramtype request_routing_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword url_path_maps: Url path maps specifying default redirect configuration. + :paramtype url_path_maps: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword path_rules: Path rules specifying redirect configuration. + :paramtype path_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + super(ApplicationGatewayRedirectConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.redirect_type = redirect_type + self.target_listener = target_listener + self.target_url = target_url + self.include_path = include_path + self.include_query_string = include_query_string + self.request_routing_rules = request_routing_rules + self.url_path_maps = url_path_maps + self.path_rules = path_rules + + +class ApplicationGatewayRequestRoutingRule(SubResource): + """Request routing rule of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the request routing rule that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". + :vartype rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRequestRoutingRuleType + :ivar priority: Priority of the request routing rule. + :vartype priority: int + :ivar backend_address_pool: Backend address pool resource of the application gateway. + :vartype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar backend_http_settings: Backend http settings resource of the application gateway. + :vartype backend_http_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar http_listener: Http listener resource of the application gateway. + :vartype http_listener: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar url_path_map: URL path map resource of the application gateway. + :vartype url_path_map: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar rewrite_rule_set: Rewrite Rule Set resource in Basic rule of the application gateway. + :vartype rewrite_rule_set: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar redirect_configuration: Redirect configuration resource of the application gateway. + :vartype redirect_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar load_distribution_policy: Load Distribution Policy resource of the application gateway. + :vartype load_distribution_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the request routing rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'priority': {'maximum': 20000, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, + 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, + 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, + 'rewrite_rule_set': {'key': 'properties.rewriteRuleSet', 'type': 'SubResource'}, + 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, + 'load_distribution_policy': {'key': 'properties.loadDistributionPolicy', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + rule_type: Optional[Union[str, "ApplicationGatewayRequestRoutingRuleType"]] = None, + priority: Optional[int] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_http_settings: Optional["SubResource"] = None, + http_listener: Optional["SubResource"] = None, + url_path_map: Optional["SubResource"] = None, + rewrite_rule_set: Optional["SubResource"] = None, + redirect_configuration: Optional["SubResource"] = None, + load_distribution_policy: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the request routing rule that is unique within an Application Gateway. + :paramtype name: str + :keyword rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". + :paramtype rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRequestRoutingRuleType + :keyword priority: Priority of the request routing rule. + :paramtype priority: int + :keyword backend_address_pool: Backend address pool resource of the application gateway. + :paramtype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword backend_http_settings: Backend http settings resource of the application gateway. + :paramtype backend_http_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword http_listener: Http listener resource of the application gateway. + :paramtype http_listener: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword url_path_map: URL path map resource of the application gateway. + :paramtype url_path_map: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword rewrite_rule_set: Rewrite Rule Set resource in Basic rule of the application gateway. + :paramtype rewrite_rule_set: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword redirect_configuration: Redirect configuration resource of the application gateway. + :paramtype redirect_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword load_distribution_policy: Load Distribution Policy resource of the application + gateway. + :paramtype load_distribution_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(ApplicationGatewayRequestRoutingRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.rule_type = rule_type + self.priority = priority + self.backend_address_pool = backend_address_pool + self.backend_http_settings = backend_http_settings + self.http_listener = http_listener + self.url_path_map = url_path_map + self.rewrite_rule_set = rewrite_rule_set + self.redirect_configuration = redirect_configuration + self.load_distribution_policy = load_distribution_policy + self.provisioning_state = None + + +class ApplicationGatewayRewriteRule(msrest.serialization.Model): + """Rewrite rule of an application gateway. + + :ivar name: Name of the rewrite rule that is unique within an Application Gateway. + :vartype name: str + :ivar rule_sequence: Rule Sequence of the rewrite rule that determines the order of execution + of a particular rule in a RewriteRuleSet. + :vartype rule_sequence: int + :ivar conditions: Conditions based on which the action set execution will be evaluated. + :vartype conditions: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRewriteRuleCondition] + :ivar action_set: Set of actions to be done as part of the rewrite Rule. + :vartype action_set: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRewriteRuleActionSet + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rule_sequence': {'key': 'ruleSequence', 'type': 'int'}, + 'conditions': {'key': 'conditions', 'type': '[ApplicationGatewayRewriteRuleCondition]'}, + 'action_set': {'key': 'actionSet', 'type': 'ApplicationGatewayRewriteRuleActionSet'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + rule_sequence: Optional[int] = None, + conditions: Optional[List["ApplicationGatewayRewriteRuleCondition"]] = None, + action_set: Optional["ApplicationGatewayRewriteRuleActionSet"] = None, + **kwargs + ): + """ + :keyword name: Name of the rewrite rule that is unique within an Application Gateway. + :paramtype name: str + :keyword rule_sequence: Rule Sequence of the rewrite rule that determines the order of + execution of a particular rule in a RewriteRuleSet. + :paramtype rule_sequence: int + :keyword conditions: Conditions based on which the action set execution will be evaluated. + :paramtype conditions: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRewriteRuleCondition] + :keyword action_set: Set of actions to be done as part of the rewrite Rule. + :paramtype action_set: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRewriteRuleActionSet + """ + super(ApplicationGatewayRewriteRule, self).__init__(**kwargs) + self.name = name + self.rule_sequence = rule_sequence + self.conditions = conditions + self.action_set = action_set + + +class ApplicationGatewayRewriteRuleActionSet(msrest.serialization.Model): + """Set of actions in the Rewrite Rule in Application Gateway. + + :ivar request_header_configurations: Request Header Actions in the Action Set. + :vartype request_header_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayHeaderConfiguration] + :ivar response_header_configurations: Response Header Actions in the Action Set. + :vartype response_header_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayHeaderConfiguration] + :ivar url_configuration: Url Configuration Action in the Action Set. + :vartype url_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayUrlConfiguration + """ + + _attribute_map = { + 'request_header_configurations': {'key': 'requestHeaderConfigurations', 'type': '[ApplicationGatewayHeaderConfiguration]'}, + 'response_header_configurations': {'key': 'responseHeaderConfigurations', 'type': '[ApplicationGatewayHeaderConfiguration]'}, + 'url_configuration': {'key': 'urlConfiguration', 'type': 'ApplicationGatewayUrlConfiguration'}, + } + + def __init__( + self, + *, + request_header_configurations: Optional[List["ApplicationGatewayHeaderConfiguration"]] = None, + response_header_configurations: Optional[List["ApplicationGatewayHeaderConfiguration"]] = None, + url_configuration: Optional["ApplicationGatewayUrlConfiguration"] = None, + **kwargs + ): + """ + :keyword request_header_configurations: Request Header Actions in the Action Set. + :paramtype request_header_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayHeaderConfiguration] + :keyword response_header_configurations: Response Header Actions in the Action Set. + :paramtype response_header_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayHeaderConfiguration] + :keyword url_configuration: Url Configuration Action in the Action Set. + :paramtype url_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayUrlConfiguration + """ + super(ApplicationGatewayRewriteRuleActionSet, self).__init__(**kwargs) + self.request_header_configurations = request_header_configurations + self.response_header_configurations = response_header_configurations + self.url_configuration = url_configuration + + +class ApplicationGatewayRewriteRuleCondition(msrest.serialization.Model): + """Set of conditions in the Rewrite Rule in Application Gateway. + + :ivar variable: The condition parameter of the RewriteRuleCondition. + :vartype variable: str + :ivar pattern: The pattern, either fixed string or regular expression, that evaluates the + truthfulness of the condition. + :vartype pattern: str + :ivar ignore_case: Setting this parameter to truth value with force the pattern to do a case + in-sensitive comparison. + :vartype ignore_case: bool + :ivar negate: Setting this value as truth will force to check the negation of the condition + given by the user. + :vartype negate: bool + """ + + _attribute_map = { + 'variable': {'key': 'variable', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'ignore_case': {'key': 'ignoreCase', 'type': 'bool'}, + 'negate': {'key': 'negate', 'type': 'bool'}, + } + + def __init__( + self, + *, + variable: Optional[str] = None, + pattern: Optional[str] = None, + ignore_case: Optional[bool] = None, + negate: Optional[bool] = None, + **kwargs + ): + """ + :keyword variable: The condition parameter of the RewriteRuleCondition. + :paramtype variable: str + :keyword pattern: The pattern, either fixed string or regular expression, that evaluates the + truthfulness of the condition. + :paramtype pattern: str + :keyword ignore_case: Setting this parameter to truth value with force the pattern to do a case + in-sensitive comparison. + :paramtype ignore_case: bool + :keyword negate: Setting this value as truth will force to check the negation of the condition + given by the user. + :paramtype negate: bool + """ + super(ApplicationGatewayRewriteRuleCondition, self).__init__(**kwargs) + self.variable = variable + self.pattern = pattern + self.ignore_case = ignore_case + self.negate = negate + + +class ApplicationGatewayRewriteRuleSet(SubResource): + """Rewrite rule set of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the rewrite rule set that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar rewrite_rules: Rewrite rules in the rewrite rule set. + :vartype rewrite_rules: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRewriteRule] + :ivar provisioning_state: The provisioning state of the rewrite rule set resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'rewrite_rules': {'key': 'properties.rewriteRules', 'type': '[ApplicationGatewayRewriteRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + rewrite_rules: Optional[List["ApplicationGatewayRewriteRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the rewrite rule set that is unique within an Application Gateway. + :paramtype name: str + :keyword rewrite_rules: Rewrite rules in the rewrite rule set. + :paramtype rewrite_rules: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRewriteRule] + """ + super(ApplicationGatewayRewriteRuleSet, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.rewrite_rules = rewrite_rules + self.provisioning_state = None + + +class ApplicationGatewayRoutingRule(SubResource): + """Routing rule of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the routing rule that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". + :vartype rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRequestRoutingRuleType + :ivar backend_address_pool: Backend address pool resource of the application gateway. + :vartype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar backend_settings: Backend settings resource of the application gateway. + :vartype backend_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar listener: Listener resource of the application gateway. + :vartype listener: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the request routing rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_settings': {'key': 'properties.backendSettings', 'type': 'SubResource'}, + 'listener': {'key': 'properties.listener', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + rule_type: Optional[Union[str, "ApplicationGatewayRequestRoutingRuleType"]] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_settings: Optional["SubResource"] = None, + listener: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the routing rule that is unique within an Application Gateway. + :paramtype name: str + :keyword rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". + :paramtype rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayRequestRoutingRuleType + :keyword backend_address_pool: Backend address pool resource of the application gateway. + :paramtype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword backend_settings: Backend settings resource of the application gateway. + :paramtype backend_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword listener: Listener resource of the application gateway. + :paramtype listener: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(ApplicationGatewayRoutingRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.rule_type = rule_type + self.backend_address_pool = backend_address_pool + self.backend_settings = backend_settings + self.listener = listener + self.provisioning_state = None + + +class ApplicationGatewaySku(msrest.serialization.Model): + """SKU of an application gateway. + + :ivar name: Name of an application gateway SKU. Possible values include: "Standard_Small", + "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large", "Standard_v2", "WAF_v2". + :vartype name: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySkuName + :ivar tier: Tier of an application gateway. Possible values include: "Standard", "WAF", + "Standard_v2", "WAF_v2". + :vartype tier: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayTier + :ivar capacity: Capacity (instance count) of an application gateway. + :vartype capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "ApplicationGatewaySkuName"]] = None, + tier: Optional[Union[str, "ApplicationGatewayTier"]] = None, + capacity: Optional[int] = None, + **kwargs + ): + """ + :keyword name: Name of an application gateway SKU. Possible values include: "Standard_Small", + "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large", "Standard_v2", "WAF_v2". + :paramtype name: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySkuName + :keyword tier: Tier of an application gateway. Possible values include: "Standard", "WAF", + "Standard_v2", "WAF_v2". + :paramtype tier: str or ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayTier + :keyword capacity: Capacity (instance count) of an application gateway. + :paramtype capacity: int + """ + super(ApplicationGatewaySku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class ApplicationGatewaySslCertificate(SubResource): + """SSL certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the SSL certificate that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar data: Base-64 encoded pfx certificate. Only applicable in PUT Request. + :vartype data: str + :ivar password: Password for the pfx file specified in data. Only applicable in PUT request. + :vartype password: str + :ivar public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in + data. Only applicable in GET request. + :vartype public_cert_data: str + :ivar key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :vartype key_vault_secret_id: str + :ivar provisioning_state: The provisioning state of the SSL certificate resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'public_cert_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, + 'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + data: Optional[str] = None, + password: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the SSL certificate that is unique within an Application Gateway. + :paramtype name: str + :keyword data: Base-64 encoded pfx certificate. Only applicable in PUT Request. + :paramtype data: str + :keyword password: Password for the pfx file specified in data. Only applicable in PUT request. + :paramtype password: str + :keyword key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :paramtype key_vault_secret_id: str + """ + super(ApplicationGatewaySslCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.data = data + self.password = password + self.public_cert_data = None + self.key_vault_secret_id = key_vault_secret_id + self.provisioning_state = None + + +class ApplicationGatewaySslPolicy(msrest.serialization.Model): + """Application Gateway Ssl policy. + + :ivar disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. + :vartype disabled_ssl_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProtocol] + :ivar policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". + :vartype policy_type: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicyType + :ivar policy_name: Name of Ssl predefined policy. Possible values include: + "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". + :vartype policy_name: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicyName + :ivar cipher_suites: Ssl cipher suites to be enabled in the specified order to application + gateway. + :vartype cipher_suites: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslCipherSuite] + :ivar min_protocol_version: Minimum version of Ssl protocol to be supported on application + gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". + :vartype min_protocol_version: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProtocol + """ + + _attribute_map = { + 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, + 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + disabled_ssl_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, + policy_type: Optional[Union[str, "ApplicationGatewaySslPolicyType"]] = None, + policy_name: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, + cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, + min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, + **kwargs + ): + """ + :keyword disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. + :paramtype disabled_ssl_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProtocol] + :keyword policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". + :paramtype policy_type: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicyType + :keyword policy_name: Name of Ssl predefined policy. Possible values include: + "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". + :paramtype policy_name: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicyName + :keyword cipher_suites: Ssl cipher suites to be enabled in the specified order to application + gateway. + :paramtype cipher_suites: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslCipherSuite] + :keyword min_protocol_version: Minimum version of Ssl protocol to be supported on application + gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". + :paramtype min_protocol_version: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProtocol + """ + super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) + self.disabled_ssl_protocols = disabled_ssl_protocols + self.policy_type = policy_type + self.policy_name = policy_name + self.cipher_suites = cipher_suites + self.min_protocol_version = min_protocol_version + + +class ApplicationGatewaySslPredefinedPolicy(SubResource): + """An Ssl predefined policy. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the Ssl predefined policy. + :vartype name: str + :ivar cipher_suites: Ssl cipher suites to be enabled in the specified order for application + gateway. + :vartype cipher_suites: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslCipherSuite] + :ivar min_protocol_version: Minimum version of Ssl protocol to be supported on application + gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". + :vartype min_protocol_version: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProtocol + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, + 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, + min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the Ssl predefined policy. + :paramtype name: str + :keyword cipher_suites: Ssl cipher suites to be enabled in the specified order for application + gateway. + :paramtype cipher_suites: list[str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslCipherSuite] + :keyword min_protocol_version: Minimum version of Ssl protocol to be supported on application + gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". + :paramtype min_protocol_version: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslProtocol + """ + super(ApplicationGatewaySslPredefinedPolicy, self).__init__(id=id, **kwargs) + self.name = name + self.cipher_suites = cipher_suites + self.min_protocol_version = min_protocol_version + + +class ApplicationGatewaySslProfile(SubResource): + """SSL profile of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the SSL profile that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar trusted_client_certificates: Array of references to application gateway trusted client + certificates. + :vartype trusted_client_certificates: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar ssl_policy: SSL policy of the application gateway resource. + :vartype ssl_policy: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicy + :ivar client_auth_configuration: Client authentication configuration of the application gateway + resource. + :vartype client_auth_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayClientAuthConfiguration + :ivar provisioning_state: The provisioning state of the HTTP listener resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'trusted_client_certificates': {'key': 'properties.trustedClientCertificates', 'type': '[SubResource]'}, + 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, + 'client_auth_configuration': {'key': 'properties.clientAuthConfiguration', 'type': 'ApplicationGatewayClientAuthConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + trusted_client_certificates: Optional[List["SubResource"]] = None, + ssl_policy: Optional["ApplicationGatewaySslPolicy"] = None, + client_auth_configuration: Optional["ApplicationGatewayClientAuthConfiguration"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the SSL profile that is unique within an Application Gateway. + :paramtype name: str + :keyword trusted_client_certificates: Array of references to application gateway trusted client + certificates. + :paramtype trusted_client_certificates: + list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword ssl_policy: SSL policy of the application gateway resource. + :paramtype ssl_policy: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPolicy + :keyword client_auth_configuration: Client authentication configuration of the application + gateway resource. + :paramtype client_auth_configuration: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayClientAuthConfiguration + """ + super(ApplicationGatewaySslProfile, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.trusted_client_certificates = trusted_client_certificates + self.ssl_policy = ssl_policy + self.client_auth_configuration = client_auth_configuration + self.provisioning_state = None + + +class ApplicationGatewayTrustedClientCertificate(SubResource): + """Trusted client certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the trusted client certificate that is unique within an Application + Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar data: Certificate public data. + :vartype data: str + :ivar validated_cert_data: Validated certificate data. + :vartype validated_cert_data: str + :ivar client_cert_issuer_dn: Distinguished name of client certificate issuer. + :vartype client_cert_issuer_dn: str + :ivar provisioning_state: The provisioning state of the trusted client certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'validated_cert_data': {'readonly': True}, + 'client_cert_issuer_dn': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'validated_cert_data': {'key': 'properties.validatedCertData', 'type': 'str'}, + 'client_cert_issuer_dn': {'key': 'properties.clientCertIssuerDN', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + data: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the trusted client certificate that is unique within an Application + Gateway. + :paramtype name: str + :keyword data: Certificate public data. + :paramtype data: str + """ + super(ApplicationGatewayTrustedClientCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.data = data + self.validated_cert_data = None + self.client_cert_issuer_dn = None + self.provisioning_state = None + + +class ApplicationGatewayTrustedRootCertificate(SubResource): + """Trusted Root certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the trusted root certificate that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar data: Certificate public data. + :vartype data: str + :ivar key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :vartype key_vault_secret_id: str + :ivar provisioning_state: The provisioning state of the trusted root certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + data: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the trusted root certificate that is unique within an Application + Gateway. + :paramtype name: str + :keyword data: Certificate public data. + :paramtype data: str + :keyword key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :paramtype key_vault_secret_id: str + """ + super(ApplicationGatewayTrustedRootCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.data = data + self.key_vault_secret_id = key_vault_secret_id + self.provisioning_state = None + + +class ApplicationGatewayUrlConfiguration(msrest.serialization.Model): + """Url configuration of the Actions set in Application Gateway. + + :ivar modified_path: Url path which user has provided for url rewrite. Null means no path will + be updated. Default value is null. + :vartype modified_path: str + :ivar modified_query_string: Query string which user has provided for url rewrite. Null means + no query string will be updated. Default value is null. + :vartype modified_query_string: str + :ivar reroute: If set as true, it will re-evaluate the url path map provided in path based + request routing rules using modified path. Default value is false. + :vartype reroute: bool + """ + + _attribute_map = { + 'modified_path': {'key': 'modifiedPath', 'type': 'str'}, + 'modified_query_string': {'key': 'modifiedQueryString', 'type': 'str'}, + 'reroute': {'key': 'reroute', 'type': 'bool'}, + } + + def __init__( + self, + *, + modified_path: Optional[str] = None, + modified_query_string: Optional[str] = None, + reroute: Optional[bool] = None, + **kwargs + ): + """ + :keyword modified_path: Url path which user has provided for url rewrite. Null means no path + will be updated. Default value is null. + :paramtype modified_path: str + :keyword modified_query_string: Query string which user has provided for url rewrite. Null + means no query string will be updated. Default value is null. + :paramtype modified_query_string: str + :keyword reroute: If set as true, it will re-evaluate the url path map provided in path based + request routing rules using modified path. Default value is false. + :paramtype reroute: bool + """ + super(ApplicationGatewayUrlConfiguration, self).__init__(**kwargs) + self.modified_path = modified_path + self.modified_query_string = modified_query_string + self.reroute = reroute + + +class ApplicationGatewayUrlPathMap(SubResource): + """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the URL path map that is unique within an Application Gateway. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar default_backend_address_pool: Default backend address pool resource of URL path map. + :vartype default_backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar default_backend_http_settings: Default backend http settings resource of URL path map. + :vartype default_backend_http_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar default_rewrite_rule_set: Default Rewrite rule set resource of URL path map. + :vartype default_rewrite_rule_set: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar default_redirect_configuration: Default redirect configuration resource of URL path map. + :vartype default_redirect_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar default_load_distribution_policy: Default Load Distribution Policy resource of URL path + map. + :vartype default_load_distribution_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar path_rules: Path rule of URL path map resource. + :vartype path_rules: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPathRule] + :ivar provisioning_state: The provisioning state of the URL path map resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, + 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, + 'default_rewrite_rule_set': {'key': 'properties.defaultRewriteRuleSet', 'type': 'SubResource'}, + 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, + 'default_load_distribution_policy': {'key': 'properties.defaultLoadDistributionPolicy', 'type': 'SubResource'}, + 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + default_backend_address_pool: Optional["SubResource"] = None, + default_backend_http_settings: Optional["SubResource"] = None, + default_rewrite_rule_set: Optional["SubResource"] = None, + default_redirect_configuration: Optional["SubResource"] = None, + default_load_distribution_policy: Optional["SubResource"] = None, + path_rules: Optional[List["ApplicationGatewayPathRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the URL path map that is unique within an Application Gateway. + :paramtype name: str + :keyword default_backend_address_pool: Default backend address pool resource of URL path map. + :paramtype default_backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword default_backend_http_settings: Default backend http settings resource of URL path map. + :paramtype default_backend_http_settings: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword default_rewrite_rule_set: Default Rewrite rule set resource of URL path map. + :paramtype default_rewrite_rule_set: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword default_redirect_configuration: Default redirect configuration resource of URL path + map. + :paramtype default_redirect_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword default_load_distribution_policy: Default Load Distribution Policy resource of URL + path map. + :paramtype default_load_distribution_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword path_rules: Path rule of URL path map resource. + :paramtype path_rules: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPathRule] + """ + super(ApplicationGatewayUrlPathMap, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.default_backend_address_pool = default_backend_address_pool + self.default_backend_http_settings = default_backend_http_settings + self.default_rewrite_rule_set = default_rewrite_rule_set + self.default_redirect_configuration = default_redirect_configuration + self.default_load_distribution_policy = default_load_distribution_policy + self.path_rules = path_rules + self.provisioning_state = None + + +class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): + """Application gateway web application firewall configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Required. Whether the web application firewall is enabled or not. + :vartype enabled: bool + :ivar firewall_mode: Required. Web application firewall mode. Possible values include: + "Detection", "Prevention". + :vartype firewall_mode: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallMode + :ivar rule_set_type: Required. The type of the web application firewall rule set. Possible + values are: 'OWASP'. + :vartype rule_set_type: str + :ivar rule_set_version: Required. The version of the rule set type. + :vartype rule_set_version: str + :ivar disabled_rule_groups: The disabled rule groups. + :vartype disabled_rule_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallDisabledRuleGroup] + :ivar request_body_check: Whether allow WAF to check request Body. + :vartype request_body_check: bool + :ivar max_request_body_size: Maximum request body size for WAF. + :vartype max_request_body_size: int + :ivar max_request_body_size_in_kb: Maximum request body size in Kb for WAF. + :vartype max_request_body_size_in_kb: int + :ivar file_upload_limit_in_mb: Maximum file upload size in Mb for WAF. + :vartype file_upload_limit_in_mb: int + :ivar exclusions: The exclusion list. + :vartype exclusions: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallExclusion] + """ + + _validation = { + 'enabled': {'required': True}, + 'firewall_mode': {'required': True}, + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + 'max_request_body_size': {'maximum': 128, 'minimum': 8}, + 'max_request_body_size_in_kb': {'maximum': 128, 'minimum': 8}, + 'file_upload_limit_in_mb': {'minimum': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, + 'request_body_check': {'key': 'requestBodyCheck', 'type': 'bool'}, + 'max_request_body_size': {'key': 'maxRequestBodySize', 'type': 'int'}, + 'max_request_body_size_in_kb': {'key': 'maxRequestBodySizeInKb', 'type': 'int'}, + 'file_upload_limit_in_mb': {'key': 'fileUploadLimitInMb', 'type': 'int'}, + 'exclusions': {'key': 'exclusions', 'type': '[ApplicationGatewayFirewallExclusion]'}, + } + + def __init__( + self, + *, + enabled: bool, + firewall_mode: Union[str, "ApplicationGatewayFirewallMode"], + rule_set_type: str, + rule_set_version: str, + disabled_rule_groups: Optional[List["ApplicationGatewayFirewallDisabledRuleGroup"]] = None, + request_body_check: Optional[bool] = None, + max_request_body_size: Optional[int] = None, + max_request_body_size_in_kb: Optional[int] = None, + file_upload_limit_in_mb: Optional[int] = None, + exclusions: Optional[List["ApplicationGatewayFirewallExclusion"]] = None, + **kwargs + ): + """ + :keyword enabled: Required. Whether the web application firewall is enabled or not. + :paramtype enabled: bool + :keyword firewall_mode: Required. Web application firewall mode. Possible values include: + "Detection", "Prevention". + :paramtype firewall_mode: str or + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallMode + :keyword rule_set_type: Required. The type of the web application firewall rule set. Possible + values are: 'OWASP'. + :paramtype rule_set_type: str + :keyword rule_set_version: Required. The version of the rule set type. + :paramtype rule_set_version: str + :keyword disabled_rule_groups: The disabled rule groups. + :paramtype disabled_rule_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallDisabledRuleGroup] + :keyword request_body_check: Whether allow WAF to check request Body. + :paramtype request_body_check: bool + :keyword max_request_body_size: Maximum request body size for WAF. + :paramtype max_request_body_size: int + :keyword max_request_body_size_in_kb: Maximum request body size in Kb for WAF. + :paramtype max_request_body_size_in_kb: int + :keyword file_upload_limit_in_mb: Maximum file upload size in Mb for WAF. + :paramtype file_upload_limit_in_mb: int + :keyword exclusions: The exclusion list. + :paramtype exclusions: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayFirewallExclusion] + """ + super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) + self.enabled = enabled + self.firewall_mode = firewall_mode + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.disabled_rule_groups = disabled_rule_groups + self.request_body_check = request_body_check + self.max_request_body_size = max_request_body_size + self.max_request_body_size_in_kb = max_request_body_size_in_kb + self.file_upload_limit_in_mb = file_upload_limit_in_mb + self.exclusions = exclusions + + +class FirewallPolicyRule(msrest.serialization.Model): + """Properties of a rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationRule, NatRule, NetworkRule. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Name of the rule. + :vartype name: str + :ivar description: Description of the rule. + :vartype description: str + :ivar rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :vartype rule_type: str or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleType + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + } + + _subtype_map = { + 'rule_type': {'ApplicationRule': 'ApplicationRule', 'NatRule': 'NatRule', 'NetworkRule': 'NetworkRule'} + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the rule. + :paramtype name: str + :keyword description: Description of the rule. + :paramtype description: str + """ + super(FirewallPolicyRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.rule_type = None # type: Optional[str] + + +class ApplicationRule(FirewallPolicyRule): + """Rule of type application. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Name of the rule. + :vartype name: str + :ivar description: Description of the rule. + :vartype description: str + :ivar rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :vartype rule_type: str or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleType + :ivar source_addresses: List of source IP addresses for this rule. + :vartype source_addresses: list[str] + :ivar destination_addresses: List of destination IP addresses or Service Tags. + :vartype destination_addresses: list[str] + :ivar protocols: Array of Application Protocols. + :vartype protocols: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleApplicationProtocol] + :ivar target_fqdns: List of FQDNs for this rule. + :vartype target_fqdns: list[str] + :ivar target_urls: List of Urls for this rule condition. + :vartype target_urls: list[str] + :ivar fqdn_tags: List of FQDN Tags for this rule. + :vartype fqdn_tags: list[str] + :ivar source_ip_groups: List of source IpGroups for this rule. + :vartype source_ip_groups: list[str] + :ivar terminate_tls: Terminate TLS connections for this rule. + :vartype terminate_tls: bool + :ivar web_categories: List of destination azure web categories. + :vartype web_categories: list[str] + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[FirewallPolicyRuleApplicationProtocol]'}, + 'target_fqdns': {'key': 'targetFqdns', 'type': '[str]'}, + 'target_urls': {'key': 'targetUrls', 'type': '[str]'}, + 'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'terminate_tls': {'key': 'terminateTLS', 'type': 'bool'}, + 'web_categories': {'key': 'webCategories', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + protocols: Optional[List["FirewallPolicyRuleApplicationProtocol"]] = None, + target_fqdns: Optional[List[str]] = None, + target_urls: Optional[List[str]] = None, + fqdn_tags: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + terminate_tls: Optional[bool] = None, + web_categories: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword name: Name of the rule. + :paramtype name: str + :keyword description: Description of the rule. + :paramtype description: str + :keyword source_addresses: List of source IP addresses for this rule. + :paramtype source_addresses: list[str] + :keyword destination_addresses: List of destination IP addresses or Service Tags. + :paramtype destination_addresses: list[str] + :keyword protocols: Array of Application Protocols. + :paramtype protocols: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleApplicationProtocol] + :keyword target_fqdns: List of FQDNs for this rule. + :paramtype target_fqdns: list[str] + :keyword target_urls: List of Urls for this rule condition. + :paramtype target_urls: list[str] + :keyword fqdn_tags: List of FQDN Tags for this rule. + :paramtype fqdn_tags: list[str] + :keyword source_ip_groups: List of source IpGroups for this rule. + :paramtype source_ip_groups: list[str] + :keyword terminate_tls: Terminate TLS connections for this rule. + :paramtype terminate_tls: bool + :keyword web_categories: List of destination azure web categories. + :paramtype web_categories: list[str] + """ + super(ApplicationRule, self).__init__(name=name, description=description, **kwargs) + self.rule_type = 'ApplicationRule' # type: str + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.protocols = protocols + self.target_fqdns = target_fqdns + self.target_urls = target_urls + self.fqdn_tags = fqdn_tags + self.source_ip_groups = source_ip_groups + self.terminate_tls = terminate_tls + self.web_categories = web_categories + + +class ApplicationSecurityGroup(Resource): + """An application security group in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the application security group resource. It + uniquely identifies a resource, even if the user changes its name or migrate the resource + across subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the application security group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(ApplicationSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.resource_guid = None + self.provisioning_state = None + + +class ApplicationSecurityGroupListResult(msrest.serialization.Model): + """A list of application security groups. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of application security groups. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationSecurityGroup"]] = None, + **kwargs + ): + """ + :keyword value: A list of application security groups. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + """ + super(ApplicationSecurityGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AuthorizationListResult(msrest.serialization.Model): + """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. + + :ivar value: The authorizations in an ExpressRoute Circuit. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitAuthorization"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The authorizations in an ExpressRoute Circuit. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(AuthorizationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AutoApprovedPrivateLinkService(msrest.serialization.Model): + """The information of an AutoApprovedPrivateLinkService. + + :ivar private_link_service: The id of the private link service resource. + :vartype private_link_service: str + """ + + _attribute_map = { + 'private_link_service': {'key': 'privateLinkService', 'type': 'str'}, + } + + def __init__( + self, + *, + private_link_service: Optional[str] = None, + **kwargs + ): + """ + :keyword private_link_service: The id of the private link service resource. + :paramtype private_link_service: str + """ + super(AutoApprovedPrivateLinkService, self).__init__(**kwargs) + self.private_link_service = private_link_service + + +class AutoApprovedPrivateLinkServicesResult(msrest.serialization.Model): + """An array of private link service id that can be linked to a private end point with auto approved. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: An array of auto approved private link service. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.AutoApprovedPrivateLinkService] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AutoApprovedPrivateLinkService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AutoApprovedPrivateLinkService"]] = None, + **kwargs + ): + """ + :keyword value: An array of auto approved private link service. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.AutoApprovedPrivateLinkService] + """ + super(AutoApprovedPrivateLinkServicesResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Availability(msrest.serialization.Model): + """Availability of the metric. + + :ivar time_grain: The time grain of the availability. + :vartype time_grain: str + :ivar retention: The retention of the availability. + :vartype retention: str + :ivar blob_duration: Duration of the availability blob. + :vartype blob_duration: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + time_grain: Optional[str] = None, + retention: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + """ + :keyword time_grain: The time grain of the availability. + :paramtype time_grain: str + :keyword retention: The retention of the availability. + :paramtype retention: str + :keyword blob_duration: Duration of the availability blob. + :paramtype blob_duration: str + """ + super(Availability, self).__init__(**kwargs) + self.time_grain = time_grain + self.retention = retention + self.blob_duration = blob_duration + + +class AvailableDelegation(msrest.serialization.Model): + """The serviceName of an AvailableDelegation indicates a possible delegation for a subnet. + + :ivar name: The name of the AvailableDelegation resource. + :vartype name: str + :ivar id: A unique identifier of the AvailableDelegation resource. + :vartype id: str + :ivar type: Resource type. + :vartype type: str + :ivar service_name: The name of the service and resource. + :vartype service_name: str + :ivar actions: The actions permitted to the service upon delegation. + :vartype actions: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None, + service_name: Optional[str] = None, + actions: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword name: The name of the AvailableDelegation resource. + :paramtype name: str + :keyword id: A unique identifier of the AvailableDelegation resource. + :paramtype id: str + :keyword type: Resource type. + :paramtype type: str + :keyword service_name: The name of the service and resource. + :paramtype service_name: str + :keyword actions: The actions permitted to the service upon delegation. + :paramtype actions: list[str] + """ + super(AvailableDelegation, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.service_name = service_name + self.actions = actions + + +class AvailableDelegationsResult(msrest.serialization.Model): + """An array of available delegations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: An array of available delegations. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.AvailableDelegation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableDelegation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AvailableDelegation"]] = None, + **kwargs + ): + """ + :keyword value: An array of available delegations. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.AvailableDelegation] + """ + super(AvailableDelegationsResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AvailablePrivateEndpointType(msrest.serialization.Model): + """The information of an AvailablePrivateEndpointType. + + :ivar name: The name of the service and resource. + :vartype name: str + :ivar id: A unique identifier of the AvailablePrivateEndpoint Type resource. + :vartype id: str + :ivar type: Resource type. + :vartype type: str + :ivar resource_name: The name of the service and resource. + :vartype resource_name: str + :ivar display_name: Display name of the resource. + :vartype display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None, + resource_name: Optional[str] = None, + display_name: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the service and resource. + :paramtype name: str + :keyword id: A unique identifier of the AvailablePrivateEndpoint Type resource. + :paramtype id: str + :keyword type: Resource type. + :paramtype type: str + :keyword resource_name: The name of the service and resource. + :paramtype resource_name: str + :keyword display_name: Display name of the resource. + :paramtype display_name: str + """ + super(AvailablePrivateEndpointType, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.resource_name = resource_name + self.display_name = display_name + + +class AvailablePrivateEndpointTypesResult(msrest.serialization.Model): + """An array of available PrivateEndpoint types. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: An array of available privateEndpoint type. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.AvailablePrivateEndpointType] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailablePrivateEndpointType]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AvailablePrivateEndpointType"]] = None, + **kwargs + ): + """ + :keyword value: An array of available privateEndpoint type. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.AvailablePrivateEndpointType] + """ + super(AvailablePrivateEndpointTypesResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AvailableProvidersList(msrest.serialization.Model): + """List of available countries with details. + + All required parameters must be populated in order to send to Azure. + + :ivar countries: Required. List of available countries. + :vartype countries: list[~azure.mgmt.network.v2021_08_01.models.AvailableProvidersListCountry] + """ + + _validation = { + 'countries': {'required': True}, + } + + _attribute_map = { + 'countries': {'key': 'countries', 'type': '[AvailableProvidersListCountry]'}, + } + + def __init__( + self, + *, + countries: List["AvailableProvidersListCountry"], + **kwargs + ): + """ + :keyword countries: Required. List of available countries. + :paramtype countries: + list[~azure.mgmt.network.v2021_08_01.models.AvailableProvidersListCountry] + """ + super(AvailableProvidersList, self).__init__(**kwargs) + self.countries = countries + + +class AvailableProvidersListCity(msrest.serialization.Model): + """City or town details. + + :ivar city_name: The city or town name. + :vartype city_name: str + :ivar providers: A list of Internet service providers. + :vartype providers: list[str] + """ + + _attribute_map = { + 'city_name': {'key': 'cityName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + } + + def __init__( + self, + *, + city_name: Optional[str] = None, + providers: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword city_name: The city or town name. + :paramtype city_name: str + :keyword providers: A list of Internet service providers. + :paramtype providers: list[str] + """ + super(AvailableProvidersListCity, self).__init__(**kwargs) + self.city_name = city_name + self.providers = providers + + +class AvailableProvidersListCountry(msrest.serialization.Model): + """Country details. + + :ivar country_name: The country name. + :vartype country_name: str + :ivar providers: A list of Internet service providers. + :vartype providers: list[str] + :ivar states: List of available states in the country. + :vartype states: list[~azure.mgmt.network.v2021_08_01.models.AvailableProvidersListState] + """ + + _attribute_map = { + 'country_name': {'key': 'countryName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'states': {'key': 'states', 'type': '[AvailableProvidersListState]'}, + } + + def __init__( + self, + *, + country_name: Optional[str] = None, + providers: Optional[List[str]] = None, + states: Optional[List["AvailableProvidersListState"]] = None, + **kwargs + ): + """ + :keyword country_name: The country name. + :paramtype country_name: str + :keyword providers: A list of Internet service providers. + :paramtype providers: list[str] + :keyword states: List of available states in the country. + :paramtype states: list[~azure.mgmt.network.v2021_08_01.models.AvailableProvidersListState] + """ + super(AvailableProvidersListCountry, self).__init__(**kwargs) + self.country_name = country_name + self.providers = providers + self.states = states + + +class AvailableProvidersListParameters(msrest.serialization.Model): + """Constraints that determine the list of available Internet service providers. + + :ivar azure_locations: A list of Azure regions. + :vartype azure_locations: list[str] + :ivar country: The country for available providers list. + :vartype country: str + :ivar state: The state for available providers list. + :vartype state: str + :ivar city: The city or town for available providers list. + :vartype city: str + """ + + _attribute_map = { + 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, + 'country': {'key': 'country', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + } + + def __init__( + self, + *, + azure_locations: Optional[List[str]] = None, + country: Optional[str] = None, + state: Optional[str] = None, + city: Optional[str] = None, + **kwargs + ): + """ + :keyword azure_locations: A list of Azure regions. + :paramtype azure_locations: list[str] + :keyword country: The country for available providers list. + :paramtype country: str + :keyword state: The state for available providers list. + :paramtype state: str + :keyword city: The city or town for available providers list. + :paramtype city: str + """ + super(AvailableProvidersListParameters, self).__init__(**kwargs) + self.azure_locations = azure_locations + self.country = country + self.state = state + self.city = city + + +class AvailableProvidersListState(msrest.serialization.Model): + """State details. + + :ivar state_name: The state name. + :vartype state_name: str + :ivar providers: A list of Internet service providers. + :vartype providers: list[str] + :ivar cities: List of available cities or towns in the state. + :vartype cities: list[~azure.mgmt.network.v2021_08_01.models.AvailableProvidersListCity] + """ + + _attribute_map = { + 'state_name': {'key': 'stateName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'cities': {'key': 'cities', 'type': '[AvailableProvidersListCity]'}, + } + + def __init__( + self, + *, + state_name: Optional[str] = None, + providers: Optional[List[str]] = None, + cities: Optional[List["AvailableProvidersListCity"]] = None, + **kwargs + ): + """ + :keyword state_name: The state name. + :paramtype state_name: str + :keyword providers: A list of Internet service providers. + :paramtype providers: list[str] + :keyword cities: List of available cities or towns in the state. + :paramtype cities: list[~azure.mgmt.network.v2021_08_01.models.AvailableProvidersListCity] + """ + super(AvailableProvidersListState, self).__init__(**kwargs) + self.state_name = state_name + self.providers = providers + self.cities = cities + + +class AvailableServiceAlias(msrest.serialization.Model): + """The available service alias. + + :ivar name: The name of the service alias. + :vartype name: str + :ivar id: The ID of the service alias. + :vartype id: str + :ivar type: The type of the resource. + :vartype type: str + :ivar resource_name: The resource name of the service alias. + :vartype resource_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None, + resource_name: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the service alias. + :paramtype name: str + :keyword id: The ID of the service alias. + :paramtype id: str + :keyword type: The type of the resource. + :paramtype type: str + :keyword resource_name: The resource name of the service alias. + :paramtype resource_name: str + """ + super(AvailableServiceAlias, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.resource_name = resource_name + + +class AvailableServiceAliasesResult(msrest.serialization.Model): + """An array of available service aliases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: An array of available service aliases. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.AvailableServiceAlias] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableServiceAlias]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AvailableServiceAlias"]] = None, + **kwargs + ): + """ + :keyword value: An array of available service aliases. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.AvailableServiceAlias] + """ + super(AvailableServiceAliasesResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AzureAsyncOperationResult(msrest.serialization.Model): + """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. + + :ivar status: Status of the Azure async operation. Possible values include: "InProgress", + "Succeeded", "Failed". + :vartype status: str or ~azure.mgmt.network.v2021_08_01.models.NetworkOperationStatus + :ivar error: Details of the error occurred during specified asynchronous operation. + :vartype error: ~azure.mgmt.network.v2021_08_01.models.Error + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "NetworkOperationStatus"]] = None, + error: Optional["Error"] = None, + **kwargs + ): + """ + :keyword status: Status of the Azure async operation. Possible values include: "InProgress", + "Succeeded", "Failed". + :paramtype status: str or ~azure.mgmt.network.v2021_08_01.models.NetworkOperationStatus + :keyword error: Details of the error occurred during specified asynchronous operation. + :paramtype error: ~azure.mgmt.network.v2021_08_01.models.Error + """ + super(AzureAsyncOperationResult, self).__init__(**kwargs) + self.status = status + self.error = error + + +class AzureFirewall(Resource): + """Azure Firewall resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar zones: A list of availability zones denoting where the resource needs to come from. + :vartype zones: list[str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar application_rule_collections: Collection of application rule collections used by Azure + Firewall. + :vartype application_rule_collections: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallApplicationRuleCollection] + :ivar nat_rule_collections: Collection of NAT rule collections used by Azure Firewall. + :vartype nat_rule_collections: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallNatRuleCollection] + :ivar network_rule_collections: Collection of network rule collections used by Azure Firewall. + :vartype network_rule_collections: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallNetworkRuleCollection] + :ivar ip_configurations: IP configuration of the Azure Firewall resource. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallIPConfiguration] + :ivar management_ip_configuration: IP configuration of the Azure Firewall used for management + traffic. + :vartype management_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallIPConfiguration + :ivar provisioning_state: The provisioning state of the Azure firewall resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar threat_intel_mode: The operation mode for Threat Intelligence. Possible values include: + "Alert", "Deny", "Off". + :vartype threat_intel_mode: str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallThreatIntelMode + :ivar virtual_hub: The virtualHub to which the firewall belongs. + :vartype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar firewall_policy: The firewallPolicy associated with this azure firewall. + :vartype firewall_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar hub_ip_addresses: IP addresses associated with AzureFirewall. + :vartype hub_ip_addresses: ~azure.mgmt.network.v2021_08_01.models.HubIPAddresses + :ivar ip_groups: IpGroups associated with AzureFirewall. + :vartype ip_groups: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallIpGroups] + :ivar sku: The Azure Firewall Resource SKU. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.AzureFirewallSku + :ivar additional_properties: The additional properties used to further config this azure + firewall. + :vartype additional_properties: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'ip_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}'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'application_rule_collections': {'key': 'properties.applicationRuleCollections', 'type': '[AzureFirewallApplicationRuleCollection]'}, + 'nat_rule_collections': {'key': 'properties.natRuleCollections', 'type': '[AzureFirewallNatRuleCollection]'}, + 'network_rule_collections': {'key': 'properties.networkRuleCollections', 'type': '[AzureFirewallNetworkRuleCollection]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[AzureFirewallIPConfiguration]'}, + 'management_ip_configuration': {'key': 'properties.managementIpConfiguration', 'type': 'AzureFirewallIPConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'threat_intel_mode': {'key': 'properties.threatIntelMode', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'hub_ip_addresses': {'key': 'properties.hubIPAddresses', 'type': 'HubIPAddresses'}, + 'ip_groups': {'key': 'properties.ipGroups', 'type': '[AzureFirewallIpGroups]'}, + 'sku': {'key': 'properties.sku', 'type': 'AzureFirewallSku'}, + 'additional_properties': {'key': 'properties.additionalProperties', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + zones: Optional[List[str]] = None, + application_rule_collections: Optional[List["AzureFirewallApplicationRuleCollection"]] = None, + nat_rule_collections: Optional[List["AzureFirewallNatRuleCollection"]] = None, + network_rule_collections: Optional[List["AzureFirewallNetworkRuleCollection"]] = None, + ip_configurations: Optional[List["AzureFirewallIPConfiguration"]] = None, + management_ip_configuration: Optional["AzureFirewallIPConfiguration"] = None, + threat_intel_mode: Optional[Union[str, "AzureFirewallThreatIntelMode"]] = None, + virtual_hub: Optional["SubResource"] = None, + firewall_policy: Optional["SubResource"] = None, + hub_ip_addresses: Optional["HubIPAddresses"] = None, + sku: Optional["AzureFirewallSku"] = None, + additional_properties: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword zones: A list of availability zones denoting where the resource needs to come from. + :paramtype zones: list[str] + :keyword application_rule_collections: Collection of application rule collections used by Azure + Firewall. + :paramtype application_rule_collections: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallApplicationRuleCollection] + :keyword nat_rule_collections: Collection of NAT rule collections used by Azure Firewall. + :paramtype nat_rule_collections: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallNatRuleCollection] + :keyword network_rule_collections: Collection of network rule collections used by Azure + Firewall. + :paramtype network_rule_collections: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallNetworkRuleCollection] + :keyword ip_configurations: IP configuration of the Azure Firewall resource. + :paramtype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallIPConfiguration] + :keyword management_ip_configuration: IP configuration of the Azure Firewall used for + management traffic. + :paramtype management_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallIPConfiguration + :keyword threat_intel_mode: The operation mode for Threat Intelligence. Possible values + include: "Alert", "Deny", "Off". + :paramtype threat_intel_mode: str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallThreatIntelMode + :keyword virtual_hub: The virtualHub to which the firewall belongs. + :paramtype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword firewall_policy: The firewallPolicy associated with this azure firewall. + :paramtype firewall_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword hub_ip_addresses: IP addresses associated with AzureFirewall. + :paramtype hub_ip_addresses: ~azure.mgmt.network.v2021_08_01.models.HubIPAddresses + :keyword sku: The Azure Firewall Resource SKU. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.AzureFirewallSku + :keyword additional_properties: The additional properties used to further config this azure + firewall. + :paramtype additional_properties: dict[str, str] + """ + super(AzureFirewall, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.zones = zones + self.etag = None + self.application_rule_collections = application_rule_collections + self.nat_rule_collections = nat_rule_collections + self.network_rule_collections = network_rule_collections + self.ip_configurations = ip_configurations + self.management_ip_configuration = management_ip_configuration + self.provisioning_state = None + self.threat_intel_mode = threat_intel_mode + self.virtual_hub = virtual_hub + self.firewall_policy = firewall_policy + self.hub_ip_addresses = hub_ip_addresses + self.ip_groups = None + self.sku = sku + self.additional_properties = additional_properties + + +class AzureFirewallApplicationRule(msrest.serialization.Model): + """Properties of an application rule. + + :ivar name: Name of the application rule. + :vartype name: str + :ivar description: Description of the rule. + :vartype description: str + :ivar source_addresses: List of source IP addresses for this rule. + :vartype source_addresses: list[str] + :ivar protocols: Array of ApplicationRuleProtocols. + :vartype protocols: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallApplicationRuleProtocol] + :ivar target_fqdns: List of FQDNs for this rule. + :vartype target_fqdns: list[str] + :ivar fqdn_tags: List of FQDN Tags for this rule. + :vartype fqdn_tags: list[str] + :ivar source_ip_groups: List of source IpGroups for this rule. + :vartype source_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[AzureFirewallApplicationRuleProtocol]'}, + 'target_fqdns': {'key': 'targetFqdns', 'type': '[str]'}, + 'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + source_addresses: Optional[List[str]] = None, + protocols: Optional[List["AzureFirewallApplicationRuleProtocol"]] = None, + target_fqdns: Optional[List[str]] = None, + fqdn_tags: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword name: Name of the application rule. + :paramtype name: str + :keyword description: Description of the rule. + :paramtype description: str + :keyword source_addresses: List of source IP addresses for this rule. + :paramtype source_addresses: list[str] + :keyword protocols: Array of ApplicationRuleProtocols. + :paramtype protocols: + list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallApplicationRuleProtocol] + :keyword target_fqdns: List of FQDNs for this rule. + :paramtype target_fqdns: list[str] + :keyword fqdn_tags: List of FQDN Tags for this rule. + :paramtype fqdn_tags: list[str] + :keyword source_ip_groups: List of source IpGroups for this rule. + :paramtype source_ip_groups: list[str] + """ + super(AzureFirewallApplicationRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.source_addresses = source_addresses + self.protocols = protocols + self.target_fqdns = target_fqdns + self.fqdn_tags = fqdn_tags + self.source_ip_groups = source_ip_groups + + +class AzureFirewallApplicationRuleCollection(SubResource): + """Application rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the Azure firewall. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar priority: Priority of the application rule collection resource. + :vartype priority: int + :ivar action: The action type of a rule collection. + :vartype action: ~azure.mgmt.network.v2021_08_01.models.AzureFirewallRCAction + :ivar rules: Collection of rules used by a application rule collection. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallApplicationRule] + :ivar provisioning_state: The provisioning state of the application rule collection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallApplicationRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["AzureFirewallRCAction"] = None, + rules: Optional[List["AzureFirewallApplicationRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :paramtype name: str + :keyword priority: Priority of the application rule collection resource. + :paramtype priority: int + :keyword action: The action type of a rule collection. + :paramtype action: ~azure.mgmt.network.v2021_08_01.models.AzureFirewallRCAction + :keyword rules: Collection of rules used by a application rule collection. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallApplicationRule] + """ + super(AzureFirewallApplicationRuleCollection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.priority = priority + self.action = action + self.rules = rules + self.provisioning_state = None + + +class AzureFirewallApplicationRuleProtocol(msrest.serialization.Model): + """Properties of the application rule protocol. + + :ivar protocol_type: Protocol type. Possible values include: "Http", "Https", "Mssql". + :vartype protocol_type: str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallApplicationRuleProtocolType + :ivar port: Port number for the protocol, cannot be greater than 64000. This field is optional. + :vartype port: int + """ + + _validation = { + 'port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + protocol_type: Optional[Union[str, "AzureFirewallApplicationRuleProtocolType"]] = None, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword protocol_type: Protocol type. Possible values include: "Http", "Https", "Mssql". + :paramtype protocol_type: str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallApplicationRuleProtocolType + :keyword port: Port number for the protocol, cannot be greater than 64000. This field is + optional. + :paramtype port: int + """ + super(AzureFirewallApplicationRuleProtocol, self).__init__(**kwargs) + self.protocol_type = protocol_type + self.port = port + + +class AzureFirewallFqdnTag(Resource): + """Azure Firewall FQDN Tag Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the Azure firewall FQDN tag resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar fqdn_tag_name: The name of this FQDN Tag. + :vartype fqdn_tag_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'fqdn_tag_name': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'fqdn_tag_name': {'key': 'properties.fqdnTagName', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(AzureFirewallFqdnTag, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.provisioning_state = None + self.fqdn_tag_name = None + + +class AzureFirewallFqdnTagListResult(msrest.serialization.Model): + """Response for ListAzureFirewallFqdnTags API service call. + + :ivar value: List of Azure Firewall FQDN Tags in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallFqdnTag] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureFirewallFqdnTag]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AzureFirewallFqdnTag"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Azure Firewall FQDN Tags in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallFqdnTag] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(AzureFirewallFqdnTagListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AzureFirewallIPConfiguration(SubResource): + """IP configuration of an Azure Firewall. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar private_ip_address: The Firewall Internal Load Balancer IP to be used as the next hop in + User Defined Routes. + :vartype private_ip_address: str + :ivar subnet: Reference to the subnet resource. This resource must be named + 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar public_ip_address: Reference to the PublicIP resource. This field is a mandatory input if + subnet is not null. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the Azure firewall IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + subnet: Optional["SubResource"] = None, + public_ip_address: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the resource that is unique within a resource group. This name can be + used to access the resource. + :paramtype name: str + :keyword subnet: Reference to the subnet resource. This resource must be named + 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword public_ip_address: Reference to the PublicIP resource. This field is a mandatory input + if subnet is not null. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(AzureFirewallIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = None + self.subnet = subnet + self.public_ip_address = public_ip_address + self.provisioning_state = None + + +class AzureFirewallIpGroups(msrest.serialization.Model): + """IpGroups associated with azure firewall. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar change_number: The iteration number. + :vartype change_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'change_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(AzureFirewallIpGroups, self).__init__(**kwargs) + self.id = None + self.change_number = None + + +class AzureFirewallListResult(msrest.serialization.Model): + """Response for ListAzureFirewalls API service call. + + :ivar value: List of Azure Firewalls in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewall] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureFirewall]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AzureFirewall"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Azure Firewalls in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewall] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(AzureFirewallListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AzureFirewallNatRCAction(msrest.serialization.Model): + """AzureFirewall NAT Rule Collection Action. + + :ivar type: The type of action. Possible values include: "Snat", "Dnat". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.AzureFirewallNatRCActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "AzureFirewallNatRCActionType"]] = None, + **kwargs + ): + """ + :keyword type: The type of action. Possible values include: "Snat", "Dnat". + :paramtype type: str or ~azure.mgmt.network.v2021_08_01.models.AzureFirewallNatRCActionType + """ + super(AzureFirewallNatRCAction, self).__init__(**kwargs) + self.type = type + + +class AzureFirewallNatRule(msrest.serialization.Model): + """Properties of a NAT rule. + + :ivar name: Name of the NAT rule. + :vartype name: str + :ivar description: Description of the rule. + :vartype description: str + :ivar source_addresses: List of source IP addresses for this rule. + :vartype source_addresses: list[str] + :ivar destination_addresses: List of destination IP addresses for this rule. Supports IP + ranges, prefixes, and service tags. + :vartype destination_addresses: list[str] + :ivar destination_ports: List of destination ports. + :vartype destination_ports: list[str] + :ivar protocols: Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + :vartype protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallNetworkRuleProtocol] + :ivar translated_address: The translated address for this NAT rule. + :vartype translated_address: str + :ivar translated_port: The translated port for this NAT rule. + :vartype translated_port: str + :ivar translated_fqdn: The translated FQDN for this NAT rule. + :vartype translated_fqdn: str + :ivar source_ip_groups: List of source IpGroups for this rule. + :vartype source_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[str]'}, + 'translated_address': {'key': 'translatedAddress', 'type': 'str'}, + 'translated_port': {'key': 'translatedPort', 'type': 'str'}, + 'translated_fqdn': {'key': 'translatedFqdn', 'type': 'str'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + protocols: Optional[List[Union[str, "AzureFirewallNetworkRuleProtocol"]]] = None, + translated_address: Optional[str] = None, + translated_port: Optional[str] = None, + translated_fqdn: Optional[str] = None, + source_ip_groups: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword name: Name of the NAT rule. + :paramtype name: str + :keyword description: Description of the rule. + :paramtype description: str + :keyword source_addresses: List of source IP addresses for this rule. + :paramtype source_addresses: list[str] + :keyword destination_addresses: List of destination IP addresses for this rule. Supports IP + ranges, prefixes, and service tags. + :paramtype destination_addresses: list[str] + :keyword destination_ports: List of destination ports. + :paramtype destination_ports: list[str] + :keyword protocols: Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + :paramtype protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallNetworkRuleProtocol] + :keyword translated_address: The translated address for this NAT rule. + :paramtype translated_address: str + :keyword translated_port: The translated port for this NAT rule. + :paramtype translated_port: str + :keyword translated_fqdn: The translated FQDN for this NAT rule. + :paramtype translated_fqdn: str + :keyword source_ip_groups: List of source IpGroups for this rule. + :paramtype source_ip_groups: list[str] + """ + super(AzureFirewallNatRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.protocols = protocols + self.translated_address = translated_address + self.translated_port = translated_port + self.translated_fqdn = translated_fqdn + self.source_ip_groups = source_ip_groups + + +class AzureFirewallNatRuleCollection(SubResource): + """NAT rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the Azure firewall. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar priority: Priority of the NAT rule collection resource. + :vartype priority: int + :ivar action: The action type of a NAT rule collection. + :vartype action: ~azure.mgmt.network.v2021_08_01.models.AzureFirewallNatRCAction + :ivar rules: Collection of rules used by a NAT rule collection. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallNatRule] + :ivar provisioning_state: The provisioning state of the NAT rule collection resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallNatRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallNatRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["AzureFirewallNatRCAction"] = None, + rules: Optional[List["AzureFirewallNatRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :paramtype name: str + :keyword priority: Priority of the NAT rule collection resource. + :paramtype priority: int + :keyword action: The action type of a NAT rule collection. + :paramtype action: ~azure.mgmt.network.v2021_08_01.models.AzureFirewallNatRCAction + :keyword rules: Collection of rules used by a NAT rule collection. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallNatRule] + """ + super(AzureFirewallNatRuleCollection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.priority = priority + self.action = action + self.rules = rules + self.provisioning_state = None + + +class AzureFirewallNetworkRule(msrest.serialization.Model): + """Properties of the network rule. + + :ivar name: Name of the network rule. + :vartype name: str + :ivar description: Description of the rule. + :vartype description: str + :ivar protocols: Array of AzureFirewallNetworkRuleProtocols. + :vartype protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallNetworkRuleProtocol] + :ivar source_addresses: List of source IP addresses for this rule. + :vartype source_addresses: list[str] + :ivar destination_addresses: List of destination IP addresses. + :vartype destination_addresses: list[str] + :ivar destination_ports: List of destination ports. + :vartype destination_ports: list[str] + :ivar destination_fqdns: List of destination FQDNs. + :vartype destination_fqdns: list[str] + :ivar source_ip_groups: List of source IpGroups for this rule. + :vartype source_ip_groups: list[str] + :ivar destination_ip_groups: List of destination IpGroups for this rule. + :vartype destination_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocols': {'key': 'protocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'destination_fqdns': {'key': 'destinationFqdns', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + protocols: Optional[List[Union[str, "AzureFirewallNetworkRuleProtocol"]]] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + destination_fqdns: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + destination_ip_groups: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword name: Name of the network rule. + :paramtype name: str + :keyword description: Description of the rule. + :paramtype description: str + :keyword protocols: Array of AzureFirewallNetworkRuleProtocols. + :paramtype protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallNetworkRuleProtocol] + :keyword source_addresses: List of source IP addresses for this rule. + :paramtype source_addresses: list[str] + :keyword destination_addresses: List of destination IP addresses. + :paramtype destination_addresses: list[str] + :keyword destination_ports: List of destination ports. + :paramtype destination_ports: list[str] + :keyword destination_fqdns: List of destination FQDNs. + :paramtype destination_fqdns: list[str] + :keyword source_ip_groups: List of source IpGroups for this rule. + :paramtype source_ip_groups: list[str] + :keyword destination_ip_groups: List of destination IpGroups for this rule. + :paramtype destination_ip_groups: list[str] + """ + super(AzureFirewallNetworkRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.protocols = protocols + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.destination_fqdns = destination_fqdns + self.source_ip_groups = source_ip_groups + self.destination_ip_groups = destination_ip_groups + + +class AzureFirewallNetworkRuleCollection(SubResource): + """Network rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the Azure firewall. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar priority: Priority of the network rule collection resource. + :vartype priority: int + :ivar action: The action type of a rule collection. + :vartype action: ~azure.mgmt.network.v2021_08_01.models.AzureFirewallRCAction + :ivar rules: Collection of rules used by a network rule collection. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallNetworkRule] + :ivar provisioning_state: The provisioning state of the network rule collection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallNetworkRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["AzureFirewallRCAction"] = None, + rules: Optional[List["AzureFirewallNetworkRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :paramtype name: str + :keyword priority: Priority of the network rule collection resource. + :paramtype priority: int + :keyword action: The action type of a rule collection. + :paramtype action: ~azure.mgmt.network.v2021_08_01.models.AzureFirewallRCAction + :keyword rules: Collection of rules used by a network rule collection. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallNetworkRule] + """ + super(AzureFirewallNetworkRuleCollection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.priority = priority + self.action = action + self.rules = rules + self.provisioning_state = None + + +class AzureFirewallPublicIPAddress(msrest.serialization.Model): + """Public IP Address associated with azure firewall. + + :ivar address: Public IP Address value. + :vartype address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + **kwargs + ): + """ + :keyword address: Public IP Address value. + :paramtype address: str + """ + super(AzureFirewallPublicIPAddress, self).__init__(**kwargs) + self.address = address + + +class AzureFirewallRCAction(msrest.serialization.Model): + """Properties of the AzureFirewallRCAction. + + :ivar type: The type of action. Possible values include: "Allow", "Deny". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.AzureFirewallRCActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "AzureFirewallRCActionType"]] = None, + **kwargs + ): + """ + :keyword type: The type of action. Possible values include: "Allow", "Deny". + :paramtype type: str or ~azure.mgmt.network.v2021_08_01.models.AzureFirewallRCActionType + """ + super(AzureFirewallRCAction, self).__init__(**kwargs) + self.type = type + + +class AzureFirewallSku(msrest.serialization.Model): + """SKU of an Azure Firewall. + + :ivar name: Name of an Azure Firewall SKU. Possible values include: "AZFW_VNet", "AZFW_Hub". + :vartype name: str or ~azure.mgmt.network.v2021_08_01.models.AzureFirewallSkuName + :ivar tier: Tier of an Azure Firewall. Possible values include: "Standard", "Premium", "Basic". + :vartype tier: str or ~azure.mgmt.network.v2021_08_01.models.AzureFirewallSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "AzureFirewallSkuName"]] = None, + tier: Optional[Union[str, "AzureFirewallSkuTier"]] = None, + **kwargs + ): + """ + :keyword name: Name of an Azure Firewall SKU. Possible values include: "AZFW_VNet", "AZFW_Hub". + :paramtype name: str or ~azure.mgmt.network.v2021_08_01.models.AzureFirewallSkuName + :keyword tier: Tier of an Azure Firewall. Possible values include: "Standard", "Premium", + "Basic". + :paramtype tier: str or ~azure.mgmt.network.v2021_08_01.models.AzureFirewallSkuTier + """ + super(AzureFirewallSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class AzureReachabilityReport(msrest.serialization.Model): + """Azure reachability report details. + + All required parameters must be populated in order to send to Azure. + + :ivar aggregation_level: Required. The aggregation level of Azure reachability report. Can be + Country, State or City. + :vartype aggregation_level: str + :ivar provider_location: Required. Parameters that define a geographic location. + :vartype provider_location: + ~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportLocation + :ivar reachability_report: Required. List of Azure reachability report items. + :vartype reachability_report: + list[~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportItem] + """ + + _validation = { + 'aggregation_level': {'required': True}, + 'provider_location': {'required': True}, + 'reachability_report': {'required': True}, + } + + _attribute_map = { + 'aggregation_level': {'key': 'aggregationLevel', 'type': 'str'}, + 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, + 'reachability_report': {'key': 'reachabilityReport', 'type': '[AzureReachabilityReportItem]'}, + } + + def __init__( + self, + *, + aggregation_level: str, + provider_location: "AzureReachabilityReportLocation", + reachability_report: List["AzureReachabilityReportItem"], + **kwargs + ): + """ + :keyword aggregation_level: Required. The aggregation level of Azure reachability report. Can + be Country, State or City. + :paramtype aggregation_level: str + :keyword provider_location: Required. Parameters that define a geographic location. + :paramtype provider_location: + ~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportLocation + :keyword reachability_report: Required. List of Azure reachability report items. + :paramtype reachability_report: + list[~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportItem] + """ + super(AzureReachabilityReport, self).__init__(**kwargs) + self.aggregation_level = aggregation_level + self.provider_location = provider_location + self.reachability_report = reachability_report + + +class AzureReachabilityReportItem(msrest.serialization.Model): + """Azure reachability report details for a given provider location. + + :ivar provider: The Internet service provider. + :vartype provider: str + :ivar azure_location: The Azure region. + :vartype azure_location: str + :ivar latencies: List of latency details for each of the time series. + :vartype latencies: + list[~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportLatencyInfo] + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'azure_location': {'key': 'azureLocation', 'type': 'str'}, + 'latencies': {'key': 'latencies', 'type': '[AzureReachabilityReportLatencyInfo]'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + azure_location: Optional[str] = None, + latencies: Optional[List["AzureReachabilityReportLatencyInfo"]] = None, + **kwargs + ): + """ + :keyword provider: The Internet service provider. + :paramtype provider: str + :keyword azure_location: The Azure region. + :paramtype azure_location: str + :keyword latencies: List of latency details for each of the time series. + :paramtype latencies: + list[~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportLatencyInfo] + """ + super(AzureReachabilityReportItem, self).__init__(**kwargs) + self.provider = provider + self.azure_location = azure_location + self.latencies = latencies + + +class AzureReachabilityReportLatencyInfo(msrest.serialization.Model): + """Details on latency for a time series. + + :ivar time_stamp: The time stamp. + :vartype time_stamp: ~datetime.datetime + :ivar score: The relative latency score between 1 and 100, higher values indicating a faster + connection. + :vartype score: int + """ + + _validation = { + 'score': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'score': {'key': 'score', 'type': 'int'}, + } + + def __init__( + self, + *, + time_stamp: Optional[datetime.datetime] = None, + score: Optional[int] = None, + **kwargs + ): + """ + :keyword time_stamp: The time stamp. + :paramtype time_stamp: ~datetime.datetime + :keyword score: The relative latency score between 1 and 100, higher values indicating a faster + connection. + :paramtype score: int + """ + super(AzureReachabilityReportLatencyInfo, self).__init__(**kwargs) + self.time_stamp = time_stamp + self.score = score + + +class AzureReachabilityReportLocation(msrest.serialization.Model): + """Parameters that define a geographic location. + + All required parameters must be populated in order to send to Azure. + + :ivar country: Required. The name of the country. + :vartype country: str + :ivar state: The name of the state. + :vartype state: str + :ivar city: The name of the city or town. + :vartype city: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'country': {'key': 'country', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + } + + def __init__( + self, + *, + country: str, + state: Optional[str] = None, + city: Optional[str] = None, + **kwargs + ): + """ + :keyword country: Required. The name of the country. + :paramtype country: str + :keyword state: The name of the state. + :paramtype state: str + :keyword city: The name of the city or town. + :paramtype city: str + """ + super(AzureReachabilityReportLocation, self).__init__(**kwargs) + self.country = country + self.state = state + self.city = city + + +class AzureReachabilityReportParameters(msrest.serialization.Model): + """Geographic and time constraints for Azure reachability report. + + All required parameters must be populated in order to send to Azure. + + :ivar provider_location: Required. Parameters that define a geographic location. + :vartype provider_location: + ~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportLocation + :ivar providers: List of Internet service providers. + :vartype providers: list[str] + :ivar azure_locations: Optional Azure regions to scope the query to. + :vartype azure_locations: list[str] + :ivar start_time: Required. The start time for the Azure reachability report. + :vartype start_time: ~datetime.datetime + :ivar end_time: Required. The end time for the Azure reachability report. + :vartype end_time: ~datetime.datetime + """ + + _validation = { + 'provider_location': {'required': True}, + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + provider_location: "AzureReachabilityReportLocation", + start_time: datetime.datetime, + end_time: datetime.datetime, + providers: Optional[List[str]] = None, + azure_locations: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword provider_location: Required. Parameters that define a geographic location. + :paramtype provider_location: + ~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportLocation + :keyword providers: List of Internet service providers. + :paramtype providers: list[str] + :keyword azure_locations: Optional Azure regions to scope the query to. + :paramtype azure_locations: list[str] + :keyword start_time: Required. The start time for the Azure reachability report. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Required. The end time for the Azure reachability report. + :paramtype end_time: ~datetime.datetime + """ + super(AzureReachabilityReportParameters, self).__init__(**kwargs) + self.provider_location = provider_location + self.providers = providers + self.azure_locations = azure_locations + self.start_time = start_time + self.end_time = end_time + + +class AzureWebCategory(msrest.serialization.Model): + """Azure Web Category Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar group: The name of the group that the category belongs to. + :vartype group: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'group': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'group': {'key': 'properties.group', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + """ + super(AzureWebCategory, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + self.etag = None + self.group = None + + +class AzureWebCategoryListResult(msrest.serialization.Model): + """Response for ListAzureWebCategories API service call. + + :ivar value: List of Azure Web Categories for a given Subscription. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.AzureWebCategory] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureWebCategory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AzureWebCategory"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Azure Web Categories for a given Subscription. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.AzureWebCategory] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(AzureWebCategoryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BackendAddressInboundNatRulePortMappings(msrest.serialization.Model): + """The response for a QueryInboundNatRulePortMapping API. + + :ivar inbound_nat_rule_port_mappings: Collection of inbound NAT rule port mappings. + :vartype inbound_nat_rule_port_mappings: + list[~azure.mgmt.network.v2021_08_01.models.InboundNatRulePortMapping] + """ + + _attribute_map = { + 'inbound_nat_rule_port_mappings': {'key': 'inboundNatRulePortMappings', 'type': '[InboundNatRulePortMapping]'}, + } + + def __init__( + self, + *, + inbound_nat_rule_port_mappings: Optional[List["InboundNatRulePortMapping"]] = None, + **kwargs + ): + """ + :keyword inbound_nat_rule_port_mappings: Collection of inbound NAT rule port mappings. + :paramtype inbound_nat_rule_port_mappings: + list[~azure.mgmt.network.v2021_08_01.models.InboundNatRulePortMapping] + """ + super(BackendAddressInboundNatRulePortMappings, self).__init__(**kwargs) + self.inbound_nat_rule_port_mappings = inbound_nat_rule_port_mappings + + +class BackendAddressPool(SubResource): + """Pool of backend IP addresses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the set of backend address pools + used by the load balancer. This name can be used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar location: The location of the backend address pool. + :vartype location: str + :ivar tunnel_interfaces: An array of gateway load balancer tunnel interfaces. + :vartype tunnel_interfaces: + list[~azure.mgmt.network.v2021_08_01.models.GatewayLoadBalancerTunnelInterface] + :ivar load_balancer_backend_addresses: An array of backend addresses. + :vartype load_balancer_backend_addresses: + list[~azure.mgmt.network.v2021_08_01.models.LoadBalancerBackendAddress] + :ivar backend_ip_configurations: An array of references to IP addresses defined in network + interfaces. + :vartype backend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration] + :ivar load_balancing_rules: An array of references to load balancing rules that use this + backend address pool. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar outbound_rule: A reference to an outbound rule that uses this backend address pool. + :vartype outbound_rule: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar outbound_rules: An array of references to outbound rules that use this backend address + pool. + :vartype outbound_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar inbound_nat_rules: An array of references to inbound NAT rules that use this backend + address pool. + :vartype inbound_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the backend address pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar drain_period_in_seconds: Amount of seconds Load Balancer waits for before sending RESET + to client and backend address. + :vartype drain_period_in_seconds: int + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configurations': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'outbound_rule': {'readonly': True}, + 'outbound_rules': {'readonly': True}, + 'inbound_nat_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'tunnel_interfaces': {'key': 'properties.tunnelInterfaces', 'type': '[GatewayLoadBalancerTunnelInterface]'}, + 'load_balancer_backend_addresses': {'key': 'properties.loadBalancerBackendAddresses', 'type': '[LoadBalancerBackendAddress]'}, + 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'outbound_rule': {'key': 'properties.outboundRule', 'type': 'SubResource'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[SubResource]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'drain_period_in_seconds': {'key': 'properties.drainPeriodInSeconds', 'type': 'int'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + location: Optional[str] = None, + tunnel_interfaces: Optional[List["GatewayLoadBalancerTunnelInterface"]] = None, + load_balancer_backend_addresses: Optional[List["LoadBalancerBackendAddress"]] = None, + drain_period_in_seconds: Optional[int] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the set of backend address pools + used by the load balancer. This name can be used to access the resource. + :paramtype name: str + :keyword location: The location of the backend address pool. + :paramtype location: str + :keyword tunnel_interfaces: An array of gateway load balancer tunnel interfaces. + :paramtype tunnel_interfaces: + list[~azure.mgmt.network.v2021_08_01.models.GatewayLoadBalancerTunnelInterface] + :keyword load_balancer_backend_addresses: An array of backend addresses. + :paramtype load_balancer_backend_addresses: + list[~azure.mgmt.network.v2021_08_01.models.LoadBalancerBackendAddress] + :keyword drain_period_in_seconds: Amount of seconds Load Balancer waits for before sending + RESET to client and backend address. + :paramtype drain_period_in_seconds: int + """ + super(BackendAddressPool, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.location = location + self.tunnel_interfaces = tunnel_interfaces + self.load_balancer_backend_addresses = load_balancer_backend_addresses + self.backend_ip_configurations = None + self.load_balancing_rules = None + self.outbound_rule = None + self.outbound_rules = None + self.inbound_nat_rules = None + self.provisioning_state = None + self.drain_period_in_seconds = drain_period_in_seconds + + +class BastionActiveSession(msrest.serialization.Model): + """The session detail for a target. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar session_id: A unique id for the session. + :vartype session_id: str + :ivar start_time: The time when the session started. + :vartype start_time: any + :ivar target_subscription_id: The subscription id for the target virtual machine. + :vartype target_subscription_id: str + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar target_host_name: The host name of the target. + :vartype target_host_name: str + :ivar target_resource_group: The resource group of the target. + :vartype target_resource_group: str + :ivar user_name: The user name who is active on this session. + :vartype user_name: str + :ivar target_ip_address: The IP Address of the target. + :vartype target_ip_address: str + :ivar protocol: The protocol used to connect to the target. Possible values include: "SSH", + "RDP". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.BastionConnectProtocol + :ivar target_resource_id: The resource id of the target. + :vartype target_resource_id: str + :ivar session_duration_in_mins: Duration in mins the session has been active. + :vartype session_duration_in_mins: float + """ + + _validation = { + 'session_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'target_subscription_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'target_host_name': {'readonly': True}, + 'target_resource_group': {'readonly': True}, + 'user_name': {'readonly': True}, + 'target_ip_address': {'readonly': True}, + 'protocol': {'readonly': True}, + 'target_resource_id': {'readonly': True}, + 'session_duration_in_mins': {'readonly': True}, + } + + _attribute_map = { + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'object'}, + 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_host_name': {'key': 'targetHostName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'target_ip_address': {'key': 'targetIpAddress', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'session_duration_in_mins': {'key': 'sessionDurationInMins', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BastionActiveSession, self).__init__(**kwargs) + self.session_id = None + self.start_time = None + self.target_subscription_id = None + self.resource_type = None + self.target_host_name = None + self.target_resource_group = None + self.user_name = None + self.target_ip_address = None + self.protocol = None + self.target_resource_id = None + self.session_duration_in_mins = None + + +class BastionActiveSessionListResult(msrest.serialization.Model): + """Response for GetActiveSessions. + + :ivar value: List of active sessions on the bastion. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.BastionActiveSession] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionActiveSession]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BastionActiveSession"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of active sessions on the bastion. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.BastionActiveSession] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(BastionActiveSessionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BastionHost(Resource): + """Bastion Host resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar sku: The sku of this Bastion Host. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.Sku + :ivar ip_configurations: IP configuration of the Bastion Host resource. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.BastionHostIPConfiguration] + :ivar dns_name: FQDN for the endpoint on which bastion host is accessible. + :vartype dns_name: str + :ivar provisioning_state: The provisioning state of the bastion host resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar scale_units: The scale units for the Bastion Host resource. + :vartype scale_units: int + :ivar disable_copy_paste: Enable/Disable Copy/Paste feature of the Bastion Host resource. + :vartype disable_copy_paste: bool + :ivar enable_file_copy: Enable/Disable File Copy feature of the Bastion Host resource. + :vartype enable_file_copy: bool + :ivar enable_ip_connect: Enable/Disable IP Connect feature of the Bastion Host resource. + :vartype enable_ip_connect: bool + :ivar enable_shareable_link: Enable/Disable Shareable Link of the Bastion Host resource. + :vartype enable_shareable_link: bool + :ivar enable_tunneling: Enable/Disable Tunneling feature of the Bastion Host resource. + :vartype enable_tunneling: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'scale_units': {'maximum': 50, 'minimum': 2}, + } + + _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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[BastionHostIPConfiguration]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'scale_units': {'key': 'properties.scaleUnits', 'type': 'int'}, + 'disable_copy_paste': {'key': 'properties.disableCopyPaste', 'type': 'bool'}, + 'enable_file_copy': {'key': 'properties.enableFileCopy', 'type': 'bool'}, + 'enable_ip_connect': {'key': 'properties.enableIpConnect', 'type': 'bool'}, + 'enable_shareable_link': {'key': 'properties.enableShareableLink', 'type': 'bool'}, + 'enable_tunneling': {'key': 'properties.enableTunneling', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + ip_configurations: Optional[List["BastionHostIPConfiguration"]] = None, + dns_name: Optional[str] = None, + scale_units: Optional[int] = None, + disable_copy_paste: Optional[bool] = False, + enable_file_copy: Optional[bool] = False, + enable_ip_connect: Optional[bool] = False, + enable_shareable_link: Optional[bool] = False, + enable_tunneling: Optional[bool] = False, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword sku: The sku of this Bastion Host. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.Sku + :keyword ip_configurations: IP configuration of the Bastion Host resource. + :paramtype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.BastionHostIPConfiguration] + :keyword dns_name: FQDN for the endpoint on which bastion host is accessible. + :paramtype dns_name: str + :keyword scale_units: The scale units for the Bastion Host resource. + :paramtype scale_units: int + :keyword disable_copy_paste: Enable/Disable Copy/Paste feature of the Bastion Host resource. + :paramtype disable_copy_paste: bool + :keyword enable_file_copy: Enable/Disable File Copy feature of the Bastion Host resource. + :paramtype enable_file_copy: bool + :keyword enable_ip_connect: Enable/Disable IP Connect feature of the Bastion Host resource. + :paramtype enable_ip_connect: bool + :keyword enable_shareable_link: Enable/Disable Shareable Link of the Bastion Host resource. + :paramtype enable_shareable_link: bool + :keyword enable_tunneling: Enable/Disable Tunneling feature of the Bastion Host resource. + :paramtype enable_tunneling: bool + """ + super(BastionHost, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.sku = sku + self.ip_configurations = ip_configurations + self.dns_name = dns_name + self.provisioning_state = None + self.scale_units = scale_units + self.disable_copy_paste = disable_copy_paste + self.enable_file_copy = enable_file_copy + self.enable_ip_connect = enable_ip_connect + self.enable_shareable_link = enable_shareable_link + self.enable_tunneling = enable_tunneling + + +class BastionHostIPConfiguration(SubResource): + """IP configuration of an Bastion Host. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Ip configuration type. + :vartype type: str + :ivar subnet: Reference of the subnet resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar public_ip_address: Reference of the PublicIP resource. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the bastion host IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar private_ip_allocation_method: Private IP allocation method. Possible values include: + "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + subnet: Optional["SubResource"] = None, + public_ip_address: Optional["SubResource"] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the resource that is unique within a resource group. This name can be + used to access the resource. + :paramtype name: str + :keyword subnet: Reference of the subnet resource. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword public_ip_address: Reference of the PublicIP resource. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword private_ip_allocation_method: Private IP allocation method. Possible values include: + "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + """ + super(BastionHostIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.subnet = subnet + self.public_ip_address = public_ip_address + self.provisioning_state = None + self.private_ip_allocation_method = private_ip_allocation_method + + +class BastionHostListResult(msrest.serialization.Model): + """Response for ListBastionHosts API service call. + + :ivar value: List of Bastion Hosts in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.BastionHost] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionHost]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BastionHost"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Bastion Hosts in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.BastionHost] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(BastionHostListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BastionSessionDeleteResult(msrest.serialization.Model): + """Response for DisconnectActiveSessions. + + :ivar value: List of sessions with their corresponding state. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.BastionSessionState] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionSessionState]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BastionSessionState"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of sessions with their corresponding state. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.BastionSessionState] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(BastionSessionDeleteResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BastionSessionState(msrest.serialization.Model): + """The session state detail for a target. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar session_id: A unique id for the session. + :vartype session_id: str + :ivar message: Used for extra information. + :vartype message: str + :ivar state: The state of the session. Disconnected/Failed/NotFound. + :vartype state: str + """ + + _validation = { + 'session_id': {'readonly': True}, + 'message': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BastionSessionState, self).__init__(**kwargs) + self.session_id = None + self.message = None + self.state = None + + +class BastionShareableLink(msrest.serialization.Model): + """Bastion Shareable Link. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar vm: Required. Reference of the virtual machine resource. + :vartype vm: ~azure.mgmt.network.v2021_08_01.models.VM + :ivar bsl: The unique Bastion Shareable Link to the virtual machine. + :vartype bsl: str + :ivar created_at: The time when the link was created. + :vartype created_at: str + :ivar message: Optional field indicating the warning or error message related to the vm in case + of partial failure. + :vartype message: str + """ + + _validation = { + 'vm': {'required': True}, + 'bsl': {'readonly': True}, + 'created_at': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'vm': {'key': 'vm', 'type': 'VM'}, + 'bsl': {'key': 'bsl', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + vm: "VM", + **kwargs + ): + """ + :keyword vm: Required. Reference of the virtual machine resource. + :paramtype vm: ~azure.mgmt.network.v2021_08_01.models.VM + """ + super(BastionShareableLink, self).__init__(**kwargs) + self.vm = vm + self.bsl = None + self.created_at = None + self.message = None + + +class BastionShareableLinkListRequest(msrest.serialization.Model): + """Post request for all the Bastion Shareable Link endpoints. + + :ivar vms: List of VM references. + :vartype vms: list[~azure.mgmt.network.v2021_08_01.models.BastionShareableLink] + """ + + _attribute_map = { + 'vms': {'key': 'vms', 'type': '[BastionShareableLink]'}, + } + + def __init__( + self, + *, + vms: Optional[List["BastionShareableLink"]] = None, + **kwargs + ): + """ + :keyword vms: List of VM references. + :paramtype vms: list[~azure.mgmt.network.v2021_08_01.models.BastionShareableLink] + """ + super(BastionShareableLinkListRequest, self).__init__(**kwargs) + self.vms = vms + + +class BastionShareableLinkListResult(msrest.serialization.Model): + """Response for all the Bastion Shareable Link endpoints. + + :ivar value: List of Bastion Shareable Links for the request. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.BastionShareableLink] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionShareableLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BastionShareableLink"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Bastion Shareable Links for the request. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.BastionShareableLink] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(BastionShareableLinkListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BGPCommunity(msrest.serialization.Model): + """Contains bgp community information offered in Service Community resources. + + :ivar service_supported_region: The region which the service support. e.g. For O365, region is + Global. + :vartype service_supported_region: str + :ivar community_name: The name of the bgp community. e.g. Skype. + :vartype community_name: str + :ivar community_value: The value of the bgp community. For more information: + https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + :vartype community_value: str + :ivar community_prefixes: The prefixes that the bgp community contains. + :vartype community_prefixes: list[str] + :ivar is_authorized_to_use: Customer is authorized to use bgp community or not. + :vartype is_authorized_to_use: bool + :ivar service_group: The service group of the bgp community contains. + :vartype service_group: str + """ + + _attribute_map = { + 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, + 'community_name': {'key': 'communityName', 'type': 'str'}, + 'community_value': {'key': 'communityValue', 'type': 'str'}, + 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, + 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, + 'service_group': {'key': 'serviceGroup', 'type': 'str'}, + } + + def __init__( + self, + *, + service_supported_region: Optional[str] = None, + community_name: Optional[str] = None, + community_value: Optional[str] = None, + community_prefixes: Optional[List[str]] = None, + is_authorized_to_use: Optional[bool] = None, + service_group: Optional[str] = None, + **kwargs + ): + """ + :keyword service_supported_region: The region which the service support. e.g. For O365, region + is Global. + :paramtype service_supported_region: str + :keyword community_name: The name of the bgp community. e.g. Skype. + :paramtype community_name: str + :keyword community_value: The value of the bgp community. For more information: + https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + :paramtype community_value: str + :keyword community_prefixes: The prefixes that the bgp community contains. + :paramtype community_prefixes: list[str] + :keyword is_authorized_to_use: Customer is authorized to use bgp community or not. + :paramtype is_authorized_to_use: bool + :keyword service_group: The service group of the bgp community contains. + :paramtype service_group: str + """ + super(BGPCommunity, self).__init__(**kwargs) + self.service_supported_region = service_supported_region + self.community_name = community_name + self.community_value = community_value + self.community_prefixes = community_prefixes + self.is_authorized_to_use = is_authorized_to_use + self.service_group = service_group + + +class BgpConnection(SubResource): + """Virtual Appliance Site resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the connection. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Connection type. + :vartype type: str + :ivar peer_asn: Peer ASN. + :vartype peer_asn: long + :ivar peer_ip: Peer IP. + :vartype peer_ip: str + :ivar hub_virtual_network_connection: The reference to the HubVirtualNetworkConnection + resource. + :vartype hub_virtual_network_connection: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar connection_state: The current state of the VirtualHub to Peer. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_state: str or ~azure.mgmt.network.v2021_08_01.models.HubBgpConnectionStatus + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + 'connection_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peer_asn': {'key': 'properties.peerAsn', 'type': 'long'}, + 'peer_ip': {'key': 'properties.peerIp', 'type': 'str'}, + 'hub_virtual_network_connection': {'key': 'properties.hubVirtualNetworkConnection', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'connection_state': {'key': 'properties.connectionState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + peer_asn: Optional[int] = None, + peer_ip: Optional[str] = None, + hub_virtual_network_connection: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the connection. + :paramtype name: str + :keyword peer_asn: Peer ASN. + :paramtype peer_asn: long + :keyword peer_ip: Peer IP. + :paramtype peer_ip: str + :keyword hub_virtual_network_connection: The reference to the HubVirtualNetworkConnection + resource. + :paramtype hub_virtual_network_connection: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(BgpConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.peer_asn = peer_asn + self.peer_ip = peer_ip + self.hub_virtual_network_connection = hub_virtual_network_connection + self.provisioning_state = None + self.connection_state = None + + +class BgpPeerStatus(msrest.serialization.Model): + """BGP peer status details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The virtual network gateway's local address. + :vartype local_address: str + :ivar neighbor: The remote BGP peer. + :vartype neighbor: str + :ivar asn: The autonomous system number of the remote BGP peer. + :vartype asn: long + :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", + "Connecting", "Connected". + :vartype state: str or ~azure.mgmt.network.v2021_08_01.models.BgpPeerState + :ivar connected_duration: For how long the peering has been up. + :vartype connected_duration: str + :ivar routes_received: The number of routes learned from this peer. + :vartype routes_received: long + :ivar messages_sent: The number of BGP messages sent. + :vartype messages_sent: long + :ivar messages_received: The number of BGP messages received. + :vartype messages_received: long + """ + + _validation = { + 'local_address': {'readonly': True}, + 'neighbor': {'readonly': True}, + 'asn': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'state': {'readonly': True}, + 'connected_duration': {'readonly': True}, + 'routes_received': {'readonly': True}, + 'messages_sent': {'readonly': True}, + 'messages_received': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'asn': {'key': 'asn', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, + 'routes_received': {'key': 'routesReceived', 'type': 'long'}, + 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, + 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(BgpPeerStatus, self).__init__(**kwargs) + self.local_address = None + self.neighbor = None + self.asn = None + self.state = None + self.connected_duration = None + self.routes_received = None + self.messages_sent = None + self.messages_received = None + + +class BgpPeerStatusListResult(msrest.serialization.Model): + """Response for list BGP peer status API service call. + + :ivar value: List of BGP peers. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.BgpPeerStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, + } + + def __init__( + self, + *, + value: Optional[List["BgpPeerStatus"]] = None, + **kwargs + ): + """ + :keyword value: List of BGP peers. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.BgpPeerStatus] + """ + super(BgpPeerStatusListResult, self).__init__(**kwargs) + self.value = value + + +class BgpServiceCommunity(Resource): + """Service Community Properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar service_name: The name of the bgp community. e.g. Skype. + :vartype service_name: str + :ivar bgp_communities: A list of bgp communities. + :vartype bgp_communities: list[~azure.mgmt.network.v2021_08_01.models.BGPCommunity] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'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}'}, + 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, + 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + service_name: Optional[str] = None, + bgp_communities: Optional[List["BGPCommunity"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword service_name: The name of the bgp community. e.g. Skype. + :paramtype service_name: str + :keyword bgp_communities: A list of bgp communities. + :paramtype bgp_communities: list[~azure.mgmt.network.v2021_08_01.models.BGPCommunity] + """ + super(BgpServiceCommunity, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.service_name = service_name + self.bgp_communities = bgp_communities + + +class BgpServiceCommunityListResult(msrest.serialization.Model): + """Response for the ListServiceCommunity API service call. + + :ivar value: A list of service community resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.BgpServiceCommunity] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BgpServiceCommunity"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of service community resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.BgpServiceCommunity] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(BgpServiceCommunityListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BgpSettings(msrest.serialization.Model): + """BGP settings details. + + :ivar asn: The BGP speaker's ASN. + :vartype asn: long + :ivar bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. + :vartype bgp_peering_address: str + :ivar peer_weight: The weight added to routes learned from this BGP speaker. + :vartype peer_weight: int + :ivar bgp_peering_addresses: BGP peering address with IP configuration ID for virtual network + gateway. + :vartype bgp_peering_addresses: + list[~azure.mgmt.network.v2021_08_01.models.IPConfigurationBgpPeeringAddress] + """ + + _validation = { + 'asn': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'asn': {'key': 'asn', 'type': 'long'}, + 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, + 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, + 'bgp_peering_addresses': {'key': 'bgpPeeringAddresses', 'type': '[IPConfigurationBgpPeeringAddress]'}, + } + + def __init__( + self, + *, + asn: Optional[int] = None, + bgp_peering_address: Optional[str] = None, + peer_weight: Optional[int] = None, + bgp_peering_addresses: Optional[List["IPConfigurationBgpPeeringAddress"]] = None, + **kwargs + ): + """ + :keyword asn: The BGP speaker's ASN. + :paramtype asn: long + :keyword bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. + :paramtype bgp_peering_address: str + :keyword peer_weight: The weight added to routes learned from this BGP speaker. + :paramtype peer_weight: int + :keyword bgp_peering_addresses: BGP peering address with IP configuration ID for virtual + network gateway. + :paramtype bgp_peering_addresses: + list[~azure.mgmt.network.v2021_08_01.models.IPConfigurationBgpPeeringAddress] + """ + super(BgpSettings, self).__init__(**kwargs) + self.asn = asn + self.bgp_peering_address = bgp_peering_address + self.peer_weight = peer_weight + self.bgp_peering_addresses = bgp_peering_addresses + + +class BreakOutCategoryPolicies(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :ivar allow: Flag to control breakout of o365 allow category. + :vartype allow: bool + :ivar optimize: Flag to control breakout of o365 optimize category. + :vartype optimize: bool + :ivar default: Flag to control breakout of o365 default category. + :vartype default: bool + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': 'bool'}, + 'optimize': {'key': 'optimize', 'type': 'bool'}, + 'default': {'key': 'default', 'type': 'bool'}, + } + + def __init__( + self, + *, + allow: Optional[bool] = None, + optimize: Optional[bool] = None, + default: Optional[bool] = None, + **kwargs + ): + """ + :keyword allow: Flag to control breakout of o365 allow category. + :paramtype allow: bool + :keyword optimize: Flag to control breakout of o365 optimize category. + :paramtype optimize: bool + :keyword default: Flag to control breakout of o365 default category. + :paramtype default: bool + """ + super(BreakOutCategoryPolicies, self).__init__(**kwargs) + self.allow = allow + self.optimize = optimize + self.default = default + + +class CheckPrivateLinkServiceVisibilityRequest(msrest.serialization.Model): + """Request body of the CheckPrivateLinkServiceVisibility API service call. + + :ivar private_link_service_alias: The alias of the private link service. + :vartype private_link_service_alias: str + """ + + _attribute_map = { + 'private_link_service_alias': {'key': 'privateLinkServiceAlias', 'type': 'str'}, + } + + def __init__( + self, + *, + private_link_service_alias: Optional[str] = None, + **kwargs + ): + """ + :keyword private_link_service_alias: The alias of the private link service. + :paramtype private_link_service_alias: str + """ + super(CheckPrivateLinkServiceVisibilityRequest, self).__init__(**kwargs) + self.private_link_service_alias = private_link_service_alias + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :vartype code: str + :ivar message: A message describing the error, intended to be suitable for display in a user + interface. + :vartype message: str + :ivar target: The target of the particular error. For example, the name of the property in + error. + :vartype target: str + :ivar details: A list of additional details about the error. + :vartype details: list[~azure.mgmt.network.v2021_08_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + """ + :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :paramtype code: str + :keyword message: A message describing the error, intended to be suitable for display in a user + interface. + :paramtype message: str + :keyword target: The target of the particular error. For example, the name of the property in + error. + :paramtype target: str + :keyword details: A list of additional details about the error. + :paramtype details: list[~azure.mgmt.network.v2021_08_01.models.CloudErrorBody] + """ + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ConnectionMonitor(msrest.serialization.Model): + """Parameters that define the operation to create a connection monitor. + + :ivar location: Connection monitor location. + :vartype location: str + :ivar tags: A set of tags. Connection monitor tags. + :vartype tags: dict[str, str] + :ivar source: Describes the source of connection monitor. + :vartype source: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSource + :ivar destination: Describes the destination of connection monitor. + :vartype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorDestination + :ivar auto_start: Determines if the connection monitor will start automatically once created. + :vartype auto_start: bool + :ivar monitoring_interval_in_seconds: Monitoring interval in seconds. + :vartype monitoring_interval_in_seconds: int + :ivar endpoints: List of connection monitor endpoints. + :vartype endpoints: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpoint] + :ivar test_configurations: List of connection monitor test configurations. + :vartype test_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfiguration] + :ivar test_groups: List of connection monitor test groups. + :vartype test_groups: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestGroup] + :ivar outputs: List of connection monitor outputs. + :vartype outputs: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorOutput] + :ivar notes: Optional notes to be associated with the connection monitor. + :vartype notes: str + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'properties.testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'properties.testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'properties.outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + source: Optional["ConnectionMonitorSource"] = None, + destination: Optional["ConnectionMonitorDestination"] = None, + auto_start: Optional[bool] = True, + monitoring_interval_in_seconds: Optional[int] = 60, + endpoints: Optional[List["ConnectionMonitorEndpoint"]] = None, + test_configurations: Optional[List["ConnectionMonitorTestConfiguration"]] = None, + test_groups: Optional[List["ConnectionMonitorTestGroup"]] = None, + outputs: Optional[List["ConnectionMonitorOutput"]] = None, + notes: Optional[str] = None, + **kwargs + ): + """ + :keyword location: Connection monitor location. + :paramtype location: str + :keyword tags: A set of tags. Connection monitor tags. + :paramtype tags: dict[str, str] + :keyword source: Describes the source of connection monitor. + :paramtype source: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSource + :keyword destination: Describes the destination of connection monitor. + :paramtype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorDestination + :keyword auto_start: Determines if the connection monitor will start automatically once + created. + :paramtype auto_start: bool + :keyword monitoring_interval_in_seconds: Monitoring interval in seconds. + :paramtype monitoring_interval_in_seconds: int + :keyword endpoints: List of connection monitor endpoints. + :paramtype endpoints: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpoint] + :keyword test_configurations: List of connection monitor test configurations. + :paramtype test_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfiguration] + :keyword test_groups: List of connection monitor test groups. + :paramtype test_groups: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestGroup] + :keyword outputs: List of connection monitor outputs. + :paramtype outputs: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorOutput] + :keyword notes: Optional notes to be associated with the connection monitor. + :paramtype notes: str + """ + super(ConnectionMonitor, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds + self.endpoints = endpoints + self.test_configurations = test_configurations + self.test_groups = test_groups + self.outputs = outputs + self.notes = notes + + +class ConnectionMonitorDestination(msrest.serialization.Model): + """Describes the destination of connection monitor. + + :ivar resource_id: The ID of the resource used as the destination by connection monitor. + :vartype resource_id: str + :ivar address: Address of the connection monitor destination (IP or domain name). + :vartype address: str + :ivar port: The destination port used by connection monitor. + :vartype port: int + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + address: Optional[str] = None, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword resource_id: The ID of the resource used as the destination by connection monitor. + :paramtype resource_id: str + :keyword address: Address of the connection monitor destination (IP or domain name). + :paramtype address: str + :keyword port: The destination port used by connection monitor. + :paramtype port: int + """ + super(ConnectionMonitorDestination, self).__init__(**kwargs) + self.resource_id = resource_id + self.address = address + self.port = port + + +class ConnectionMonitorEndpoint(msrest.serialization.Model): + """Describes the connection monitor endpoint. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the connection monitor endpoint. + :vartype name: str + :ivar type: The endpoint type. Possible values include: "AzureVM", "AzureVNet", "AzureSubnet", + "ExternalAddress", "MMAWorkspaceMachine", "MMAWorkspaceNetwork". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.EndpointType + :ivar resource_id: Resource ID of the connection monitor endpoint. + :vartype resource_id: str + :ivar address: Address of the connection monitor endpoint (IP or domain name). + :vartype address: str + :ivar filter: Filter for sub-items within the endpoint. + :vartype filter: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointFilter + :ivar scope: Endpoint scope. + :vartype scope: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointScope + :ivar coverage_level: Test coverage for the endpoint. Possible values include: "Default", + "Low", "BelowAverage", "Average", "AboveAverage", "Full". + :vartype coverage_level: str or ~azure.mgmt.network.v2021_08_01.models.CoverageLevel + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ConnectionMonitorEndpointFilter'}, + 'scope': {'key': 'scope', 'type': 'ConnectionMonitorEndpointScope'}, + 'coverage_level': {'key': 'coverageLevel', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + type: Optional[Union[str, "EndpointType"]] = None, + resource_id: Optional[str] = None, + address: Optional[str] = None, + filter: Optional["ConnectionMonitorEndpointFilter"] = None, + scope: Optional["ConnectionMonitorEndpointScope"] = None, + coverage_level: Optional[Union[str, "CoverageLevel"]] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the connection monitor endpoint. + :paramtype name: str + :keyword type: The endpoint type. Possible values include: "AzureVM", "AzureVNet", + "AzureSubnet", "ExternalAddress", "MMAWorkspaceMachine", "MMAWorkspaceNetwork". + :paramtype type: str or ~azure.mgmt.network.v2021_08_01.models.EndpointType + :keyword resource_id: Resource ID of the connection monitor endpoint. + :paramtype resource_id: str + :keyword address: Address of the connection monitor endpoint (IP or domain name). + :paramtype address: str + :keyword filter: Filter for sub-items within the endpoint. + :paramtype filter: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointFilter + :keyword scope: Endpoint scope. + :paramtype scope: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointScope + :keyword coverage_level: Test coverage for the endpoint. Possible values include: "Default", + "Low", "BelowAverage", "Average", "AboveAverage", "Full". + :paramtype coverage_level: str or ~azure.mgmt.network.v2021_08_01.models.CoverageLevel + """ + super(ConnectionMonitorEndpoint, self).__init__(**kwargs) + self.name = name + self.type = type + self.resource_id = resource_id + self.address = address + self.filter = filter + self.scope = scope + self.coverage_level = coverage_level + + +class ConnectionMonitorEndpointFilter(msrest.serialization.Model): + """Describes the connection monitor endpoint filter. + + :ivar type: The behavior of the endpoint filter. Currently only 'Include' is supported. + Possible values include: "Include". + :vartype type: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointFilterType + :ivar items: List of items in the filter. + :vartype items: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointFilterItem] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[ConnectionMonitorEndpointFilterItem]'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ConnectionMonitorEndpointFilterType"]] = None, + items: Optional[List["ConnectionMonitorEndpointFilterItem"]] = None, + **kwargs + ): + """ + :keyword type: The behavior of the endpoint filter. Currently only 'Include' is supported. + Possible values include: "Include". + :paramtype type: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointFilterType + :keyword items: List of items in the filter. + :paramtype items: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointFilterItem] + """ + super(ConnectionMonitorEndpointFilter, self).__init__(**kwargs) + self.type = type + self.items = items + + +class ConnectionMonitorEndpointFilterItem(msrest.serialization.Model): + """Describes the connection monitor endpoint filter item. + + :ivar type: The type of item included in the filter. Currently only 'AgentAddress' is + supported. Possible values include: "AgentAddress". + :vartype type: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointFilterItemType + :ivar address: The address of the filter item. + :vartype address: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ConnectionMonitorEndpointFilterItemType"]] = None, + address: Optional[str] = None, + **kwargs + ): + """ + :keyword type: The type of item included in the filter. Currently only 'AgentAddress' is + supported. Possible values include: "AgentAddress". + :paramtype type: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointFilterItemType + :keyword address: The address of the filter item. + :paramtype address: str + """ + super(ConnectionMonitorEndpointFilterItem, self).__init__(**kwargs) + self.type = type + self.address = address + + +class ConnectionMonitorEndpointScope(msrest.serialization.Model): + """Describes the connection monitor endpoint scope. + + :ivar include: List of items which needs to be included to the endpoint scope. + :vartype include: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointScopeItem] + :ivar exclude: List of items which needs to be excluded from the endpoint scope. + :vartype exclude: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointScopeItem] + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': '[ConnectionMonitorEndpointScopeItem]'}, + 'exclude': {'key': 'exclude', 'type': '[ConnectionMonitorEndpointScopeItem]'}, + } + + def __init__( + self, + *, + include: Optional[List["ConnectionMonitorEndpointScopeItem"]] = None, + exclude: Optional[List["ConnectionMonitorEndpointScopeItem"]] = None, + **kwargs + ): + """ + :keyword include: List of items which needs to be included to the endpoint scope. + :paramtype include: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointScopeItem] + :keyword exclude: List of items which needs to be excluded from the endpoint scope. + :paramtype exclude: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpointScopeItem] + """ + super(ConnectionMonitorEndpointScope, self).__init__(**kwargs) + self.include = include + self.exclude = exclude + + +class ConnectionMonitorEndpointScopeItem(msrest.serialization.Model): + """Describes the connection monitor endpoint scope item. + + :ivar address: The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or + IPv4/IPv6 IP address. + :vartype address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + **kwargs + ): + """ + :keyword address: The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask + or IPv4/IPv6 IP address. + :paramtype address: str + """ + super(ConnectionMonitorEndpointScopeItem, self).__init__(**kwargs) + self.address = address + + +class ConnectionMonitorHttpConfiguration(msrest.serialization.Model): + """Describes the HTTP configuration. + + :ivar port: The port to connect to. + :vartype port: int + :ivar method: The HTTP method to use. Possible values include: "Get", "Post". + :vartype method: str or ~azure.mgmt.network.v2021_08_01.models.HTTPConfigurationMethod + :ivar path: The path component of the URI. For instance, "/dir1/dir2". + :vartype path: str + :ivar request_headers: The HTTP headers to transmit with the request. + :vartype request_headers: list[~azure.mgmt.network.v2021_08_01.models.HTTPHeader] + :ivar valid_status_code_ranges: HTTP status codes to consider successful. For instance, + "2xx,301-304,418". + :vartype valid_status_code_ranges: list[str] + :ivar prefer_https: Value indicating whether HTTPS is preferred over HTTP in cases where the + choice is not explicit. + :vartype prefer_https: bool + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'method': {'key': 'method', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'request_headers': {'key': 'requestHeaders', 'type': '[HTTPHeader]'}, + 'valid_status_code_ranges': {'key': 'validStatusCodeRanges', 'type': '[str]'}, + 'prefer_https': {'key': 'preferHTTPS', 'type': 'bool'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + method: Optional[Union[str, "HTTPConfigurationMethod"]] = None, + path: Optional[str] = None, + request_headers: Optional[List["HTTPHeader"]] = None, + valid_status_code_ranges: Optional[List[str]] = None, + prefer_https: Optional[bool] = None, + **kwargs + ): + """ + :keyword port: The port to connect to. + :paramtype port: int + :keyword method: The HTTP method to use. Possible values include: "Get", "Post". + :paramtype method: str or ~azure.mgmt.network.v2021_08_01.models.HTTPConfigurationMethod + :keyword path: The path component of the URI. For instance, "/dir1/dir2". + :paramtype path: str + :keyword request_headers: The HTTP headers to transmit with the request. + :paramtype request_headers: list[~azure.mgmt.network.v2021_08_01.models.HTTPHeader] + :keyword valid_status_code_ranges: HTTP status codes to consider successful. For instance, + "2xx,301-304,418". + :paramtype valid_status_code_ranges: list[str] + :keyword prefer_https: Value indicating whether HTTPS is preferred over HTTP in cases where the + choice is not explicit. + :paramtype prefer_https: bool + """ + super(ConnectionMonitorHttpConfiguration, self).__init__(**kwargs) + self.port = port + self.method = method + self.path = path + self.request_headers = request_headers + self.valid_status_code_ranges = valid_status_code_ranges + self.prefer_https = prefer_https + + +class ConnectionMonitorIcmpConfiguration(msrest.serialization.Model): + """Describes the ICMP configuration. + + :ivar disable_trace_route: Value indicating whether path evaluation with trace route should be + disabled. + :vartype disable_trace_route: bool + """ + + _attribute_map = { + 'disable_trace_route': {'key': 'disableTraceRoute', 'type': 'bool'}, + } + + def __init__( + self, + *, + disable_trace_route: Optional[bool] = None, + **kwargs + ): + """ + :keyword disable_trace_route: Value indicating whether path evaluation with trace route should + be disabled. + :paramtype disable_trace_route: bool + """ + super(ConnectionMonitorIcmpConfiguration, self).__init__(**kwargs) + self.disable_trace_route = disable_trace_route + + +class ConnectionMonitorListResult(msrest.serialization.Model): + """List of connection monitors. + + :ivar value: Information about connection monitors. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectionMonitorResult]'}, + } + + def __init__( + self, + *, + value: Optional[List["ConnectionMonitorResult"]] = None, + **kwargs + ): + """ + :keyword value: Information about connection monitors. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorResult] + """ + super(ConnectionMonitorListResult, self).__init__(**kwargs) + self.value = value + + +class ConnectionMonitorOutput(msrest.serialization.Model): + """Describes a connection monitor output destination. + + :ivar type: Connection monitor output destination type. Currently, only "Workspace" is + supported. Possible values include: "Workspace". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.OutputType + :ivar workspace_settings: Describes the settings for producing output into a log analytics + workspace. + :vartype workspace_settings: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorWorkspaceSettings + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_settings': {'key': 'workspaceSettings', 'type': 'ConnectionMonitorWorkspaceSettings'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "OutputType"]] = None, + workspace_settings: Optional["ConnectionMonitorWorkspaceSettings"] = None, + **kwargs + ): + """ + :keyword type: Connection monitor output destination type. Currently, only "Workspace" is + supported. Possible values include: "Workspace". + :paramtype type: str or ~azure.mgmt.network.v2021_08_01.models.OutputType + :keyword workspace_settings: Describes the settings for producing output into a log analytics + workspace. + :paramtype workspace_settings: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorWorkspaceSettings + """ + super(ConnectionMonitorOutput, self).__init__(**kwargs) + self.type = type + self.workspace_settings = workspace_settings + + +class ConnectionMonitorParameters(msrest.serialization.Model): + """Parameters that define the operation to create a connection monitor. + + :ivar source: Describes the source of connection monitor. + :vartype source: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSource + :ivar destination: Describes the destination of connection monitor. + :vartype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorDestination + :ivar auto_start: Determines if the connection monitor will start automatically once created. + :vartype auto_start: bool + :ivar monitoring_interval_in_seconds: Monitoring interval in seconds. + :vartype monitoring_interval_in_seconds: int + :ivar endpoints: List of connection monitor endpoints. + :vartype endpoints: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpoint] + :ivar test_configurations: List of connection monitor test configurations. + :vartype test_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfiguration] + :ivar test_groups: List of connection monitor test groups. + :vartype test_groups: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestGroup] + :ivar outputs: List of connection monitor outputs. + :vartype outputs: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorOutput] + :ivar notes: Optional notes to be associated with the connection monitor. + :vartype notes: str + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'notes', 'type': 'str'}, + } + + def __init__( + self, + *, + source: Optional["ConnectionMonitorSource"] = None, + destination: Optional["ConnectionMonitorDestination"] = None, + auto_start: Optional[bool] = True, + monitoring_interval_in_seconds: Optional[int] = 60, + endpoints: Optional[List["ConnectionMonitorEndpoint"]] = None, + test_configurations: Optional[List["ConnectionMonitorTestConfiguration"]] = None, + test_groups: Optional[List["ConnectionMonitorTestGroup"]] = None, + outputs: Optional[List["ConnectionMonitorOutput"]] = None, + notes: Optional[str] = None, + **kwargs + ): + """ + :keyword source: Describes the source of connection monitor. + :paramtype source: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSource + :keyword destination: Describes the destination of connection monitor. + :paramtype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorDestination + :keyword auto_start: Determines if the connection monitor will start automatically once + created. + :paramtype auto_start: bool + :keyword monitoring_interval_in_seconds: Monitoring interval in seconds. + :paramtype monitoring_interval_in_seconds: int + :keyword endpoints: List of connection monitor endpoints. + :paramtype endpoints: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpoint] + :keyword test_configurations: List of connection monitor test configurations. + :paramtype test_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfiguration] + :keyword test_groups: List of connection monitor test groups. + :paramtype test_groups: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestGroup] + :keyword outputs: List of connection monitor outputs. + :paramtype outputs: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorOutput] + :keyword notes: Optional notes to be associated with the connection monitor. + :paramtype notes: str + """ + super(ConnectionMonitorParameters, self).__init__(**kwargs) + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds + self.endpoints = endpoints + self.test_configurations = test_configurations + self.test_groups = test_groups + self.outputs = outputs + self.notes = notes + + +class ConnectionMonitorQueryResult(msrest.serialization.Model): + """List of connection states snapshots. + + :ivar source_status: Status of connection monitor source. Possible values include: "Unknown", + "Active", "Inactive". + :vartype source_status: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSourceStatus + :ivar states: Information about connection states. + :vartype states: list[~azure.mgmt.network.v2021_08_01.models.ConnectionStateSnapshot] + """ + + _attribute_map = { + 'source_status': {'key': 'sourceStatus', 'type': 'str'}, + 'states': {'key': 'states', 'type': '[ConnectionStateSnapshot]'}, + } + + def __init__( + self, + *, + source_status: Optional[Union[str, "ConnectionMonitorSourceStatus"]] = None, + states: Optional[List["ConnectionStateSnapshot"]] = None, + **kwargs + ): + """ + :keyword source_status: Status of connection monitor source. Possible values include: + "Unknown", "Active", "Inactive". + :paramtype source_status: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSourceStatus + :keyword states: Information about connection states. + :paramtype states: list[~azure.mgmt.network.v2021_08_01.models.ConnectionStateSnapshot] + """ + super(ConnectionMonitorQueryResult, self).__init__(**kwargs) + self.source_status = source_status + self.states = states + + +class ConnectionMonitorResult(msrest.serialization.Model): + """Information about the connection monitor. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the connection monitor. + :vartype name: str + :ivar id: ID of the connection monitor. + :vartype id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Connection monitor type. + :vartype type: str + :ivar location: Connection monitor location. + :vartype location: str + :ivar tags: A set of tags. Connection monitor tags. + :vartype tags: dict[str, str] + :ivar source: Describes the source of connection monitor. + :vartype source: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSource + :ivar destination: Describes the destination of connection monitor. + :vartype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorDestination + :ivar auto_start: Determines if the connection monitor will start automatically once created. + :vartype auto_start: bool + :ivar monitoring_interval_in_seconds: Monitoring interval in seconds. + :vartype monitoring_interval_in_seconds: int + :ivar endpoints: List of connection monitor endpoints. + :vartype endpoints: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpoint] + :ivar test_configurations: List of connection monitor test configurations. + :vartype test_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfiguration] + :ivar test_groups: List of connection monitor test groups. + :vartype test_groups: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestGroup] + :ivar outputs: List of connection monitor outputs. + :vartype outputs: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorOutput] + :ivar notes: Optional notes to be associated with the connection monitor. + :vartype notes: str + :ivar provisioning_state: The provisioning state of the connection monitor. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar start_time: The date and time when the connection monitor was started. + :vartype start_time: ~datetime.datetime + :ivar monitoring_status: The monitoring status of the connection monitor. + :vartype monitoring_status: str + :ivar connection_monitor_type: Type of connection monitor. Possible values include: + "MultiEndpoint", "SingleSourceDestination". + :vartype connection_monitor_type: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorType + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'monitoring_status': {'readonly': True}, + 'connection_monitor_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'properties.testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'properties.testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'properties.outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'connection_monitor_type': {'key': 'properties.connectionMonitorType', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + source: Optional["ConnectionMonitorSource"] = None, + destination: Optional["ConnectionMonitorDestination"] = None, + auto_start: Optional[bool] = True, + monitoring_interval_in_seconds: Optional[int] = 60, + endpoints: Optional[List["ConnectionMonitorEndpoint"]] = None, + test_configurations: Optional[List["ConnectionMonitorTestConfiguration"]] = None, + test_groups: Optional[List["ConnectionMonitorTestGroup"]] = None, + outputs: Optional[List["ConnectionMonitorOutput"]] = None, + notes: Optional[str] = None, + **kwargs + ): + """ + :keyword location: Connection monitor location. + :paramtype location: str + :keyword tags: A set of tags. Connection monitor tags. + :paramtype tags: dict[str, str] + :keyword source: Describes the source of connection monitor. + :paramtype source: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSource + :keyword destination: Describes the destination of connection monitor. + :paramtype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorDestination + :keyword auto_start: Determines if the connection monitor will start automatically once + created. + :paramtype auto_start: bool + :keyword monitoring_interval_in_seconds: Monitoring interval in seconds. + :paramtype monitoring_interval_in_seconds: int + :keyword endpoints: List of connection monitor endpoints. + :paramtype endpoints: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpoint] + :keyword test_configurations: List of connection monitor test configurations. + :paramtype test_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfiguration] + :keyword test_groups: List of connection monitor test groups. + :paramtype test_groups: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestGroup] + :keyword outputs: List of connection monitor outputs. + :paramtype outputs: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorOutput] + :keyword notes: Optional notes to be associated with the connection monitor. + :paramtype notes: str + """ + super(ConnectionMonitorResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.etag = None + self.type = None + self.location = location + self.tags = tags + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds + self.endpoints = endpoints + self.test_configurations = test_configurations + self.test_groups = test_groups + self.outputs = outputs + self.notes = notes + self.provisioning_state = None + self.start_time = None + self.monitoring_status = None + self.connection_monitor_type = None + + +class ConnectionMonitorResultProperties(ConnectionMonitorParameters): + """Describes the properties of a connection monitor. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar source: Describes the source of connection monitor. + :vartype source: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSource + :ivar destination: Describes the destination of connection monitor. + :vartype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorDestination + :ivar auto_start: Determines if the connection monitor will start automatically once created. + :vartype auto_start: bool + :ivar monitoring_interval_in_seconds: Monitoring interval in seconds. + :vartype monitoring_interval_in_seconds: int + :ivar endpoints: List of connection monitor endpoints. + :vartype endpoints: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpoint] + :ivar test_configurations: List of connection monitor test configurations. + :vartype test_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfiguration] + :ivar test_groups: List of connection monitor test groups. + :vartype test_groups: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestGroup] + :ivar outputs: List of connection monitor outputs. + :vartype outputs: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorOutput] + :ivar notes: Optional notes to be associated with the connection monitor. + :vartype notes: str + :ivar provisioning_state: The provisioning state of the connection monitor. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar start_time: The date and time when the connection monitor was started. + :vartype start_time: ~datetime.datetime + :ivar monitoring_status: The monitoring status of the connection monitor. + :vartype monitoring_status: str + :ivar connection_monitor_type: Type of connection monitor. Possible values include: + "MultiEndpoint", "SingleSourceDestination". + :vartype connection_monitor_type: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorType + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'monitoring_status': {'readonly': True}, + 'connection_monitor_type': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'notes', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'monitoring_status': {'key': 'monitoringStatus', 'type': 'str'}, + 'connection_monitor_type': {'key': 'connectionMonitorType', 'type': 'str'}, + } + + def __init__( + self, + *, + source: Optional["ConnectionMonitorSource"] = None, + destination: Optional["ConnectionMonitorDestination"] = None, + auto_start: Optional[bool] = True, + monitoring_interval_in_seconds: Optional[int] = 60, + endpoints: Optional[List["ConnectionMonitorEndpoint"]] = None, + test_configurations: Optional[List["ConnectionMonitorTestConfiguration"]] = None, + test_groups: Optional[List["ConnectionMonitorTestGroup"]] = None, + outputs: Optional[List["ConnectionMonitorOutput"]] = None, + notes: Optional[str] = None, + **kwargs + ): + """ + :keyword source: Describes the source of connection monitor. + :paramtype source: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSource + :keyword destination: Describes the destination of connection monitor. + :paramtype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorDestination + :keyword auto_start: Determines if the connection monitor will start automatically once + created. + :paramtype auto_start: bool + :keyword monitoring_interval_in_seconds: Monitoring interval in seconds. + :paramtype monitoring_interval_in_seconds: int + :keyword endpoints: List of connection monitor endpoints. + :paramtype endpoints: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorEndpoint] + :keyword test_configurations: List of connection monitor test configurations. + :paramtype test_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfiguration] + :keyword test_groups: List of connection monitor test groups. + :paramtype test_groups: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestGroup] + :keyword outputs: List of connection monitor outputs. + :paramtype outputs: list[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorOutput] + :keyword notes: Optional notes to be associated with the connection monitor. + :paramtype notes: str + """ + super(ConnectionMonitorResultProperties, self).__init__(source=source, destination=destination, auto_start=auto_start, monitoring_interval_in_seconds=monitoring_interval_in_seconds, endpoints=endpoints, test_configurations=test_configurations, test_groups=test_groups, outputs=outputs, notes=notes, **kwargs) + self.provisioning_state = None + self.start_time = None + self.monitoring_status = None + self.connection_monitor_type = None + + +class ConnectionMonitorSource(msrest.serialization.Model): + """Describes the source of connection monitor. + + All required parameters must be populated in order to send to Azure. + + :ivar resource_id: Required. The ID of the resource used as the source by connection monitor. + :vartype resource_id: str + :ivar port: The source port used by connection monitor. + :vartype port: int + """ + + _validation = { + 'resource_id': {'required': True}, + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + resource_id: str, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword resource_id: Required. The ID of the resource used as the source by connection + monitor. + :paramtype resource_id: str + :keyword port: The source port used by connection monitor. + :paramtype port: int + """ + super(ConnectionMonitorSource, self).__init__(**kwargs) + self.resource_id = resource_id + self.port = port + + +class ConnectionMonitorSuccessThreshold(msrest.serialization.Model): + """Describes the threshold for declaring a test successful. + + :ivar checks_failed_percent: The maximum percentage of failed checks permitted for a test to + evaluate as successful. + :vartype checks_failed_percent: int + :ivar round_trip_time_ms: The maximum round-trip time in milliseconds permitted for a test to + evaluate as successful. + :vartype round_trip_time_ms: float + """ + + _attribute_map = { + 'checks_failed_percent': {'key': 'checksFailedPercent', 'type': 'int'}, + 'round_trip_time_ms': {'key': 'roundTripTimeMs', 'type': 'float'}, + } + + def __init__( + self, + *, + checks_failed_percent: Optional[int] = None, + round_trip_time_ms: Optional[float] = None, + **kwargs + ): + """ + :keyword checks_failed_percent: The maximum percentage of failed checks permitted for a test to + evaluate as successful. + :paramtype checks_failed_percent: int + :keyword round_trip_time_ms: The maximum round-trip time in milliseconds permitted for a test + to evaluate as successful. + :paramtype round_trip_time_ms: float + """ + super(ConnectionMonitorSuccessThreshold, self).__init__(**kwargs) + self.checks_failed_percent = checks_failed_percent + self.round_trip_time_ms = round_trip_time_ms + + +class ConnectionMonitorTcpConfiguration(msrest.serialization.Model): + """Describes the TCP configuration. + + :ivar port: The port to connect to. + :vartype port: int + :ivar disable_trace_route: Value indicating whether path evaluation with trace route should be + disabled. + :vartype disable_trace_route: bool + :ivar destination_port_behavior: Destination port behavior. Possible values include: "None", + "ListenIfAvailable". + :vartype destination_port_behavior: str or + ~azure.mgmt.network.v2021_08_01.models.DestinationPortBehavior + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'disable_trace_route': {'key': 'disableTraceRoute', 'type': 'bool'}, + 'destination_port_behavior': {'key': 'destinationPortBehavior', 'type': 'str'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + disable_trace_route: Optional[bool] = None, + destination_port_behavior: Optional[Union[str, "DestinationPortBehavior"]] = None, + **kwargs + ): + """ + :keyword port: The port to connect to. + :paramtype port: int + :keyword disable_trace_route: Value indicating whether path evaluation with trace route should + be disabled. + :paramtype disable_trace_route: bool + :keyword destination_port_behavior: Destination port behavior. Possible values include: "None", + "ListenIfAvailable". + :paramtype destination_port_behavior: str or + ~azure.mgmt.network.v2021_08_01.models.DestinationPortBehavior + """ + super(ConnectionMonitorTcpConfiguration, self).__init__(**kwargs) + self.port = port + self.disable_trace_route = disable_trace_route + self.destination_port_behavior = destination_port_behavior + + +class ConnectionMonitorTestConfiguration(msrest.serialization.Model): + """Describes a connection monitor test configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the connection monitor test configuration. + :vartype name: str + :ivar test_frequency_sec: The frequency of test evaluation, in seconds. + :vartype test_frequency_sec: int + :ivar protocol: Required. The protocol to use in test evaluation. Possible values include: + "Tcp", "Http", "Icmp". + :vartype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfigurationProtocol + :ivar preferred_ip_version: The preferred IP version to use in test evaluation. The connection + monitor may choose to use a different version depending on other parameters. Possible values + include: "IPv4", "IPv6". + :vartype preferred_ip_version: str or ~azure.mgmt.network.v2021_08_01.models.PreferredIPVersion + :ivar http_configuration: The parameters used to perform test evaluation over HTTP. + :vartype http_configuration: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorHttpConfiguration + :ivar tcp_configuration: The parameters used to perform test evaluation over TCP. + :vartype tcp_configuration: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTcpConfiguration + :ivar icmp_configuration: The parameters used to perform test evaluation over ICMP. + :vartype icmp_configuration: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorIcmpConfiguration + :ivar success_threshold: The threshold for declaring a test successful. + :vartype success_threshold: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSuccessThreshold + """ + + _validation = { + 'name': {'required': True}, + 'protocol': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'test_frequency_sec': {'key': 'testFrequencySec', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'preferred_ip_version': {'key': 'preferredIPVersion', 'type': 'str'}, + 'http_configuration': {'key': 'httpConfiguration', 'type': 'ConnectionMonitorHttpConfiguration'}, + 'tcp_configuration': {'key': 'tcpConfiguration', 'type': 'ConnectionMonitorTcpConfiguration'}, + 'icmp_configuration': {'key': 'icmpConfiguration', 'type': 'ConnectionMonitorIcmpConfiguration'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'ConnectionMonitorSuccessThreshold'}, + } + + def __init__( + self, + *, + name: str, + protocol: Union[str, "ConnectionMonitorTestConfigurationProtocol"], + test_frequency_sec: Optional[int] = None, + preferred_ip_version: Optional[Union[str, "PreferredIPVersion"]] = None, + http_configuration: Optional["ConnectionMonitorHttpConfiguration"] = None, + tcp_configuration: Optional["ConnectionMonitorTcpConfiguration"] = None, + icmp_configuration: Optional["ConnectionMonitorIcmpConfiguration"] = None, + success_threshold: Optional["ConnectionMonitorSuccessThreshold"] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the connection monitor test configuration. + :paramtype name: str + :keyword test_frequency_sec: The frequency of test evaluation, in seconds. + :paramtype test_frequency_sec: int + :keyword protocol: Required. The protocol to use in test evaluation. Possible values include: + "Tcp", "Http", "Icmp". + :paramtype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTestConfigurationProtocol + :keyword preferred_ip_version: The preferred IP version to use in test evaluation. The + connection monitor may choose to use a different version depending on other parameters. + Possible values include: "IPv4", "IPv6". + :paramtype preferred_ip_version: str or + ~azure.mgmt.network.v2021_08_01.models.PreferredIPVersion + :keyword http_configuration: The parameters used to perform test evaluation over HTTP. + :paramtype http_configuration: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorHttpConfiguration + :keyword tcp_configuration: The parameters used to perform test evaluation over TCP. + :paramtype tcp_configuration: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorTcpConfiguration + :keyword icmp_configuration: The parameters used to perform test evaluation over ICMP. + :paramtype icmp_configuration: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorIcmpConfiguration + :keyword success_threshold: The threshold for declaring a test successful. + :paramtype success_threshold: + ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorSuccessThreshold + """ + super(ConnectionMonitorTestConfiguration, self).__init__(**kwargs) + self.name = name + self.test_frequency_sec = test_frequency_sec + self.protocol = protocol + self.preferred_ip_version = preferred_ip_version + self.http_configuration = http_configuration + self.tcp_configuration = tcp_configuration + self.icmp_configuration = icmp_configuration + self.success_threshold = success_threshold + + +class ConnectionMonitorTestGroup(msrest.serialization.Model): + """Describes the connection monitor test group. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the connection monitor test group. + :vartype name: str + :ivar disable: Value indicating whether test group is disabled. + :vartype disable: bool + :ivar test_configurations: Required. List of test configuration names. + :vartype test_configurations: list[str] + :ivar sources: Required. List of source endpoint names. + :vartype sources: list[str] + :ivar destinations: Required. List of destination endpoint names. + :vartype destinations: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'test_configurations': {'required': True}, + 'sources': {'required': True}, + 'destinations': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disable': {'key': 'disable', 'type': 'bool'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[str]'}, + 'sources': {'key': 'sources', 'type': '[str]'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: str, + test_configurations: List[str], + sources: List[str], + destinations: List[str], + disable: Optional[bool] = None, + **kwargs + ): + """ + :keyword name: Required. The name of the connection monitor test group. + :paramtype name: str + :keyword disable: Value indicating whether test group is disabled. + :paramtype disable: bool + :keyword test_configurations: Required. List of test configuration names. + :paramtype test_configurations: list[str] + :keyword sources: Required. List of source endpoint names. + :paramtype sources: list[str] + :keyword destinations: Required. List of destination endpoint names. + :paramtype destinations: list[str] + """ + super(ConnectionMonitorTestGroup, self).__init__(**kwargs) + self.name = name + self.disable = disable + self.test_configurations = test_configurations + self.sources = sources + self.destinations = destinations + + +class ConnectionMonitorWorkspaceSettings(msrest.serialization.Model): + """Describes the settings for producing output into a log analytics workspace. + + :ivar workspace_resource_id: Log analytics workspace resource ID. + :vartype workspace_resource_id: str + """ + + _attribute_map = { + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + workspace_resource_id: Optional[str] = None, + **kwargs + ): + """ + :keyword workspace_resource_id: Log analytics workspace resource ID. + :paramtype workspace_resource_id: str + """ + super(ConnectionMonitorWorkspaceSettings, self).__init__(**kwargs) + self.workspace_resource_id = workspace_resource_id + + +class ConnectionResetSharedKey(msrest.serialization.Model): + """The virtual network connection reset shared key. + + All required parameters must be populated in order to send to Azure. + + :ivar key_length: Required. The virtual network connection reset shared key length, should + between 1 and 128. + :vartype key_length: int + """ + + _validation = { + 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, + } + + _attribute_map = { + 'key_length': {'key': 'keyLength', 'type': 'int'}, + } + + def __init__( + self, + *, + key_length: int, + **kwargs + ): + """ + :keyword key_length: Required. The virtual network connection reset shared key length, should + between 1 and 128. + :paramtype key_length: int + """ + super(ConnectionResetSharedKey, self).__init__(**kwargs) + self.key_length = key_length + + +class ConnectionSharedKey(SubResource): + """Response for GetConnectionSharedKey API service call. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar value: Required. The virtual network connection shared key value. + :vartype value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword value: Required. The virtual network connection shared key value. + :paramtype value: str + """ + super(ConnectionSharedKey, self).__init__(id=id, **kwargs) + self.value = value + + +class ConnectionStateSnapshot(msrest.serialization.Model): + """Connection state snapshot. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar connection_state: The connection state. Possible values include: "Reachable", + "Unreachable", "Unknown". + :vartype connection_state: str or ~azure.mgmt.network.v2021_08_01.models.ConnectionState + :ivar start_time: The start time of the connection snapshot. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the connection snapshot. + :vartype end_time: ~datetime.datetime + :ivar evaluation_state: Connectivity analysis evaluation state. Possible values include: + "NotStarted", "InProgress", "Completed". + :vartype evaluation_state: str or ~azure.mgmt.network.v2021_08_01.models.EvaluationState + :ivar avg_latency_in_ms: Average latency in ms. + :vartype avg_latency_in_ms: long + :ivar min_latency_in_ms: Minimum latency in ms. + :vartype min_latency_in_ms: long + :ivar max_latency_in_ms: Maximum latency in ms. + :vartype max_latency_in_ms: long + :ivar probes_sent: The number of sent probes. + :vartype probes_sent: long + :ivar probes_failed: The number of failed probes. + :vartype probes_failed: long + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.network.v2021_08_01.models.ConnectivityHop] + """ + + _validation = { + 'avg_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'min_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'max_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'probes_sent': {'maximum': 4294967295, 'minimum': 0}, + 'probes_failed': {'maximum': 4294967295, 'minimum': 0}, + 'hops': {'readonly': True}, + } + + _attribute_map = { + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'evaluation_state': {'key': 'evaluationState', 'type': 'str'}, + 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'long'}, + 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'long'}, + 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'long'}, + 'probes_sent': {'key': 'probesSent', 'type': 'long'}, + 'probes_failed': {'key': 'probesFailed', 'type': 'long'}, + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + } + + def __init__( + self, + *, + connection_state: Optional[Union[str, "ConnectionState"]] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + evaluation_state: Optional[Union[str, "EvaluationState"]] = None, + avg_latency_in_ms: Optional[int] = None, + min_latency_in_ms: Optional[int] = None, + max_latency_in_ms: Optional[int] = None, + probes_sent: Optional[int] = None, + probes_failed: Optional[int] = None, + **kwargs + ): + """ + :keyword connection_state: The connection state. Possible values include: "Reachable", + "Unreachable", "Unknown". + :paramtype connection_state: str or ~azure.mgmt.network.v2021_08_01.models.ConnectionState + :keyword start_time: The start time of the connection snapshot. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time of the connection snapshot. + :paramtype end_time: ~datetime.datetime + :keyword evaluation_state: Connectivity analysis evaluation state. Possible values include: + "NotStarted", "InProgress", "Completed". + :paramtype evaluation_state: str or ~azure.mgmt.network.v2021_08_01.models.EvaluationState + :keyword avg_latency_in_ms: Average latency in ms. + :paramtype avg_latency_in_ms: long + :keyword min_latency_in_ms: Minimum latency in ms. + :paramtype min_latency_in_ms: long + :keyword max_latency_in_ms: Maximum latency in ms. + :paramtype max_latency_in_ms: long + :keyword probes_sent: The number of sent probes. + :paramtype probes_sent: long + :keyword probes_failed: The number of failed probes. + :paramtype probes_failed: long + """ + super(ConnectionStateSnapshot, self).__init__(**kwargs) + self.connection_state = connection_state + self.start_time = start_time + self.end_time = end_time + self.evaluation_state = evaluation_state + self.avg_latency_in_ms = avg_latency_in_ms + self.min_latency_in_ms = min_latency_in_ms + self.max_latency_in_ms = max_latency_in_ms + self.probes_sent = probes_sent + self.probes_failed = probes_failed + self.hops = None + + +class ConnectivityDestination(msrest.serialization.Model): + """Parameters that define destination of connection. + + :ivar resource_id: The ID of the resource to which a connection attempt will be made. + :vartype resource_id: str + :ivar address: The IP address or URI the resource to which a connection attempt will be made. + :vartype address: str + :ivar port: Port on which check connectivity will be performed. + :vartype port: int + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + address: Optional[str] = None, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword resource_id: The ID of the resource to which a connection attempt will be made. + :paramtype resource_id: str + :keyword address: The IP address or URI the resource to which a connection attempt will be + made. + :paramtype address: str + :keyword port: Port on which check connectivity will be performed. + :paramtype port: int + """ + super(ConnectivityDestination, self).__init__(**kwargs) + self.resource_id = resource_id + self.address = address + self.port = port + + +class ConnectivityHop(msrest.serialization.Model): + """Information about a hop between the source and the destination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of the hop. + :vartype type: str + :ivar id: The ID of the hop. + :vartype id: str + :ivar address: The IP address of the hop. + :vartype address: str + :ivar resource_id: The ID of the resource corresponding to this hop. + :vartype resource_id: str + :ivar next_hop_ids: List of next hop identifiers. + :vartype next_hop_ids: list[str] + :ivar previous_hop_ids: List of previous hop identifiers. + :vartype previous_hop_ids: list[str] + :ivar links: List of hop links. + :vartype links: list[~azure.mgmt.network.v2021_08_01.models.HopLink] + :ivar previous_links: List of previous hop links. + :vartype previous_links: list[~azure.mgmt.network.v2021_08_01.models.HopLink] + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.network.v2021_08_01.models.ConnectivityIssue] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'address': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'next_hop_ids': {'readonly': True}, + 'previous_hop_ids': {'readonly': True}, + 'links': {'readonly': True}, + 'previous_links': {'readonly': True}, + 'issues': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, + 'previous_hop_ids': {'key': 'previousHopIds', 'type': '[str]'}, + 'links': {'key': 'links', 'type': '[HopLink]'}, + 'previous_links': {'key': 'previousLinks', 'type': '[HopLink]'}, + 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ConnectivityHop, self).__init__(**kwargs) + self.type = None + self.id = None + self.address = None + self.resource_id = None + self.next_hop_ids = None + self.previous_hop_ids = None + self.links = None + self.previous_links = None + self.issues = None + + +class ConnectivityInformation(msrest.serialization.Model): + """Information on the connectivity status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.network.v2021_08_01.models.ConnectivityHop] + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connected", "Disconnected", "Degraded". + :vartype connection_status: str or ~azure.mgmt.network.v2021_08_01.models.ConnectionStatus + :ivar avg_latency_in_ms: Average latency in milliseconds. + :vartype avg_latency_in_ms: int + :ivar min_latency_in_ms: Minimum latency in milliseconds. + :vartype min_latency_in_ms: int + :ivar max_latency_in_ms: Maximum latency in milliseconds. + :vartype max_latency_in_ms: int + :ivar probes_sent: Total number of probes sent. + :vartype probes_sent: int + :ivar probes_failed: Number of failed probes. + :vartype probes_failed: int + """ + + _validation = { + 'hops': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'avg_latency_in_ms': {'readonly': True}, + 'min_latency_in_ms': {'readonly': True}, + 'max_latency_in_ms': {'readonly': True}, + 'probes_sent': {'readonly': True}, + 'probes_failed': {'readonly': True}, + } + + _attribute_map = { + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, + 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, + 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, + 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, + 'probes_sent': {'key': 'probesSent', 'type': 'int'}, + 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ConnectivityInformation, self).__init__(**kwargs) + self.hops = None + self.connection_status = None + self.avg_latency_in_ms = None + self.min_latency_in_ms = None + self.max_latency_in_ms = None + self.probes_sent = None + self.probes_failed = None + + +class ConnectivityIssue(msrest.serialization.Model): + """Information about an issue encountered in the process of checking for connectivity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". + :vartype origin: str or ~azure.mgmt.network.v2021_08_01.models.Origin + :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". + :vartype severity: str or ~azure.mgmt.network.v2021_08_01.models.Severity + :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", + "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", + "PortThrottled", "Platform". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.IssueType + :ivar context: Provides additional context on the issue. + :vartype context: list[dict[str, str]] + """ + + _validation = { + 'origin': {'readonly': True}, + 'severity': {'readonly': True}, + 'type': {'readonly': True}, + 'context': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'context': {'key': 'context', 'type': '[{str}]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ConnectivityIssue, self).__init__(**kwargs) + self.origin = None + self.severity = None + self.type = None + self.context = None + + +class ConnectivityParameters(msrest.serialization.Model): + """Parameters that determine how the connectivity check will be performed. + + All required parameters must be populated in order to send to Azure. + + :ivar source: Required. The source of the connection. + :vartype source: ~azure.mgmt.network.v2021_08_01.models.ConnectivitySource + :ivar destination: Required. The destination of connection. + :vartype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectivityDestination + :ivar protocol: Network protocol. Possible values include: "Tcp", "Http", "Https", "Icmp". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.Protocol + :ivar protocol_configuration: Configuration of the protocol. + :vartype protocol_configuration: ~azure.mgmt.network.v2021_08_01.models.ProtocolConfiguration + :ivar preferred_ip_version: Preferred IP version of the connection. Possible values include: + "IPv4", "IPv6". + :vartype preferred_ip_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectivitySource'}, + 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'protocol_configuration': {'key': 'protocolConfiguration', 'type': 'ProtocolConfiguration'}, + 'preferred_ip_version': {'key': 'preferredIPVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + source: "ConnectivitySource", + destination: "ConnectivityDestination", + protocol: Optional[Union[str, "Protocol"]] = None, + protocol_configuration: Optional["ProtocolConfiguration"] = None, + preferred_ip_version: Optional[Union[str, "IPVersion"]] = None, + **kwargs + ): + """ + :keyword source: Required. The source of the connection. + :paramtype source: ~azure.mgmt.network.v2021_08_01.models.ConnectivitySource + :keyword destination: Required. The destination of connection. + :paramtype destination: ~azure.mgmt.network.v2021_08_01.models.ConnectivityDestination + :keyword protocol: Network protocol. Possible values include: "Tcp", "Http", "Https", "Icmp". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.Protocol + :keyword protocol_configuration: Configuration of the protocol. + :paramtype protocol_configuration: ~azure.mgmt.network.v2021_08_01.models.ProtocolConfiguration + :keyword preferred_ip_version: Preferred IP version of the connection. Possible values include: + "IPv4", "IPv6". + :paramtype preferred_ip_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + """ + super(ConnectivityParameters, self).__init__(**kwargs) + self.source = source + self.destination = destination + self.protocol = protocol + self.protocol_configuration = protocol_configuration + self.preferred_ip_version = preferred_ip_version + + +class ConnectivitySource(msrest.serialization.Model): + """Parameters that define the source of the connection. + + All required parameters must be populated in order to send to Azure. + + :ivar resource_id: Required. The ID of the resource from which a connectivity check will be + initiated. + :vartype resource_id: str + :ivar port: The source port from which a connectivity check will be performed. + :vartype port: int + """ + + _validation = { + 'resource_id': {'required': True}, + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + resource_id: str, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword resource_id: Required. The ID of the resource from which a connectivity check will be + initiated. + :paramtype resource_id: str + :keyword port: The source port from which a connectivity check will be performed. + :paramtype port: int + """ + super(ConnectivitySource, self).__init__(**kwargs) + self.resource_id = resource_id + self.port = port + + +class Container(SubResource): + """Reference to container resource in remote resource provider. + + :ivar id: Resource ID. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + """ + super(Container, self).__init__(id=id, **kwargs) + + +class ContainerNetworkInterface(SubResource): + """Container network interface child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource. This name can be used to access the resource. + :vartype name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar container_network_interface_configuration: Container network interface configuration from + which this container network interface is created. + :vartype container_network_interface_configuration: + ~azure.mgmt.network.v2021_08_01.models.ContainerNetworkInterfaceConfiguration + :ivar container: Reference to the container to which this container network interface is + attached. + :vartype container: ~azure.mgmt.network.v2021_08_01.models.Container + :ivar ip_configurations: Reference to the ip configuration on this container nic. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ContainerNetworkInterfaceIpConfiguration] + :ivar provisioning_state: The provisioning state of the container network interface resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'container_network_interface_configuration': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'container_network_interface_configuration': {'key': 'properties.containerNetworkInterfaceConfiguration', 'type': 'ContainerNetworkInterfaceConfiguration'}, + 'container': {'key': 'properties.container', 'type': 'Container'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[ContainerNetworkInterfaceIpConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + container: Optional["Container"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource. This name can be used to access the resource. + :paramtype name: str + :keyword container: Reference to the container to which this container network interface is + attached. + :paramtype container: ~azure.mgmt.network.v2021_08_01.models.Container + """ + super(ContainerNetworkInterface, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.container_network_interface_configuration = None + self.container = container + self.ip_configurations = None + self.provisioning_state = None + + +class ContainerNetworkInterfaceConfiguration(SubResource): + """Container network interface configuration child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource. This name can be used to access the resource. + :vartype name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar ip_configurations: A list of ip configurations of the container network interface + configuration. + :vartype ip_configurations: list[~azure.mgmt.network.v2021_08_01.models.IPConfigurationProfile] + :ivar container_network_interfaces: A list of container network interfaces created from this + container network interface configuration. + :vartype container_network_interfaces: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the container network interface + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfigurationProfile]'}, + 'container_network_interfaces': {'key': 'properties.containerNetworkInterfaces', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + ip_configurations: Optional[List["IPConfigurationProfile"]] = None, + container_network_interfaces: Optional[List["SubResource"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource. This name can be used to access the resource. + :paramtype name: str + :keyword ip_configurations: A list of ip configurations of the container network interface + configuration. + :paramtype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.IPConfigurationProfile] + :keyword container_network_interfaces: A list of container network interfaces created from this + container network interface configuration. + :paramtype container_network_interfaces: + list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + super(ContainerNetworkInterfaceConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.ip_configurations = ip_configurations + self.container_network_interfaces = container_network_interfaces + self.provisioning_state = None + + +class ContainerNetworkInterfaceIpConfiguration(msrest.serialization.Model): + """The ip configuration for a container network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the resource. This name can be used to access the resource. + :vartype name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the container network interface IP + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the resource. This name can be used to access the resource. + :paramtype name: str + """ + super(ContainerNetworkInterfaceIpConfiguration, self).__init__(**kwargs) + self.name = name + self.type = None + self.etag = None + self.provisioning_state = None + + +class CustomDnsConfigPropertiesFormat(msrest.serialization.Model): + """Contains custom Dns resolution configuration from customer. + + :ivar fqdn: Fqdn that resolves to private endpoint ip address. + :vartype fqdn: str + :ivar ip_addresses: A list of private ip addresses of the private endpoint. + :vartype ip_addresses: list[str] + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + fqdn: Optional[str] = None, + ip_addresses: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword fqdn: Fqdn that resolves to private endpoint ip address. + :paramtype fqdn: str + :keyword ip_addresses: A list of private ip addresses of the private endpoint. + :paramtype ip_addresses: list[str] + """ + super(CustomDnsConfigPropertiesFormat, self).__init__(**kwargs) + self.fqdn = fqdn + self.ip_addresses = ip_addresses + + +class CustomIpPrefix(Resource): + """Custom IP prefix resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of the custom IP prefix. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :vartype zones: list[str] + :ivar cidr: The prefix range in CIDR notation. Should include the start address and the prefix + length. + :vartype cidr: str + :ivar signed_message: Signed message for WAN validation. + :vartype signed_message: str + :ivar authorization_message: Authorization message for WAN validation. + :vartype authorization_message: str + :ivar custom_ip_prefix_parent: The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. + :vartype custom_ip_prefix_parent: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar child_custom_ip_prefixes: The list of all Children for IPv6 /48 CustomIpPrefix. + :vartype child_custom_ip_prefixes: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar commissioned_state: The commissioned state of the Custom IP Prefix. Possible values + include: "Provisioning", "Provisioned", "Commissioning", "Commissioned", "Decommissioning", + "Deprovisioning". + :vartype commissioned_state: str or ~azure.mgmt.network.v2021_08_01.models.CommissionedState + :ivar public_ip_prefixes: The list of all referenced PublicIpPrefixes. + :vartype public_ip_prefixes: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar resource_guid: The resource GUID property of the custom IP prefix resource. + :vartype resource_guid: str + :ivar failed_reason: The reason why resource is in failed state. + :vartype failed_reason: str + :ivar provisioning_state: The provisioning state of the custom IP prefix resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'child_custom_ip_prefixes': {'readonly': True}, + 'public_ip_prefixes': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'failed_reason': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'cidr': {'key': 'properties.cidr', 'type': 'str'}, + 'signed_message': {'key': 'properties.signedMessage', 'type': 'str'}, + 'authorization_message': {'key': 'properties.authorizationMessage', 'type': 'str'}, + 'custom_ip_prefix_parent': {'key': 'properties.customIpPrefixParent', 'type': 'SubResource'}, + 'child_custom_ip_prefixes': {'key': 'properties.childCustomIpPrefixes', 'type': '[SubResource]'}, + 'commissioned_state': {'key': 'properties.commissionedState', 'type': 'str'}, + 'public_ip_prefixes': {'key': 'properties.publicIpPrefixes', 'type': '[SubResource]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'failed_reason': {'key': 'properties.failedReason', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + zones: Optional[List[str]] = None, + cidr: Optional[str] = None, + signed_message: Optional[str] = None, + authorization_message: Optional[str] = None, + custom_ip_prefix_parent: Optional["SubResource"] = None, + commissioned_state: Optional[Union[str, "CommissionedState"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of the custom IP prefix. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword zones: A list of availability zones denoting the IP allocated for the resource needs + to come from. + :paramtype zones: list[str] + :keyword cidr: The prefix range in CIDR notation. Should include the start address and the + prefix length. + :paramtype cidr: str + :keyword signed_message: Signed message for WAN validation. + :paramtype signed_message: str + :keyword authorization_message: Authorization message for WAN validation. + :paramtype authorization_message: str + :keyword custom_ip_prefix_parent: The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. + :paramtype custom_ip_prefix_parent: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword commissioned_state: The commissioned state of the Custom IP Prefix. Possible values + include: "Provisioning", "Provisioned", "Commissioning", "Commissioned", "Decommissioning", + "Deprovisioning". + :paramtype commissioned_state: str or ~azure.mgmt.network.v2021_08_01.models.CommissionedState + """ + super(CustomIpPrefix, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.zones = zones + self.cidr = cidr + self.signed_message = signed_message + self.authorization_message = authorization_message + self.custom_ip_prefix_parent = custom_ip_prefix_parent + self.child_custom_ip_prefixes = None + self.commissioned_state = commissioned_state + self.public_ip_prefixes = None + self.resource_guid = None + self.failed_reason = None + self.provisioning_state = None + + +class CustomIpPrefixListResult(msrest.serialization.Model): + """Response for ListCustomIpPrefixes API service call. + + :ivar value: A list of Custom IP prefixes that exists in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CustomIpPrefix]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["CustomIpPrefix"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of Custom IP prefixes that exists in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(CustomIpPrefixListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DdosCustomPolicy(Resource): + """A DDoS custom policy in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the DDoS custom policy resource. It uniquely + identifies the resource, even if the user changes its name or migrate the resource across + subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DDoS custom policy resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar public_ip_addresses: The list of public IPs associated with the DDoS custom policy + resource. This list is read-only. + :vartype public_ip_addresses: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar protocol_custom_settings: The protocol-specific DDoS policy customization parameters. + :vartype protocol_custom_settings: + list[~azure.mgmt.network.v2021_08_01.models.ProtocolCustomSettingsFormat] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'public_ip_addresses': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[SubResource]'}, + 'protocol_custom_settings': {'key': 'properties.protocolCustomSettings', 'type': '[ProtocolCustomSettingsFormat]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + protocol_custom_settings: Optional[List["ProtocolCustomSettingsFormat"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword protocol_custom_settings: The protocol-specific DDoS policy customization parameters. + :paramtype protocol_custom_settings: + list[~azure.mgmt.network.v2021_08_01.models.ProtocolCustomSettingsFormat] + """ + super(DdosCustomPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.resource_guid = None + self.provisioning_state = None + self.public_ip_addresses = None + self.protocol_custom_settings = protocol_custom_settings + + +class DdosProtectionPlan(msrest.serialization.Model): + """A DDoS protection plan in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the DDoS protection plan resource. It + uniquely identifies the resource, even if the user changes its name or migrate the resource + across subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DDoS protection plan resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar virtual_networks: The list of virtual networks associated with the DDoS protection plan + resource. This list is read-only. + :vartype virtual_networks: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'virtual_networks': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(DdosProtectionPlan, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.etag = None + self.resource_guid = None + self.provisioning_state = None + self.virtual_networks = None + + +class DdosProtectionPlanListResult(msrest.serialization.Model): + """A list of DDoS protection plans. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of DDoS protection plans. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DdosProtectionPlan]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DdosProtectionPlan"]] = None, + **kwargs + ): + """ + :keyword value: A list of DDoS protection plans. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan] + """ + super(DdosProtectionPlanListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DdosSettings(msrest.serialization.Model): + """Contains the DDoS protection settings of the public IP. + + :ivar ddos_custom_policy: The DDoS custom policy associated with the public IP. + :vartype ddos_custom_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar protection_coverage: The DDoS protection policy customizability of the public IP. Only + standard coverage will have the ability to be customized. Possible values include: "Basic", + "Standard". + :vartype protection_coverage: str or + ~azure.mgmt.network.v2021_08_01.models.DdosSettingsProtectionCoverage + :ivar protected_ip: Enables DDoS protection on the public IP. + :vartype protected_ip: bool + """ + + _attribute_map = { + 'ddos_custom_policy': {'key': 'ddosCustomPolicy', 'type': 'SubResource'}, + 'protection_coverage': {'key': 'protectionCoverage', 'type': 'str'}, + 'protected_ip': {'key': 'protectedIP', 'type': 'bool'}, + } + + def __init__( + self, + *, + ddos_custom_policy: Optional["SubResource"] = None, + protection_coverage: Optional[Union[str, "DdosSettingsProtectionCoverage"]] = None, + protected_ip: Optional[bool] = None, + **kwargs + ): + """ + :keyword ddos_custom_policy: The DDoS custom policy associated with the public IP. + :paramtype ddos_custom_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword protection_coverage: The DDoS protection policy customizability of the public IP. Only + standard coverage will have the ability to be customized. Possible values include: "Basic", + "Standard". + :paramtype protection_coverage: str or + ~azure.mgmt.network.v2021_08_01.models.DdosSettingsProtectionCoverage + :keyword protected_ip: Enables DDoS protection on the public IP. + :paramtype protected_ip: bool + """ + super(DdosSettings, self).__init__(**kwargs) + self.ddos_custom_policy = ddos_custom_policy + self.protection_coverage = protection_coverage + self.protected_ip = protected_ip + + +class Delegation(SubResource): + """Details the service to which the subnet is delegated. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a subnet. This name can be used to + access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar service_name: The name of the service to whom the subnet should be delegated (e.g. + Microsoft.Sql/servers). + :vartype service_name: str + :ivar actions: The actions permitted to the service upon delegation. + :vartype actions: list[str] + :ivar provisioning_state: The provisioning state of the service delegation resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'actions': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + service_name: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a subnet. This name can be used + to access the resource. + :paramtype name: str + :keyword type: Resource type. + :paramtype type: str + :keyword service_name: The name of the service to whom the subnet should be delegated (e.g. + Microsoft.Sql/servers). + :paramtype service_name: str + """ + super(Delegation, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.service_name = service_name + self.actions = None + self.provisioning_state = None + + +class DeviceProperties(msrest.serialization.Model): + """List of properties of the device. + + :ivar device_vendor: Name of the device Vendor. + :vartype device_vendor: str + :ivar device_model: Model of the device. + :vartype device_model: str + :ivar link_speed_in_mbps: Link speed. + :vartype link_speed_in_mbps: int + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_model': {'key': 'deviceModel', 'type': 'str'}, + 'link_speed_in_mbps': {'key': 'linkSpeedInMbps', 'type': 'int'}, + } + + def __init__( + self, + *, + device_vendor: Optional[str] = None, + device_model: Optional[str] = None, + link_speed_in_mbps: Optional[int] = None, + **kwargs + ): + """ + :keyword device_vendor: Name of the device Vendor. + :paramtype device_vendor: str + :keyword device_model: Model of the device. + :paramtype device_model: str + :keyword link_speed_in_mbps: Link speed. + :paramtype link_speed_in_mbps: int + """ + super(DeviceProperties, self).__init__(**kwargs) + self.device_vendor = device_vendor + self.device_model = device_model + self.link_speed_in_mbps = link_speed_in_mbps + + +class DhcpOptions(msrest.serialization.Model): + """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. + + :ivar dns_servers: The list of DNS servers IP addresses. + :vartype dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__( + self, + *, + dns_servers: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword dns_servers: The list of DNS servers IP addresses. + :paramtype dns_servers: list[str] + """ + super(DhcpOptions, self).__init__(**kwargs) + self.dns_servers = dns_servers + + +class Dimension(msrest.serialization.Model): + """Dimension of the metric. + + :ivar name: The name of the dimension. + :vartype name: str + :ivar display_name: The display name of the dimension. + :vartype display_name: str + :ivar internal_name: The internal name of the dimension. + :vartype internal_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + internal_name: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the dimension. + :paramtype name: str + :keyword display_name: The display name of the dimension. + :paramtype display_name: str + :keyword internal_name: The internal name of the dimension. + :paramtype internal_name: str + """ + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.internal_name = internal_name + + +class DnsNameAvailabilityResult(msrest.serialization.Model): + """Response for the CheckDnsNameAvailability API service call. + + :ivar available: Domain availability (True/False). + :vartype available: bool + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + } + + def __init__( + self, + *, + available: Optional[bool] = None, + **kwargs + ): + """ + :keyword available: Domain availability (True/False). + :paramtype available: bool + """ + super(DnsNameAvailabilityResult, self).__init__(**kwargs) + self.available = available + + +class DnsSettings(msrest.serialization.Model): + """DNS Proxy Settings in Firewall Policy. + + :ivar servers: List of Custom DNS Servers. + :vartype servers: list[str] + :ivar enable_proxy: Enable DNS Proxy on Firewalls attached to the Firewall Policy. + :vartype enable_proxy: bool + :ivar require_proxy_for_network_rules: FQDNs in Network Rules are supported when set to true. + :vartype require_proxy_for_network_rules: bool + """ + + _attribute_map = { + 'servers': {'key': 'servers', 'type': '[str]'}, + 'enable_proxy': {'key': 'enableProxy', 'type': 'bool'}, + 'require_proxy_for_network_rules': {'key': 'requireProxyForNetworkRules', 'type': 'bool'}, + } + + def __init__( + self, + *, + servers: Optional[List[str]] = None, + enable_proxy: Optional[bool] = None, + require_proxy_for_network_rules: Optional[bool] = None, + **kwargs + ): + """ + :keyword servers: List of Custom DNS Servers. + :paramtype servers: list[str] + :keyword enable_proxy: Enable DNS Proxy on Firewalls attached to the Firewall Policy. + :paramtype enable_proxy: bool + :keyword require_proxy_for_network_rules: FQDNs in Network Rules are supported when set to + true. + :paramtype require_proxy_for_network_rules: bool + """ + super(DnsSettings, self).__init__(**kwargs) + self.servers = servers + self.enable_proxy = enable_proxy + self.require_proxy_for_network_rules = require_proxy_for_network_rules + + +class DscpConfiguration(Resource): + """Differentiated Services Code Point configuration for any given network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar markings: List of markings to be used in the configuration. + :vartype markings: list[int] + :ivar source_ip_ranges: Source IP ranges. + :vartype source_ip_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosIpRange] + :ivar destination_ip_ranges: Destination IP ranges. + :vartype destination_ip_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosIpRange] + :ivar source_port_ranges: Sources port ranges. + :vartype source_port_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosPortRange] + :ivar destination_port_ranges: Destination port ranges. + :vartype destination_port_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosPortRange] + :ivar protocol: RNM supported protocol types. Possible values include: "DoNotUse", "Icmp", + "Tcp", "Udp", "Gre", "Esp", "Ah", "Vxlan", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ProtocolType + :ivar qos_definition_collection: QoS object definitions. + :vartype qos_definition_collection: list[~azure.mgmt.network.v2021_08_01.models.QosDefinition] + :ivar qos_collection_id: Qos Collection ID generated by RNM. + :vartype qos_collection_id: str + :ivar associated_network_interfaces: Associated Network Interfaces to the DSCP Configuration. + :vartype associated_network_interfaces: + list[~azure.mgmt.network.v2021_08_01.models.NetworkInterface] + :ivar resource_guid: The resource GUID property of the DSCP Configuration resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DSCP Configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'qos_collection_id': {'readonly': True}, + 'associated_network_interfaces': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'markings': {'key': 'properties.markings', 'type': '[int]'}, + 'source_ip_ranges': {'key': 'properties.sourceIpRanges', 'type': '[QosIpRange]'}, + 'destination_ip_ranges': {'key': 'properties.destinationIpRanges', 'type': '[QosIpRange]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[QosPortRange]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[QosPortRange]'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'qos_definition_collection': {'key': 'properties.qosDefinitionCollection', 'type': '[QosDefinition]'}, + 'qos_collection_id': {'key': 'properties.qosCollectionId', 'type': 'str'}, + 'associated_network_interfaces': {'key': 'properties.associatedNetworkInterfaces', 'type': '[NetworkInterface]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + markings: Optional[List[int]] = None, + source_ip_ranges: Optional[List["QosIpRange"]] = None, + destination_ip_ranges: Optional[List["QosIpRange"]] = None, + source_port_ranges: Optional[List["QosPortRange"]] = None, + destination_port_ranges: Optional[List["QosPortRange"]] = None, + protocol: Optional[Union[str, "ProtocolType"]] = None, + qos_definition_collection: Optional[List["QosDefinition"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword markings: List of markings to be used in the configuration. + :paramtype markings: list[int] + :keyword source_ip_ranges: Source IP ranges. + :paramtype source_ip_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosIpRange] + :keyword destination_ip_ranges: Destination IP ranges. + :paramtype destination_ip_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosIpRange] + :keyword source_port_ranges: Sources port ranges. + :paramtype source_port_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosPortRange] + :keyword destination_port_ranges: Destination port ranges. + :paramtype destination_port_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosPortRange] + :keyword protocol: RNM supported protocol types. Possible values include: "DoNotUse", "Icmp", + "Tcp", "Udp", "Gre", "Esp", "Ah", "Vxlan", "All". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ProtocolType + :keyword qos_definition_collection: QoS object definitions. + :paramtype qos_definition_collection: + list[~azure.mgmt.network.v2021_08_01.models.QosDefinition] + """ + super(DscpConfiguration, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.markings = markings + self.source_ip_ranges = source_ip_ranges + self.destination_ip_ranges = destination_ip_ranges + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.protocol = protocol + self.qos_definition_collection = qos_definition_collection + self.qos_collection_id = None + self.associated_network_interfaces = None + self.resource_guid = None + self.provisioning_state = None + + +class DscpConfigurationListResult(msrest.serialization.Model): + """Response for the DscpConfigurationList API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of dscp configurations in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.DscpConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DscpConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DscpConfiguration"]] = None, + **kwargs + ): + """ + :keyword value: A list of dscp configurations in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.DscpConfiguration] + """ + super(DscpConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class EffectiveNetworkSecurityGroup(msrest.serialization.Model): + """Effective network security group. + + :ivar network_security_group: The ID of network security group that is applied. + :vartype network_security_group: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar association: Associated resources. + :vartype association: + ~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityGroupAssociation + :ivar effective_security_rules: A collection of effective security rules. + :vartype effective_security_rules: + list[~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityRule] + :ivar tag_map: Mapping of tags to list of IP Addresses included within the tag. + :vartype tag_map: str + """ + + _attribute_map = { + 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, + 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, + 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, + 'tag_map': {'key': 'tagMap', 'type': 'str'}, + } + + def __init__( + self, + *, + network_security_group: Optional["SubResource"] = None, + association: Optional["EffectiveNetworkSecurityGroupAssociation"] = None, + effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, + tag_map: Optional[str] = None, + **kwargs + ): + """ + :keyword network_security_group: The ID of network security group that is applied. + :paramtype network_security_group: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword association: Associated resources. + :paramtype association: + ~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityGroupAssociation + :keyword effective_security_rules: A collection of effective security rules. + :paramtype effective_security_rules: + list[~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityRule] + :keyword tag_map: Mapping of tags to list of IP Addresses included within the tag. + :paramtype tag_map: str + """ + super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) + self.network_security_group = network_security_group + self.association = association + self.effective_security_rules = effective_security_rules + self.tag_map = tag_map + + +class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): + """The effective network security group association. + + :ivar network_manager: The ID of the Azure network manager if assigned. + :vartype network_manager: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar subnet: The ID of the subnet if assigned. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar network_interface: The ID of the network interface if assigned. + :vartype network_interface: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _attribute_map = { + 'network_manager': {'key': 'networkManager', 'type': 'SubResource'}, + 'subnet': {'key': 'subnet', 'type': 'SubResource'}, + 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + network_manager: Optional["SubResource"] = None, + subnet: Optional["SubResource"] = None, + network_interface: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword network_manager: The ID of the Azure network manager if assigned. + :paramtype network_manager: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword subnet: The ID of the subnet if assigned. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword network_interface: The ID of the network interface if assigned. + :paramtype network_interface: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) + self.network_manager = network_manager + self.subnet = subnet + self.network_interface = network_interface + + +class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): + """Response for list effective network security groups API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of effective network security groups. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveNetworkSecurityGroup"]] = None, + **kwargs + ): + """ + :keyword value: A list of effective network security groups. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityGroup] + """ + super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class EffectiveNetworkSecurityRule(msrest.serialization.Model): + """Effective network security rules. + + :ivar name: The name of the security rule specified by the user (if created by the user). + :vartype name: str + :ivar protocol: The network protocol this rule applies to. Possible values include: "Tcp", + "Udp", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.EffectiveSecurityRuleProtocol + :ivar source_port_range: The source port or range. + :vartype source_port_range: str + :ivar destination_port_range: The destination port or range. + :vartype destination_port_range: str + :ivar source_port_ranges: The source port ranges. Expected values include a single integer + between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. Expected values include a single + integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + :vartype destination_port_ranges: list[str] + :ivar source_address_prefix: The source address prefix. + :vartype source_address_prefix: str + :ivar destination_address_prefix: The destination address prefix. + :vartype destination_address_prefix: str + :ivar source_address_prefixes: The source address prefixes. Expected values include CIDR IP + ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the + asterisk (*). + :vartype source_address_prefixes: list[str] + :ivar destination_address_prefixes: The destination address prefixes. Expected values include + CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and + the asterisk (*). + :vartype destination_address_prefixes: list[str] + :ivar expanded_source_address_prefix: The expanded source address prefix. + :vartype expanded_source_address_prefix: list[str] + :ivar expanded_destination_address_prefix: Expanded destination address prefix. + :vartype expanded_destination_address_prefix: list[str] + :ivar access: Whether network traffic is allowed or denied. Possible values include: "Allow", + "Deny". + :vartype access: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleAccess + :ivar priority: The priority of the rule. + :vartype priority: int + :ivar direction: The direction of the rule. Possible values include: "Inbound", "Outbound". + :vartype direction: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleDirection + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, + 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, + 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, + 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, + 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, + 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, + 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, + 'access': {'key': 'access', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + protocol: Optional[Union[str, "EffectiveSecurityRuleProtocol"]] = None, + source_port_range: Optional[str] = None, + destination_port_range: Optional[str] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + source_address_prefix: Optional[str] = None, + destination_address_prefix: Optional[str] = None, + source_address_prefixes: Optional[List[str]] = None, + destination_address_prefixes: Optional[List[str]] = None, + expanded_source_address_prefix: Optional[List[str]] = None, + expanded_destination_address_prefix: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityRuleDirection"]] = None, + **kwargs + ): + """ + :keyword name: The name of the security rule specified by the user (if created by the user). + :paramtype name: str + :keyword protocol: The network protocol this rule applies to. Possible values include: "Tcp", + "Udp", "All". + :paramtype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.EffectiveSecurityRuleProtocol + :keyword source_port_range: The source port or range. + :paramtype source_port_range: str + :keyword destination_port_range: The destination port or range. + :paramtype destination_port_range: str + :keyword source_port_ranges: The source port ranges. Expected values include a single integer + between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + :paramtype source_port_ranges: list[str] + :keyword destination_port_ranges: The destination port ranges. Expected values include a single + integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + :paramtype destination_port_ranges: list[str] + :keyword source_address_prefix: The source address prefix. + :paramtype source_address_prefix: str + :keyword destination_address_prefix: The destination address prefix. + :paramtype destination_address_prefix: str + :keyword source_address_prefixes: The source address prefixes. Expected values include CIDR IP + ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the + asterisk (*). + :paramtype source_address_prefixes: list[str] + :keyword destination_address_prefixes: The destination address prefixes. Expected values + include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System + Tags, and the asterisk (*). + :paramtype destination_address_prefixes: list[str] + :keyword expanded_source_address_prefix: The expanded source address prefix. + :paramtype expanded_source_address_prefix: list[str] + :keyword expanded_destination_address_prefix: Expanded destination address prefix. + :paramtype expanded_destination_address_prefix: list[str] + :keyword access: Whether network traffic is allowed or denied. Possible values include: + "Allow", "Deny". + :paramtype access: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleAccess + :keyword priority: The priority of the rule. + :paramtype priority: int + :keyword direction: The direction of the rule. Possible values include: "Inbound", "Outbound". + :paramtype direction: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleDirection + """ + super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) + self.name = name + self.protocol = protocol + self.source_port_range = source_port_range + self.destination_port_range = destination_port_range + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.source_address_prefix = source_address_prefix + self.destination_address_prefix = destination_address_prefix + self.source_address_prefixes = source_address_prefixes + self.destination_address_prefixes = destination_address_prefixes + self.expanded_source_address_prefix = expanded_source_address_prefix + self.expanded_destination_address_prefix = expanded_destination_address_prefix + self.access = access + self.priority = priority + self.direction = direction + + +class EffectiveRoute(msrest.serialization.Model): + """Effective Route. + + :ivar name: The name of the user defined route. This is optional. + :vartype name: str + :ivar disable_bgp_route_propagation: If true, on-premises routes are not propagated to the + network interfaces in the subnet. + :vartype disable_bgp_route_propagation: bool + :ivar source: Who created the route. Possible values include: "Unknown", "User", + "VirtualNetworkGateway", "Default". + :vartype source: str or ~azure.mgmt.network.v2021_08_01.models.EffectiveRouteSource + :ivar state: The value of effective route. Possible values include: "Active", "Invalid". + :vartype state: str or ~azure.mgmt.network.v2021_08_01.models.EffectiveRouteState + :ivar address_prefix: The address prefixes of the effective routes in CIDR notation. + :vartype address_prefix: list[str] + :ivar next_hop_ip_address: The IP address of the next hop of the effective route. + :vartype next_hop_ip_address: list[str] + :ivar next_hop_type: The type of Azure hop the packet should be sent to. Possible values + include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". + :vartype next_hop_type: str or ~azure.mgmt.network.v2021_08_01.models.RouteNextHopType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disable_bgp_route_propagation': {'key': 'disableBgpRoutePropagation', 'type': 'bool'}, + 'source': {'key': 'source', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + disable_bgp_route_propagation: Optional[bool] = None, + source: Optional[Union[str, "EffectiveRouteSource"]] = None, + state: Optional[Union[str, "EffectiveRouteState"]] = None, + address_prefix: Optional[List[str]] = None, + next_hop_ip_address: Optional[List[str]] = None, + next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, + **kwargs + ): + """ + :keyword name: The name of the user defined route. This is optional. + :paramtype name: str + :keyword disable_bgp_route_propagation: If true, on-premises routes are not propagated to the + network interfaces in the subnet. + :paramtype disable_bgp_route_propagation: bool + :keyword source: Who created the route. Possible values include: "Unknown", "User", + "VirtualNetworkGateway", "Default". + :paramtype source: str or ~azure.mgmt.network.v2021_08_01.models.EffectiveRouteSource + :keyword state: The value of effective route. Possible values include: "Active", "Invalid". + :paramtype state: str or ~azure.mgmt.network.v2021_08_01.models.EffectiveRouteState + :keyword address_prefix: The address prefixes of the effective routes in CIDR notation. + :paramtype address_prefix: list[str] + :keyword next_hop_ip_address: The IP address of the next hop of the effective route. + :paramtype next_hop_ip_address: list[str] + :keyword next_hop_type: The type of Azure hop the packet should be sent to. Possible values + include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". + :paramtype next_hop_type: str or ~azure.mgmt.network.v2021_08_01.models.RouteNextHopType + """ + super(EffectiveRoute, self).__init__(**kwargs) + self.name = name + self.disable_bgp_route_propagation = disable_bgp_route_propagation + self.source = source + self.state = state + self.address_prefix = address_prefix + self.next_hop_ip_address = next_hop_ip_address + self.next_hop_type = next_hop_type + + +class EffectiveRouteListResult(msrest.serialization.Model): + """Response for list effective route API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of effective routes. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.EffectiveRoute] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveRoute"]] = None, + **kwargs + ): + """ + :keyword value: A list of effective routes. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.EffectiveRoute] + """ + super(EffectiveRouteListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class EffectiveRoutesParameters(msrest.serialization.Model): + """The parameters specifying the resource whose effective routes are being requested. + + :ivar resource_id: The resource whose effective routes are being requested. + :vartype resource_id: str + :ivar virtual_wan_resource_type: The type of the specified resource like RouteTable, + ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. + :vartype virtual_wan_resource_type: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'virtual_wan_resource_type': {'key': 'virtualWanResourceType', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + virtual_wan_resource_type: Optional[str] = None, + **kwargs + ): + """ + :keyword resource_id: The resource whose effective routes are being requested. + :paramtype resource_id: str + :keyword virtual_wan_resource_type: The type of the specified resource like RouteTable, + ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. + :paramtype virtual_wan_resource_type: str + """ + super(EffectiveRoutesParameters, self).__init__(**kwargs) + self.resource_id = resource_id + self.virtual_wan_resource_type = virtual_wan_resource_type + + +class EndpointServiceResult(SubResource): + """Endpoint service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the endpoint service. + :vartype name: str + :ivar type: Type of the endpoint service. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + """ + super(EndpointServiceResult, self).__init__(id=id, **kwargs) + self.name = None + self.type = None + + +class EndpointServicesListResult(msrest.serialization.Model): + """Response for the ListAvailableEndpointServices API service call. + + :ivar value: List of available endpoint services in a region. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.EndpointServiceResult] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EndpointServiceResult"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of available endpoint services in a region. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.EndpointServiceResult] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(EndpointServicesListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Error(msrest.serialization.Model): + """Common error representation. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + :ivar target: Error target. + :vartype target: str + :ivar details: Error details. + :vartype details: list[~azure.mgmt.network.v2021_08_01.models.ErrorDetails] + :ivar inner_error: Inner error message. + :vartype inner_error: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetails]'}, + 'inner_error': {'key': 'innerError', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["ErrorDetails"]] = None, + inner_error: Optional[str] = None, + **kwargs + ): + """ + :keyword code: Error code. + :paramtype code: str + :keyword message: Error message. + :paramtype message: str + :keyword target: Error target. + :paramtype target: str + :keyword details: Error details. + :paramtype details: list[~azure.mgmt.network.v2021_08_01.models.ErrorDetails] + :keyword inner_error: Inner error message. + :paramtype inner_error: str + """ + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + self.inner_error = inner_error + + +class ErrorDetails(msrest.serialization.Model): + """Common error details representation. + + :ivar code: Error code. + :vartype code: str + :ivar target: Error target. + :vartype target: str + :ivar message: Error message. + :vartype message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + target: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + """ + :keyword code: Error code. + :paramtype code: str + :keyword target: Error target. + :paramtype target: str + :keyword message: Error message. + :paramtype message: str + """ + super(ErrorDetails, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class ErrorResponse(msrest.serialization.Model): + """The error object. + + :ivar error: The error details object. + :vartype error: ~azure.mgmt.network.v2021_08_01.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetails"] = None, + **kwargs + ): + """ + :keyword error: The error details object. + :paramtype error: ~azure.mgmt.network.v2021_08_01.models.ErrorDetails + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class EvaluatedNetworkSecurityGroup(msrest.serialization.Model): + """Results of network security group evaluation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar network_security_group_id: Network security group ID. + :vartype network_security_group_id: str + :ivar applied_to: Resource ID of nic or subnet to which network security group is applied. + :vartype applied_to: str + :ivar matched_rule: Matched network security rule. + :vartype matched_rule: ~azure.mgmt.network.v2021_08_01.models.MatchedRule + :ivar rules_evaluation_result: List of network security rules evaluation results. + :vartype rules_evaluation_result: + list[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityRulesEvaluationResult] + """ + + _validation = { + 'rules_evaluation_result': {'readonly': True}, + } + + _attribute_map = { + 'network_security_group_id': {'key': 'networkSecurityGroupId', 'type': 'str'}, + 'applied_to': {'key': 'appliedTo', 'type': 'str'}, + 'matched_rule': {'key': 'matchedRule', 'type': 'MatchedRule'}, + 'rules_evaluation_result': {'key': 'rulesEvaluationResult', 'type': '[NetworkSecurityRulesEvaluationResult]'}, + } + + def __init__( + self, + *, + network_security_group_id: Optional[str] = None, + applied_to: Optional[str] = None, + matched_rule: Optional["MatchedRule"] = None, + **kwargs + ): + """ + :keyword network_security_group_id: Network security group ID. + :paramtype network_security_group_id: str + :keyword applied_to: Resource ID of nic or subnet to which network security group is applied. + :paramtype applied_to: str + :keyword matched_rule: Matched network security rule. + :paramtype matched_rule: ~azure.mgmt.network.v2021_08_01.models.MatchedRule + """ + super(EvaluatedNetworkSecurityGroup, self).__init__(**kwargs) + self.network_security_group_id = network_security_group_id + self.applied_to = applied_to + self.matched_rule = matched_rule + self.rules_evaluation_result = None + + +class ExclusionManagedRule(msrest.serialization.Model): + """Defines a managed rule to use for exclusion. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_id: Required. Identifier for the managed rule. + :vartype rule_id: str + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + } + + def __init__( + self, + *, + rule_id: str, + **kwargs + ): + """ + :keyword rule_id: Required. Identifier for the managed rule. + :paramtype rule_id: str + """ + super(ExclusionManagedRule, self).__init__(**kwargs) + self.rule_id = rule_id + + +class ExclusionManagedRuleGroup(msrest.serialization.Model): + """Defines a managed rule group to use for exclusion. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_group_name: Required. The managed rule group for exclusion. + :vartype rule_group_name: str + :ivar rules: List of rules that will be excluded. If none specified, all rules in the group + will be excluded. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.ExclusionManagedRule] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ExclusionManagedRule]'}, + } + + def __init__( + self, + *, + rule_group_name: str, + rules: Optional[List["ExclusionManagedRule"]] = None, + **kwargs + ): + """ + :keyword rule_group_name: Required. The managed rule group for exclusion. + :paramtype rule_group_name: str + :keyword rules: List of rules that will be excluded. If none specified, all rules in the group + will be excluded. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.ExclusionManagedRule] + """ + super(ExclusionManagedRuleGroup, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.rules = rules + + +class ExclusionManagedRuleSet(msrest.serialization.Model): + """Defines a managed rule set for Exclusions. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_set_type: Required. Defines the rule set type to use. + :vartype rule_set_type: str + :ivar rule_set_version: Required. Defines the version of the rule set to use. + :vartype rule_set_version: str + :ivar rule_groups: Defines the rule groups to apply to the rule set. + :vartype rule_groups: list[~azure.mgmt.network.v2021_08_01.models.ExclusionManagedRuleGroup] + """ + + _validation = { + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + } + + _attribute_map = { + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ExclusionManagedRuleGroup]'}, + } + + def __init__( + self, + *, + rule_set_type: str, + rule_set_version: str, + rule_groups: Optional[List["ExclusionManagedRuleGroup"]] = None, + **kwargs + ): + """ + :keyword rule_set_type: Required. Defines the rule set type to use. + :paramtype rule_set_type: str + :keyword rule_set_version: Required. Defines the version of the rule set to use. + :paramtype rule_set_version: str + :keyword rule_groups: Defines the rule groups to apply to the rule set. + :paramtype rule_groups: list[~azure.mgmt.network.v2021_08_01.models.ExclusionManagedRuleGroup] + """ + super(ExclusionManagedRuleSet, self).__init__(**kwargs) + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.rule_groups = rule_groups + + +class ExplicitProxySettings(msrest.serialization.Model): + """Explicit Proxy Settings in Firewall Policy. + + :ivar enable_explicit_proxy: When set to true, explicit proxy mode is enabled. + :vartype enable_explicit_proxy: bool + :ivar http_port: Port number for explicit proxy http protocol, cannot be greater than 64000. + :vartype http_port: int + :ivar https_port: Port number for explicit proxy https protocol, cannot be greater than 64000. + :vartype https_port: int + :ivar pac_file_port: Port number for firewall to serve PAC file. + :vartype pac_file_port: int + :ivar pac_file: SAS URL for PAC file. + :vartype pac_file: str + """ + + _validation = { + 'http_port': {'maximum': 64000, 'minimum': 0}, + 'https_port': {'maximum': 64000, 'minimum': 0}, + 'pac_file_port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'enable_explicit_proxy': {'key': 'enableExplicitProxy', 'type': 'bool'}, + 'http_port': {'key': 'httpPort', 'type': 'int'}, + 'https_port': {'key': 'httpsPort', 'type': 'int'}, + 'pac_file_port': {'key': 'pacFilePort', 'type': 'int'}, + 'pac_file': {'key': 'pacFile', 'type': 'str'}, + } + + def __init__( + self, + *, + enable_explicit_proxy: Optional[bool] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + pac_file_port: Optional[int] = None, + pac_file: Optional[str] = None, + **kwargs + ): + """ + :keyword enable_explicit_proxy: When set to true, explicit proxy mode is enabled. + :paramtype enable_explicit_proxy: bool + :keyword http_port: Port number for explicit proxy http protocol, cannot be greater than 64000. + :paramtype http_port: int + :keyword https_port: Port number for explicit proxy https protocol, cannot be greater than + 64000. + :paramtype https_port: int + :keyword pac_file_port: Port number for firewall to serve PAC file. + :paramtype pac_file_port: int + :keyword pac_file: SAS URL for PAC file. + :paramtype pac_file: str + """ + super(ExplicitProxySettings, self).__init__(**kwargs) + self.enable_explicit_proxy = enable_explicit_proxy + self.http_port = http_port + self.https_port = https_port + self.pac_file_port = pac_file_port + self.pac_file = pac_file + + +class ExpressRouteCircuit(Resource): + """ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar sku: The SKU. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar allow_classic_operations: Allow classic operations. + :vartype allow_classic_operations: bool + :ivar circuit_provisioning_state: The CircuitProvisioningState state of the resource. + :vartype circuit_provisioning_state: str + :ivar service_provider_provisioning_state: The ServiceProviderProvisioningState state of the + resource. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", + "Deprovisioning". + :vartype service_provider_provisioning_state: str or + ~azure.mgmt.network.v2021_08_01.models.ServiceProviderProvisioningState + :ivar authorizations: The list of authorizations. + :vartype authorizations: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization] + :ivar peerings: The list of peerings. + :vartype peerings: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :ivar service_key: The ServiceKey. + :vartype service_key: str + :ivar service_provider_notes: The ServiceProviderNotes. + :vartype service_provider_notes: str + :ivar service_provider_properties: The ServiceProviderProperties. + :vartype service_provider_properties: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitServiceProviderProperties + :ivar express_route_port: The reference to the ExpressRoutePort resource when the circuit is + provisioned on an ExpressRoutePort resource. + :vartype express_route_port: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar bandwidth_in_gbps: The bandwidth of the circuit when the circuit is provisioned on an + ExpressRoutePort resource. + :vartype bandwidth_in_gbps: float + :ivar stag: The identifier of the circuit traffic. Outer tag for QinQ encapsulation. + :vartype stag: int + :ivar provisioning_state: The provisioning state of the express route circuit resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar gateway_manager_etag: The GatewayManager Etag. + :vartype gateway_manager_etag: str + :ivar global_reach_enabled: Flag denoting global reach status. + :vartype global_reach_enabled: bool + :ivar authorization_key: The authorizationKey. + :vartype authorization_key: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'stag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, + 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, + 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, + 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, + 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, + 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, + 'express_route_port': {'key': 'properties.expressRoutePort', 'type': 'SubResource'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'float'}, + 'stag': {'key': 'properties.stag', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'global_reach_enabled': {'key': 'properties.globalReachEnabled', 'type': 'bool'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ExpressRouteCircuitSku"] = None, + allow_classic_operations: Optional[bool] = None, + circuit_provisioning_state: Optional[str] = None, + service_provider_provisioning_state: Optional[Union[str, "ServiceProviderProvisioningState"]] = None, + authorizations: Optional[List["ExpressRouteCircuitAuthorization"]] = None, + peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, + service_key: Optional[str] = None, + service_provider_notes: Optional[str] = None, + service_provider_properties: Optional["ExpressRouteCircuitServiceProviderProperties"] = None, + express_route_port: Optional["SubResource"] = None, + bandwidth_in_gbps: Optional[float] = None, + gateway_manager_etag: Optional[str] = None, + global_reach_enabled: Optional[bool] = None, + authorization_key: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword sku: The SKU. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitSku + :keyword allow_classic_operations: Allow classic operations. + :paramtype allow_classic_operations: bool + :keyword circuit_provisioning_state: The CircuitProvisioningState state of the resource. + :paramtype circuit_provisioning_state: str + :keyword service_provider_provisioning_state: The ServiceProviderProvisioningState state of the + resource. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", + "Deprovisioning". + :paramtype service_provider_provisioning_state: str or + ~azure.mgmt.network.v2021_08_01.models.ServiceProviderProvisioningState + :keyword authorizations: The list of authorizations. + :paramtype authorizations: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization] + :keyword peerings: The list of peerings. + :paramtype peerings: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :keyword service_key: The ServiceKey. + :paramtype service_key: str + :keyword service_provider_notes: The ServiceProviderNotes. + :paramtype service_provider_notes: str + :keyword service_provider_properties: The ServiceProviderProperties. + :paramtype service_provider_properties: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitServiceProviderProperties + :keyword express_route_port: The reference to the ExpressRoutePort resource when the circuit is + provisioned on an ExpressRoutePort resource. + :paramtype express_route_port: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword bandwidth_in_gbps: The bandwidth of the circuit when the circuit is provisioned on an + ExpressRoutePort resource. + :paramtype bandwidth_in_gbps: float + :keyword gateway_manager_etag: The GatewayManager Etag. + :paramtype gateway_manager_etag: str + :keyword global_reach_enabled: Flag denoting global reach status. + :paramtype global_reach_enabled: bool + :keyword authorization_key: The authorizationKey. + :paramtype authorization_key: str + """ + super(ExpressRouteCircuit, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.sku = sku + self.etag = None + self.allow_classic_operations = allow_classic_operations + self.circuit_provisioning_state = circuit_provisioning_state + self.service_provider_provisioning_state = service_provider_provisioning_state + self.authorizations = authorizations + self.peerings = peerings + self.service_key = service_key + self.service_provider_notes = service_provider_notes + self.service_provider_properties = service_provider_properties + self.express_route_port = express_route_port + self.bandwidth_in_gbps = bandwidth_in_gbps + self.stag = None + self.provisioning_state = None + self.gateway_manager_etag = gateway_manager_etag + self.global_reach_enabled = global_reach_enabled + self.authorization_key = authorization_key + + +class ExpressRouteCircuitArpTable(msrest.serialization.Model): + """The ARP table associated with the ExpressRouteCircuit. + + :ivar age: Entry age in minutes. + :vartype age: int + :ivar interface: Interface address. + :vartype interface: str + :ivar ip_address: The IP address. + :vartype ip_address: str + :ivar mac_address: The MAC address. + :vartype mac_address: str + """ + + _attribute_map = { + 'age': {'key': 'age', 'type': 'int'}, + 'interface': {'key': 'interface', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + age: Optional[int] = None, + interface: Optional[str] = None, + ip_address: Optional[str] = None, + mac_address: Optional[str] = None, + **kwargs + ): + """ + :keyword age: Entry age in minutes. + :paramtype age: int + :keyword interface: Interface address. + :paramtype interface: str + :keyword ip_address: The IP address. + :paramtype ip_address: str + :keyword mac_address: The MAC address. + :paramtype mac_address: str + """ + super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) + self.age = age + self.interface = interface + self.ip_address = ip_address + self.mac_address = mac_address + + +class ExpressRouteCircuitAuthorization(SubResource): + """Authorization in an ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar authorization_key: The authorization key. + :vartype authorization_key: str + :ivar authorization_use_status: The authorization use status. Possible values include: + "Available", "InUse". + :vartype authorization_use_status: str or + ~azure.mgmt.network.v2021_08_01.models.AuthorizationUseStatus + :ivar provisioning_state: The provisioning state of the authorization resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + authorization_key: Optional[str] = None, + authorization_use_status: Optional[Union[str, "AuthorizationUseStatus"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword authorization_key: The authorization key. + :paramtype authorization_key: str + :keyword authorization_use_status: The authorization use status. Possible values include: + "Available", "InUse". + :paramtype authorization_use_status: str or + ~azure.mgmt.network.v2021_08_01.models.AuthorizationUseStatus + """ + super(ExpressRouteCircuitAuthorization, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.authorization_key = authorization_key + self.authorization_use_status = authorization_use_status + self.provisioning_state = None + + +class ExpressRouteCircuitConnection(SubResource): + """Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the circuit initiating connection. + :vartype express_route_circuit_peering: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar peer_express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the peered circuit. + :vartype peer_express_route_circuit_peering: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar address_prefix: /29 IP address space to carve out Customer addresses for tunnels. + :vartype address_prefix: str + :ivar authorization_key: The authorization key. + :vartype authorization_key: str + :ivar ipv6_circuit_connection_config: IPv6 Address PrefixProperties of the express route + circuit connection. + :vartype ipv6_circuit_connection_config: + ~azure.mgmt.network.v2021_08_01.models.Ipv6CircuitConnectionConfig + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_08_01.models.CircuitConnectionStatus + :ivar provisioning_state: The provisioning state of the express route circuit connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'circuit_connection_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'SubResource'}, + 'peer_express_route_circuit_peering': {'key': 'properties.peerExpressRouteCircuitPeering', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'ipv6_circuit_connection_config': {'key': 'properties.ipv6CircuitConnectionConfig', 'type': 'Ipv6CircuitConnectionConfig'}, + 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + express_route_circuit_peering: Optional["SubResource"] = None, + peer_express_route_circuit_peering: Optional["SubResource"] = None, + address_prefix: Optional[str] = None, + authorization_key: Optional[str] = None, + ipv6_circuit_connection_config: Optional["Ipv6CircuitConnectionConfig"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the circuit initiating connection. + :paramtype express_route_circuit_peering: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword peer_express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the peered circuit. + :paramtype peer_express_route_circuit_peering: + ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword address_prefix: /29 IP address space to carve out Customer addresses for tunnels. + :paramtype address_prefix: str + :keyword authorization_key: The authorization key. + :paramtype authorization_key: str + :keyword ipv6_circuit_connection_config: IPv6 Address PrefixProperties of the express route + circuit connection. + :paramtype ipv6_circuit_connection_config: + ~azure.mgmt.network.v2021_08_01.models.Ipv6CircuitConnectionConfig + """ + super(ExpressRouteCircuitConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.express_route_circuit_peering = express_route_circuit_peering + self.peer_express_route_circuit_peering = peer_express_route_circuit_peering + self.address_prefix = address_prefix + self.authorization_key = authorization_key + self.ipv6_circuit_connection_config = ipv6_circuit_connection_config + self.circuit_connection_status = None + self.provisioning_state = None + + +class ExpressRouteCircuitConnectionListResult(msrest.serialization.Model): + """Response for ListConnections API service call retrieves all global reach connections that belongs to a Private Peering for an ExpressRouteCircuit. + + :ivar value: The global reach connection associated with Private Peering in an ExpressRoute + Circuit. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The global reach connection associated with Private Peering in an ExpressRoute + Circuit. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRouteCircuitConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitListResult(msrest.serialization.Model): + """Response for ListExpressRouteCircuit API service call. + + :ivar value: A list of ExpressRouteCircuits in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuit"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of ExpressRouteCircuits in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRouteCircuitListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitPeering(SubResource): + """Peering in an ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar peering_type: The peering type. Possible values include: "AzurePublicPeering", + "AzurePrivatePeering", "MicrosoftPeering". + :vartype peering_type: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePeeringType + :ivar state: The peering state. Possible values include: "Disabled", "Enabled". + :vartype state: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePeeringState + :ivar azure_asn: The Azure ASN. + :vartype azure_asn: int + :ivar peer_asn: The peer ASN. + :vartype peer_asn: long + :ivar primary_peer_address_prefix: The primary address prefix. + :vartype primary_peer_address_prefix: str + :ivar secondary_peer_address_prefix: The secondary address prefix. + :vartype secondary_peer_address_prefix: str + :ivar primary_azure_port: The primary port. + :vartype primary_azure_port: str + :ivar secondary_azure_port: The secondary port. + :vartype secondary_azure_port: str + :ivar shared_key: The shared key. + :vartype shared_key: str + :ivar vlan_id: The VLAN ID. + :vartype vlan_id: int + :ivar microsoft_peering_config: The Microsoft peering configuration. + :vartype microsoft_peering_config: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringConfig + :ivar stats: The peering stats of express route circuit. + :vartype stats: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitStats + :ivar provisioning_state: The provisioning state of the express route circuit peering resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar gateway_manager_etag: The GatewayManager Etag. + :vartype gateway_manager_etag: str + :ivar last_modified_by: Who was the last to modify the peering. + :vartype last_modified_by: str + :ivar route_filter: The reference to the RouteFilter resource. + :vartype route_filter: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar ipv6_peering_config: The IPv6 peering configuration. + :vartype ipv6_peering_config: + ~azure.mgmt.network.v2021_08_01.models.Ipv6ExpressRouteCircuitPeeringConfig + :ivar express_route_connection: The ExpressRoute connection. + :vartype express_route_connection: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnectionId + :ivar connections: The list of circuit connections associated with Azure Private Peering for + this circuit. + :vartype connections: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection] + :ivar peered_connections: The list of peered circuit connections associated with Azure Private + Peering for this circuit. + :vartype peered_connections: + list[~azure.mgmt.network.v2021_08_01.models.PeerExpressRouteCircuitConnection] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'peered_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, + 'peer_asn': {'key': 'properties.peerASN', 'type': 'long'}, + 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, + 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'route_filter': {'key': 'properties.routeFilter', 'type': 'SubResource'}, + 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, + 'express_route_connection': {'key': 'properties.expressRouteConnection', 'type': 'ExpressRouteConnectionId'}, + 'connections': {'key': 'properties.connections', 'type': '[ExpressRouteCircuitConnection]'}, + 'peered_connections': {'key': 'properties.peeredConnections', 'type': '[PeerExpressRouteCircuitConnection]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + peering_type: Optional[Union[str, "ExpressRoutePeeringType"]] = None, + state: Optional[Union[str, "ExpressRoutePeeringState"]] = None, + azure_asn: Optional[int] = None, + peer_asn: Optional[int] = None, + primary_peer_address_prefix: Optional[str] = None, + secondary_peer_address_prefix: Optional[str] = None, + primary_azure_port: Optional[str] = None, + secondary_azure_port: Optional[str] = None, + shared_key: Optional[str] = None, + vlan_id: Optional[int] = None, + microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, + stats: Optional["ExpressRouteCircuitStats"] = None, + gateway_manager_etag: Optional[str] = None, + route_filter: Optional["SubResource"] = None, + ipv6_peering_config: Optional["Ipv6ExpressRouteCircuitPeeringConfig"] = None, + express_route_connection: Optional["ExpressRouteConnectionId"] = None, + connections: Optional[List["ExpressRouteCircuitConnection"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword peering_type: The peering type. Possible values include: "AzurePublicPeering", + "AzurePrivatePeering", "MicrosoftPeering". + :paramtype peering_type: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePeeringType + :keyword state: The peering state. Possible values include: "Disabled", "Enabled". + :paramtype state: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePeeringState + :keyword azure_asn: The Azure ASN. + :paramtype azure_asn: int + :keyword peer_asn: The peer ASN. + :paramtype peer_asn: long + :keyword primary_peer_address_prefix: The primary address prefix. + :paramtype primary_peer_address_prefix: str + :keyword secondary_peer_address_prefix: The secondary address prefix. + :paramtype secondary_peer_address_prefix: str + :keyword primary_azure_port: The primary port. + :paramtype primary_azure_port: str + :keyword secondary_azure_port: The secondary port. + :paramtype secondary_azure_port: str + :keyword shared_key: The shared key. + :paramtype shared_key: str + :keyword vlan_id: The VLAN ID. + :paramtype vlan_id: int + :keyword microsoft_peering_config: The Microsoft peering configuration. + :paramtype microsoft_peering_config: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringConfig + :keyword stats: The peering stats of express route circuit. + :paramtype stats: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitStats + :keyword gateway_manager_etag: The GatewayManager Etag. + :paramtype gateway_manager_etag: str + :keyword route_filter: The reference to the RouteFilter resource. + :paramtype route_filter: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword ipv6_peering_config: The IPv6 peering configuration. + :paramtype ipv6_peering_config: + ~azure.mgmt.network.v2021_08_01.models.Ipv6ExpressRouteCircuitPeeringConfig + :keyword express_route_connection: The ExpressRoute connection. + :paramtype express_route_connection: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnectionId + :keyword connections: The list of circuit connections associated with Azure Private Peering for + this circuit. + :paramtype connections: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection] + """ + super(ExpressRouteCircuitPeering, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.peering_type = peering_type + self.state = state + self.azure_asn = azure_asn + self.peer_asn = peer_asn + self.primary_peer_address_prefix = primary_peer_address_prefix + self.secondary_peer_address_prefix = secondary_peer_address_prefix + self.primary_azure_port = primary_azure_port + self.secondary_azure_port = secondary_azure_port + self.shared_key = shared_key + self.vlan_id = vlan_id + self.microsoft_peering_config = microsoft_peering_config + self.stats = stats + self.provisioning_state = None + self.gateway_manager_etag = gateway_manager_etag + self.last_modified_by = None + self.route_filter = route_filter + self.ipv6_peering_config = ipv6_peering_config + self.express_route_connection = express_route_connection + self.connections = connections + self.peered_connections = None + + +class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): + """Specifies the peering configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar advertised_public_prefixes: The reference to AdvertisedPublicPrefixes. + :vartype advertised_public_prefixes: list[str] + :ivar advertised_communities: The communities of bgp peering. Specified for microsoft peering. + :vartype advertised_communities: list[str] + :ivar advertised_public_prefixes_state: The advertised public prefix state of the Peering + resource. Possible values include: "NotConfigured", "Configuring", "Configured", + "ValidationNeeded". + :vartype advertised_public_prefixes_state: str or + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState + :ivar legacy_mode: The legacy mode of the peering. + :vartype legacy_mode: int + :ivar customer_asn: The CustomerASN of the peering. + :vartype customer_asn: int + :ivar routing_registry_name: The RoutingRegistryName of the configuration. + :vartype routing_registry_name: str + """ + + _validation = { + 'advertised_public_prefixes_state': {'readonly': True}, + } + + _attribute_map = { + 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, + 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, + 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, + 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, + 'customer_asn': {'key': 'customerASN', 'type': 'int'}, + 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, + } + + def __init__( + self, + *, + advertised_public_prefixes: Optional[List[str]] = None, + advertised_communities: Optional[List[str]] = None, + legacy_mode: Optional[int] = None, + customer_asn: Optional[int] = None, + routing_registry_name: Optional[str] = None, + **kwargs + ): + """ + :keyword advertised_public_prefixes: The reference to AdvertisedPublicPrefixes. + :paramtype advertised_public_prefixes: list[str] + :keyword advertised_communities: The communities of bgp peering. Specified for microsoft + peering. + :paramtype advertised_communities: list[str] + :keyword legacy_mode: The legacy mode of the peering. + :paramtype legacy_mode: int + :keyword customer_asn: The CustomerASN of the peering. + :paramtype customer_asn: int + :keyword routing_registry_name: The RoutingRegistryName of the configuration. + :paramtype routing_registry_name: str + """ + super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) + self.advertised_public_prefixes = advertised_public_prefixes + self.advertised_communities = advertised_communities + self.advertised_public_prefixes_state = None + self.legacy_mode = legacy_mode + self.customer_asn = customer_asn + self.routing_registry_name = routing_registry_name + + +class ExpressRouteCircuitPeeringId(msrest.serialization.Model): + """ExpressRoute circuit peering identifier. + + :ivar id: The ID of the ExpressRoute circuit peering. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: The ID of the ExpressRoute circuit peering. + :paramtype id: str + """ + super(ExpressRouteCircuitPeeringId, self).__init__(**kwargs) + self.id = id + + +class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): + """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. + + :ivar value: The peerings in an express route circuit. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitPeering"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The peerings in an express route circuit. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitReference(msrest.serialization.Model): + """Reference to an express route circuit. + + :ivar id: Corresponding Express Route Circuit Id. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Corresponding Express Route Circuit Id. + :paramtype id: str + """ + super(ExpressRouteCircuitReference, self).__init__(**kwargs) + self.id = id + + +class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :ivar network: IP address of a network entity. + :vartype network: str + :ivar next_hop: NextHop address. + :vartype next_hop: str + :ivar loc_prf: Local preference value as set with the set local-preference route-map + configuration command. + :vartype loc_prf: str + :ivar weight: Route Weight. + :vartype weight: int + :ivar path: Autonomous system paths to the destination network. + :vartype path: str + """ + + _attribute_map = { + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'loc_prf': {'key': 'locPrf', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + *, + network: Optional[str] = None, + next_hop: Optional[str] = None, + loc_prf: Optional[str] = None, + weight: Optional[int] = None, + path: Optional[str] = None, + **kwargs + ): + """ + :keyword network: IP address of a network entity. + :paramtype network: str + :keyword next_hop: NextHop address. + :paramtype next_hop: str + :keyword loc_prf: Local preference value as set with the set local-preference route-map + configuration command. + :paramtype loc_prf: str + :keyword weight: Route Weight. + :paramtype weight: int + :keyword path: Autonomous system paths to the destination network. + :paramtype path: str + """ + super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) + self.network = network + self.next_hop = next_hop + self.loc_prf = loc_prf + self.weight = weight + self.path = path + + +class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :ivar neighbor: IP address of the neighbor. + :vartype neighbor: str + :ivar v: BGP version number spoken to the neighbor. + :vartype v: int + :ivar as_property: Autonomous system number. + :vartype as_property: int + :ivar up_down: The length of time that the BGP session has been in the Established state, or + the current status if not in the Established state. + :vartype up_down: str + :ivar state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have + been received from a neighbor or peer group. + :vartype state_pfx_rcd: str + """ + + _attribute_map = { + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'v': {'key': 'v', 'type': 'int'}, + 'as_property': {'key': 'as', 'type': 'int'}, + 'up_down': {'key': 'upDown', 'type': 'str'}, + 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, + } + + def __init__( + self, + *, + neighbor: Optional[str] = None, + v: Optional[int] = None, + as_property: Optional[int] = None, + up_down: Optional[str] = None, + state_pfx_rcd: Optional[str] = None, + **kwargs + ): + """ + :keyword neighbor: IP address of the neighbor. + :paramtype neighbor: str + :keyword v: BGP version number spoken to the neighbor. + :paramtype v: int + :keyword as_property: Autonomous system number. + :paramtype as_property: int + :keyword up_down: The length of time that the BGP session has been in the Established state, or + the current status if not in the Established state. + :paramtype up_down: str + :keyword state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have + been received from a neighbor or peer group. + :paramtype state_pfx_rcd: str + """ + super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) + self.neighbor = neighbor + self.v = v + self.as_property = as_property + self.up_down = up_down + self.state_pfx_rcd = state_pfx_rcd + + +class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): + """Response for ListArpTable associated with the Express Route Circuits API. + + :ivar value: A list of the ARP tables. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitArpTable] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitArpTable"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of the ARP tables. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitArpTable] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): + """Contains ServiceProviderProperties in an ExpressRouteCircuit. + + :ivar service_provider_name: The serviceProviderName. + :vartype service_provider_name: str + :ivar peering_location: The peering location. + :vartype peering_location: str + :ivar bandwidth_in_mbps: The BandwidthInMbps. + :vartype bandwidth_in_mbps: int + """ + + _attribute_map = { + 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, + 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, + 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, + } + + def __init__( + self, + *, + service_provider_name: Optional[str] = None, + peering_location: Optional[str] = None, + bandwidth_in_mbps: Optional[int] = None, + **kwargs + ): + """ + :keyword service_provider_name: The serviceProviderName. + :paramtype service_provider_name: str + :keyword peering_location: The peering location. + :paramtype peering_location: str + :keyword bandwidth_in_mbps: The BandwidthInMbps. + :paramtype bandwidth_in_mbps: int + """ + super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) + self.service_provider_name = service_provider_name + self.peering_location = peering_location + self.bandwidth_in_mbps = bandwidth_in_mbps + + +class ExpressRouteCircuitSku(msrest.serialization.Model): + """Contains SKU in an ExpressRouteCircuit. + + :ivar name: The name of the SKU. + :vartype name: str + :ivar tier: The tier of the SKU. Possible values include: "Standard", "Premium", "Basic", + "Local". + :vartype tier: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitSkuTier + :ivar family: The family of the SKU. Possible values include: "UnlimitedData", "MeteredData". + :vartype family: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitSkuFamily + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + tier: Optional[Union[str, "ExpressRouteCircuitSkuTier"]] = None, + family: Optional[Union[str, "ExpressRouteCircuitSkuFamily"]] = None, + **kwargs + ): + """ + :keyword name: The name of the SKU. + :paramtype name: str + :keyword tier: The tier of the SKU. Possible values include: "Standard", "Premium", "Basic", + "Local". + :paramtype tier: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitSkuTier + :keyword family: The family of the SKU. Possible values include: "UnlimitedData", + "MeteredData". + :paramtype family: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitSkuFamily + """ + super(ExpressRouteCircuitSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.family = family + + +class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Circuits API. + + :ivar value: The list of routes table. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitRoutesTable] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitRoutesTable"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of routes table. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitRoutesTable] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Circuits API. + + :ivar value: A list of the routes table. + :vartype value: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitRoutesTableSummary] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitRoutesTableSummary"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of the routes table. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitRoutesTableSummary] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitStats(msrest.serialization.Model): + """Contains stats associated with the peering. + + :ivar primarybytes_in: The Primary BytesIn of the peering. + :vartype primarybytes_in: long + :ivar primarybytes_out: The primary BytesOut of the peering. + :vartype primarybytes_out: long + :ivar secondarybytes_in: The secondary BytesIn of the peering. + :vartype secondarybytes_in: long + :ivar secondarybytes_out: The secondary BytesOut of the peering. + :vartype secondarybytes_out: long + """ + + _attribute_map = { + 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, + 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, + 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, + 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, + } + + def __init__( + self, + *, + primarybytes_in: Optional[int] = None, + primarybytes_out: Optional[int] = None, + secondarybytes_in: Optional[int] = None, + secondarybytes_out: Optional[int] = None, + **kwargs + ): + """ + :keyword primarybytes_in: The Primary BytesIn of the peering. + :paramtype primarybytes_in: long + :keyword primarybytes_out: The primary BytesOut of the peering. + :paramtype primarybytes_out: long + :keyword secondarybytes_in: The secondary BytesIn of the peering. + :paramtype secondarybytes_in: long + :keyword secondarybytes_out: The secondary BytesOut of the peering. + :paramtype secondarybytes_out: long + """ + super(ExpressRouteCircuitStats, self).__init__(**kwargs) + self.primarybytes_in = primarybytes_in + self.primarybytes_out = primarybytes_out + self.secondarybytes_in = secondarybytes_in + self.secondarybytes_out = secondarybytes_out + + +class ExpressRouteConnection(SubResource): + """ExpressRouteConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Required. The name of the resource. + :vartype name: str + :ivar provisioning_state: The provisioning state of the express route connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar express_route_circuit_peering: The ExpressRoute circuit peering. + :vartype express_route_circuit_peering: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringId + :ivar authorization_key: Authorization key to establish the connection. + :vartype authorization_key: str + :ivar routing_weight: The routing weight associated to the connection. + :vartype routing_weight: int + :ivar enable_internet_security: Enable internet security. + :vartype enable_internet_security: bool + :ivar express_route_gateway_bypass: Enable FastPath to vWan Firewall hub. + :vartype express_route_gateway_bypass: bool + :ivar routing_configuration: The Routing Configuration indicating the associated and propagated + route tables on this connection. + :vartype routing_configuration: ~azure.mgmt.network.v2021_08_01.models.RoutingConfiguration + """ + + _validation = { + 'name': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'ExpressRouteCircuitPeeringId'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + } + + def __init__( + self, + *, + name: str, + id: Optional[str] = None, + express_route_circuit_peering: Optional["ExpressRouteCircuitPeeringId"] = None, + authorization_key: Optional[str] = None, + routing_weight: Optional[int] = None, + enable_internet_security: Optional[bool] = None, + express_route_gateway_bypass: Optional[bool] = None, + routing_configuration: Optional["RoutingConfiguration"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Required. The name of the resource. + :paramtype name: str + :keyword express_route_circuit_peering: The ExpressRoute circuit peering. + :paramtype express_route_circuit_peering: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringId + :keyword authorization_key: Authorization key to establish the connection. + :paramtype authorization_key: str + :keyword routing_weight: The routing weight associated to the connection. + :paramtype routing_weight: int + :keyword enable_internet_security: Enable internet security. + :paramtype enable_internet_security: bool + :keyword express_route_gateway_bypass: Enable FastPath to vWan Firewall hub. + :paramtype express_route_gateway_bypass: bool + :keyword routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :paramtype routing_configuration: ~azure.mgmt.network.v2021_08_01.models.RoutingConfiguration + """ + super(ExpressRouteConnection, self).__init__(id=id, **kwargs) + self.name = name + self.provisioning_state = None + self.express_route_circuit_peering = express_route_circuit_peering + self.authorization_key = authorization_key + self.routing_weight = routing_weight + self.enable_internet_security = enable_internet_security + self.express_route_gateway_bypass = express_route_gateway_bypass + self.routing_configuration = routing_configuration + + +class ExpressRouteConnectionId(msrest.serialization.Model): + """The ID of the ExpressRouteConnection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the ExpressRouteConnection. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ExpressRouteConnectionId, self).__init__(**kwargs) + self.id = None + + +class ExpressRouteConnectionList(msrest.serialization.Model): + """ExpressRouteConnection list. + + :ivar value: The list of ExpressRoute connections. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteConnection"]] = None, + **kwargs + ): + """ + :keyword value: The list of ExpressRoute connections. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection] + """ + super(ExpressRouteConnectionList, self).__init__(**kwargs) + self.value = value + + +class ExpressRouteCrossConnection(Resource): + """ExpressRouteCrossConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar primary_azure_port: The name of the primary port. + :vartype primary_azure_port: str + :ivar secondary_azure_port: The name of the secondary port. + :vartype secondary_azure_port: str + :ivar s_tag: The identifier of the circuit traffic. + :vartype s_tag: int + :ivar peering_location: The peering location of the ExpressRoute circuit. + :vartype peering_location: str + :ivar bandwidth_in_mbps: The circuit bandwidth In Mbps. + :vartype bandwidth_in_mbps: int + :ivar express_route_circuit: The ExpressRouteCircuit. + :vartype express_route_circuit: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitReference + :ivar service_provider_provisioning_state: The provisioning state of the circuit in the + connectivity provider system. Possible values include: "NotProvisioned", "Provisioning", + "Provisioned", "Deprovisioning". + :vartype service_provider_provisioning_state: str or + ~azure.mgmt.network.v2021_08_01.models.ServiceProviderProvisioningState + :ivar service_provider_notes: Additional read only notes set by the connectivity provider. + :vartype service_provider_notes: str + :ivar provisioning_state: The provisioning state of the express route cross connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar peerings: The list of peerings. + :vartype peerings: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'primary_azure_port': {'readonly': True}, + 'secondary_azure_port': {'readonly': True}, + 's_tag': {'readonly': True}, + 'peering_location': {'readonly': True}, + 'bandwidth_in_mbps': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 's_tag': {'key': 'properties.sTag', 'type': 'int'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'bandwidth_in_mbps': {'key': 'properties.bandwidthInMbps', 'type': 'int'}, + 'express_route_circuit': {'key': 'properties.expressRouteCircuit', 'type': 'ExpressRouteCircuitReference'}, + 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, + 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCrossConnectionPeering]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + express_route_circuit: Optional["ExpressRouteCircuitReference"] = None, + service_provider_provisioning_state: Optional[Union[str, "ServiceProviderProvisioningState"]] = None, + service_provider_notes: Optional[str] = None, + peerings: Optional[List["ExpressRouteCrossConnectionPeering"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword express_route_circuit: The ExpressRouteCircuit. + :paramtype express_route_circuit: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitReference + :keyword service_provider_provisioning_state: The provisioning state of the circuit in the + connectivity provider system. Possible values include: "NotProvisioned", "Provisioning", + "Provisioned", "Deprovisioning". + :paramtype service_provider_provisioning_state: str or + ~azure.mgmt.network.v2021_08_01.models.ServiceProviderProvisioningState + :keyword service_provider_notes: Additional read only notes set by the connectivity provider. + :paramtype service_provider_notes: str + :keyword peerings: The list of peerings. + :paramtype peerings: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering] + """ + super(ExpressRouteCrossConnection, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.primary_azure_port = None + self.secondary_azure_port = None + self.s_tag = None + self.peering_location = None + self.bandwidth_in_mbps = None + self.express_route_circuit = express_route_circuit + self.service_provider_provisioning_state = service_provider_provisioning_state + self.service_provider_notes = service_provider_notes + self.provisioning_state = None + self.peerings = peerings + + +class ExpressRouteCrossConnectionListResult(msrest.serialization.Model): + """Response for ListExpressRouteCrossConnection API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of ExpressRouteCrossConnection resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCrossConnection"]] = None, + **kwargs + ): + """ + :keyword value: A list of ExpressRouteCrossConnection resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection] + """ + super(ExpressRouteCrossConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ExpressRouteCrossConnectionPeering(SubResource): + """Peering in an ExpressRoute Cross Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar peering_type: The peering type. Possible values include: "AzurePublicPeering", + "AzurePrivatePeering", "MicrosoftPeering". + :vartype peering_type: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePeeringType + :ivar state: The peering state. Possible values include: "Disabled", "Enabled". + :vartype state: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePeeringState + :ivar azure_asn: The Azure ASN. + :vartype azure_asn: int + :ivar peer_asn: The peer ASN. + :vartype peer_asn: long + :ivar primary_peer_address_prefix: The primary address prefix. + :vartype primary_peer_address_prefix: str + :ivar secondary_peer_address_prefix: The secondary address prefix. + :vartype secondary_peer_address_prefix: str + :ivar primary_azure_port: The primary port. + :vartype primary_azure_port: str + :ivar secondary_azure_port: The secondary port. + :vartype secondary_azure_port: str + :ivar shared_key: The shared key. + :vartype shared_key: str + :ivar vlan_id: The VLAN ID. + :vartype vlan_id: int + :ivar microsoft_peering_config: The Microsoft peering configuration. + :vartype microsoft_peering_config: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringConfig + :ivar provisioning_state: The provisioning state of the express route cross connection peering + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar gateway_manager_etag: The GatewayManager Etag. + :vartype gateway_manager_etag: str + :ivar last_modified_by: Who was the last to modify the peering. + :vartype last_modified_by: str + :ivar ipv6_peering_config: The IPv6 peering configuration. + :vartype ipv6_peering_config: + ~azure.mgmt.network.v2021_08_01.models.Ipv6ExpressRouteCircuitPeeringConfig + """ + + _validation = { + 'etag': {'readonly': True}, + 'azure_asn': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 1}, + 'primary_azure_port': {'readonly': True}, + 'secondary_azure_port': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, + 'peer_asn': {'key': 'properties.peerASN', 'type': 'long'}, + 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, + 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + peering_type: Optional[Union[str, "ExpressRoutePeeringType"]] = None, + state: Optional[Union[str, "ExpressRoutePeeringState"]] = None, + peer_asn: Optional[int] = None, + primary_peer_address_prefix: Optional[str] = None, + secondary_peer_address_prefix: Optional[str] = None, + shared_key: Optional[str] = None, + vlan_id: Optional[int] = None, + microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, + gateway_manager_etag: Optional[str] = None, + ipv6_peering_config: Optional["Ipv6ExpressRouteCircuitPeeringConfig"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword peering_type: The peering type. Possible values include: "AzurePublicPeering", + "AzurePrivatePeering", "MicrosoftPeering". + :paramtype peering_type: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePeeringType + :keyword state: The peering state. Possible values include: "Disabled", "Enabled". + :paramtype state: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePeeringState + :keyword peer_asn: The peer ASN. + :paramtype peer_asn: long + :keyword primary_peer_address_prefix: The primary address prefix. + :paramtype primary_peer_address_prefix: str + :keyword secondary_peer_address_prefix: The secondary address prefix. + :paramtype secondary_peer_address_prefix: str + :keyword shared_key: The shared key. + :paramtype shared_key: str + :keyword vlan_id: The VLAN ID. + :paramtype vlan_id: int + :keyword microsoft_peering_config: The Microsoft peering configuration. + :paramtype microsoft_peering_config: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringConfig + :keyword gateway_manager_etag: The GatewayManager Etag. + :paramtype gateway_manager_etag: str + :keyword ipv6_peering_config: The IPv6 peering configuration. + :paramtype ipv6_peering_config: + ~azure.mgmt.network.v2021_08_01.models.Ipv6ExpressRouteCircuitPeeringConfig + """ + super(ExpressRouteCrossConnectionPeering, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.peering_type = peering_type + self.state = state + self.azure_asn = None + self.peer_asn = peer_asn + self.primary_peer_address_prefix = primary_peer_address_prefix + self.secondary_peer_address_prefix = secondary_peer_address_prefix + self.primary_azure_port = None + self.secondary_azure_port = None + self.shared_key = shared_key + self.vlan_id = vlan_id + self.microsoft_peering_config = microsoft_peering_config + self.provisioning_state = None + self.gateway_manager_etag = gateway_manager_etag + self.last_modified_by = None + self.ipv6_peering_config = ipv6_peering_config + + +class ExpressRouteCrossConnectionPeeringList(msrest.serialization.Model): + """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCrossConnection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The peerings in an express route cross connection. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnectionPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCrossConnectionPeering"]] = None, + **kwargs + ): + """ + :keyword value: The peerings in an express route cross connection. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering] + """ + super(ExpressRouteCrossConnectionPeeringList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ExpressRouteCrossConnectionRoutesTableSummary(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :ivar neighbor: IP address of Neighbor router. + :vartype neighbor: str + :ivar asn: Autonomous system number. + :vartype asn: int + :ivar up_down: The length of time that the BGP session has been in the Established state, or + the current status if not in the Established state. + :vartype up_down: str + :ivar state_or_prefixes_received: Current state of the BGP session, and the number of prefixes + that have been received from a neighbor or peer group. + :vartype state_or_prefixes_received: str + """ + + _attribute_map = { + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'asn': {'key': 'asn', 'type': 'int'}, + 'up_down': {'key': 'upDown', 'type': 'str'}, + 'state_or_prefixes_received': {'key': 'stateOrPrefixesReceived', 'type': 'str'}, + } + + def __init__( + self, + *, + neighbor: Optional[str] = None, + asn: Optional[int] = None, + up_down: Optional[str] = None, + state_or_prefixes_received: Optional[str] = None, + **kwargs + ): + """ + :keyword neighbor: IP address of Neighbor router. + :paramtype neighbor: str + :keyword asn: Autonomous system number. + :paramtype asn: int + :keyword up_down: The length of time that the BGP session has been in the Established state, or + the current status if not in the Established state. + :paramtype up_down: str + :keyword state_or_prefixes_received: Current state of the BGP session, and the number of + prefixes that have been received from a neighbor or peer group. + :paramtype state_or_prefixes_received: str + """ + super(ExpressRouteCrossConnectionRoutesTableSummary, self).__init__(**kwargs) + self.neighbor = neighbor + self.asn = asn + self.up_down = up_down + self.state_or_prefixes_received = state_or_prefixes_received + + +class ExpressRouteCrossConnectionsRoutesTableSummaryListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Cross Connections. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of the routes table. + :vartype value: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionRoutesTableSummary] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnectionRoutesTableSummary]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCrossConnectionRoutesTableSummary"]] = None, + **kwargs + ): + """ + :keyword value: A list of the routes table. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionRoutesTableSummary] + """ + super(ExpressRouteCrossConnectionsRoutesTableSummaryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ExpressRouteGateway(Resource): + """ExpressRoute gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar auto_scale_configuration: Configuration for auto scaling. + :vartype auto_scale_configuration: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGatewayPropertiesAutoScaleConfiguration + :ivar express_route_connections: List of ExpressRoute connections to the ExpressRoute gateway. + :vartype express_route_connections: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection] + :ivar provisioning_state: The provisioning state of the express route gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar virtual_hub: The Virtual Hub where the ExpressRoute gateway is or will be deployed. + :vartype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.VirtualHubId + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'auto_scale_configuration': {'key': 'properties.autoScaleConfiguration', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfiguration'}, + 'express_route_connections': {'key': 'properties.expressRouteConnections', 'type': '[ExpressRouteConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'VirtualHubId'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + auto_scale_configuration: Optional["ExpressRouteGatewayPropertiesAutoScaleConfiguration"] = None, + express_route_connections: Optional[List["ExpressRouteConnection"]] = None, + virtual_hub: Optional["VirtualHubId"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword auto_scale_configuration: Configuration for auto scaling. + :paramtype auto_scale_configuration: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGatewayPropertiesAutoScaleConfiguration + :keyword express_route_connections: List of ExpressRoute connections to the ExpressRoute + gateway. + :paramtype express_route_connections: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection] + :keyword virtual_hub: The Virtual Hub where the ExpressRoute gateway is or will be deployed. + :paramtype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.VirtualHubId + """ + super(ExpressRouteGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.auto_scale_configuration = auto_scale_configuration + self.express_route_connections = express_route_connections + self.provisioning_state = None + self.virtual_hub = virtual_hub + + +class ExpressRouteGatewayList(msrest.serialization.Model): + """List of ExpressRoute gateways. + + :ivar value: List of ExpressRoute gateways. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteGateway]'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteGateway"]] = None, + **kwargs + ): + """ + :keyword value: List of ExpressRoute gateways. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway] + """ + super(ExpressRouteGatewayList, self).__init__(**kwargs) + self.value = value + + +class ExpressRouteGatewayPropertiesAutoScaleConfiguration(msrest.serialization.Model): + """Configuration for auto scaling. + + :ivar bounds: Minimum and maximum number of scale units to deploy. + :vartype bounds: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + """ + + _attribute_map = { + 'bounds': {'key': 'bounds', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds'}, + } + + def __init__( + self, + *, + bounds: Optional["ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds"] = None, + **kwargs + ): + """ + :keyword bounds: Minimum and maximum number of scale units to deploy. + :paramtype bounds: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + """ + super(ExpressRouteGatewayPropertiesAutoScaleConfiguration, self).__init__(**kwargs) + self.bounds = bounds + + +class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds(msrest.serialization.Model): + """Minimum and maximum number of scale units to deploy. + + :ivar min: Minimum number of scale units deployed for ExpressRoute gateway. + :vartype min: int + :ivar max: Maximum number of scale units deployed for ExpressRoute gateway. + :vartype max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__( + self, + *, + min: Optional[int] = None, + max: Optional[int] = None, + **kwargs + ): + """ + :keyword min: Minimum number of scale units deployed for ExpressRoute gateway. + :paramtype min: int + :keyword max: Maximum number of scale units deployed for ExpressRoute gateway. + :paramtype max: int + """ + super(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, self).__init__(**kwargs) + self.min = min + self.max = max + + +class ExpressRouteLink(SubResource): + """ExpressRouteLink child resource 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: Name of child port resource that is unique among child port resources of the + parent. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar router_name: Name of Azure router associated with physical port. + :vartype router_name: str + :ivar interface_name: Name of Azure router interface. + :vartype interface_name: str + :ivar patch_panel_id: Mapping between physical port to patch panel port. + :vartype patch_panel_id: str + :ivar rack_id: Mapping of physical patch panel to rack. + :vartype rack_id: str + :ivar connector_type: Physical fiber port type. Possible values include: "LC", "SC". + :vartype connector_type: str or + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkConnectorType + :ivar admin_state: Administrative state of the physical port. Possible values include: + "Enabled", "Disabled". + :vartype admin_state: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkAdminState + :ivar provisioning_state: The provisioning state of the express route link resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar mac_sec_config: MacSec configuration. + :vartype mac_sec_config: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkMacSecConfig + """ + + _validation = { + 'etag': {'readonly': True}, + 'router_name': {'readonly': True}, + 'interface_name': {'readonly': True}, + 'patch_panel_id': {'readonly': True}, + 'rack_id': {'readonly': True}, + 'connector_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'router_name': {'key': 'properties.routerName', 'type': 'str'}, + 'interface_name': {'key': 'properties.interfaceName', 'type': 'str'}, + 'patch_panel_id': {'key': 'properties.patchPanelId', 'type': 'str'}, + 'rack_id': {'key': 'properties.rackId', 'type': 'str'}, + 'connector_type': {'key': 'properties.connectorType', 'type': 'str'}, + 'admin_state': {'key': 'properties.adminState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'mac_sec_config': {'key': 'properties.macSecConfig', 'type': 'ExpressRouteLinkMacSecConfig'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + admin_state: Optional[Union[str, "ExpressRouteLinkAdminState"]] = None, + mac_sec_config: Optional["ExpressRouteLinkMacSecConfig"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of child port resource that is unique among child port resources of the + parent. + :paramtype name: str + :keyword admin_state: Administrative state of the physical port. Possible values include: + "Enabled", "Disabled". + :paramtype admin_state: str or + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkAdminState + :keyword mac_sec_config: MacSec configuration. + :paramtype mac_sec_config: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkMacSecConfig + """ + super(ExpressRouteLink, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.router_name = None + self.interface_name = None + self.patch_panel_id = None + self.rack_id = None + self.connector_type = None + self.admin_state = admin_state + self.provisioning_state = None + self.mac_sec_config = mac_sec_config + + +class ExpressRouteLinkListResult(msrest.serialization.Model): + """Response for ListExpressRouteLinks API service call. + + :ivar value: The list of ExpressRouteLink sub-resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteLink] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteLink"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of ExpressRouteLink sub-resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteLink] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRouteLinkListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteLinkMacSecConfig(msrest.serialization.Model): + """ExpressRouteLink Mac Security Configuration. + + :ivar ckn_secret_identifier: Keyvault Secret Identifier URL containing Mac security CKN key. + :vartype ckn_secret_identifier: str + :ivar cak_secret_identifier: Keyvault Secret Identifier URL containing Mac security CAK key. + :vartype cak_secret_identifier: str + :ivar cipher: Mac security cipher. Possible values include: "GcmAes256", "GcmAes128", + "GcmAesXpn128", "GcmAesXpn256". + :vartype cipher: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkMacSecCipher + :ivar sci_state: Sci mode enabled/disabled. Possible values include: "Disabled", "Enabled". + :vartype sci_state: str or + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkMacSecSciState + """ + + _attribute_map = { + 'ckn_secret_identifier': {'key': 'cknSecretIdentifier', 'type': 'str'}, + 'cak_secret_identifier': {'key': 'cakSecretIdentifier', 'type': 'str'}, + 'cipher': {'key': 'cipher', 'type': 'str'}, + 'sci_state': {'key': 'sciState', 'type': 'str'}, + } + + def __init__( + self, + *, + ckn_secret_identifier: Optional[str] = None, + cak_secret_identifier: Optional[str] = None, + cipher: Optional[Union[str, "ExpressRouteLinkMacSecCipher"]] = None, + sci_state: Optional[Union[str, "ExpressRouteLinkMacSecSciState"]] = None, + **kwargs + ): + """ + :keyword ckn_secret_identifier: Keyvault Secret Identifier URL containing Mac security CKN key. + :paramtype ckn_secret_identifier: str + :keyword cak_secret_identifier: Keyvault Secret Identifier URL containing Mac security CAK key. + :paramtype cak_secret_identifier: str + :keyword cipher: Mac security cipher. Possible values include: "GcmAes256", "GcmAes128", + "GcmAesXpn128", "GcmAesXpn256". + :paramtype cipher: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkMacSecCipher + :keyword sci_state: Sci mode enabled/disabled. Possible values include: "Disabled", "Enabled". + :paramtype sci_state: str or + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkMacSecSciState + """ + super(ExpressRouteLinkMacSecConfig, self).__init__(**kwargs) + self.ckn_secret_identifier = ckn_secret_identifier + self.cak_secret_identifier = cak_secret_identifier + self.cipher = cipher + self.sci_state = sci_state + + +class ExpressRoutePort(Resource): + """ExpressRoutePort resource definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar identity: The identity of ExpressRoutePort, if configured. + :vartype identity: ~azure.mgmt.network.v2021_08_01.models.ManagedServiceIdentity + :ivar peering_location: The name of the peering location that the ExpressRoutePort is mapped to + physically. + :vartype peering_location: str + :ivar bandwidth_in_gbps: Bandwidth of procured ports in Gbps. + :vartype bandwidth_in_gbps: int + :ivar provisioned_bandwidth_in_gbps: Aggregate Gbps of associated circuit bandwidths. + :vartype provisioned_bandwidth_in_gbps: float + :ivar mtu: Maximum transmission unit of the physical port pair(s). + :vartype mtu: str + :ivar encapsulation: Encapsulation method on physical ports. Possible values include: "Dot1Q", + "QinQ". + :vartype encapsulation: str or + ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsEncapsulation + :ivar ether_type: Ether type of the physical port. + :vartype ether_type: str + :ivar allocation_date: Date of the physical port allocation to be used in Letter of + Authorization. + :vartype allocation_date: str + :ivar links: The set of physical links of the ExpressRoutePort resource. + :vartype links: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteLink] + :ivar circuits: Reference the ExpressRoute circuit(s) that are provisioned on this + ExpressRoutePort resource. + :vartype circuits: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the express route port resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar resource_guid: The resource GUID property of the express route port resource. + :vartype resource_guid: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioned_bandwidth_in_gbps': {'readonly': True}, + 'mtu': {'readonly': True}, + 'ether_type': {'readonly': True}, + 'allocation_date': {'readonly': True}, + 'circuits': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'int'}, + 'provisioned_bandwidth_in_gbps': {'key': 'properties.provisionedBandwidthInGbps', 'type': 'float'}, + 'mtu': {'key': 'properties.mtu', 'type': 'str'}, + 'encapsulation': {'key': 'properties.encapsulation', 'type': 'str'}, + 'ether_type': {'key': 'properties.etherType', 'type': 'str'}, + 'allocation_date': {'key': 'properties.allocationDate', 'type': 'str'}, + 'links': {'key': 'properties.links', 'type': '[ExpressRouteLink]'}, + 'circuits': {'key': 'properties.circuits', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + peering_location: Optional[str] = None, + bandwidth_in_gbps: Optional[int] = None, + encapsulation: Optional[Union[str, "ExpressRoutePortsEncapsulation"]] = None, + links: Optional[List["ExpressRouteLink"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword identity: The identity of ExpressRoutePort, if configured. + :paramtype identity: ~azure.mgmt.network.v2021_08_01.models.ManagedServiceIdentity + :keyword peering_location: The name of the peering location that the ExpressRoutePort is mapped + to physically. + :paramtype peering_location: str + :keyword bandwidth_in_gbps: Bandwidth of procured ports in Gbps. + :paramtype bandwidth_in_gbps: int + :keyword encapsulation: Encapsulation method on physical ports. Possible values include: + "Dot1Q", "QinQ". + :paramtype encapsulation: str or + ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsEncapsulation + :keyword links: The set of physical links of the ExpressRoutePort resource. + :paramtype links: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteLink] + """ + super(ExpressRoutePort, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.identity = identity + self.peering_location = peering_location + self.bandwidth_in_gbps = bandwidth_in_gbps + self.provisioned_bandwidth_in_gbps = None + self.mtu = None + self.encapsulation = encapsulation + self.ether_type = None + self.allocation_date = None + self.links = links + self.circuits = None + self.provisioning_state = None + self.resource_guid = None + + +class ExpressRoutePortAuthorization(SubResource): + """ExpressRoutePort Authorization resource 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: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar authorization_key: The authorization key. + :vartype authorization_key: str + :ivar authorization_use_status: The authorization use status. Possible values include: + "Available", "InUse". + :vartype authorization_use_status: str or + ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorizationUseStatus + :ivar circuit_resource_uri: The reference to the ExpressRoute circuit resource using the + authorization. + :vartype circuit_resource_uri: str + :ivar provisioning_state: The provisioning state of the authorization resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'authorization_key': {'readonly': True}, + 'authorization_use_status': {'readonly': True}, + 'circuit_resource_uri': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, + 'circuit_resource_uri': {'key': 'properties.circuitResourceUri', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + """ + super(ExpressRoutePortAuthorization, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.authorization_key = None + self.authorization_use_status = None + self.circuit_resource_uri = None + self.provisioning_state = None + + +class ExpressRoutePortAuthorizationListResult(msrest.serialization.Model): + """Response for ListExpressRoutePortAuthorizations API service call. + + :ivar value: The authorizations in an ExpressRoute Port. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorization] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRoutePortAuthorization]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRoutePortAuthorization"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The authorizations in an ExpressRoute Port. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorization] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRoutePortAuthorizationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRoutePortListResult(msrest.serialization.Model): + """Response for ListExpressRoutePorts API service call. + + :ivar value: A list of ExpressRoutePort resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRoutePort]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRoutePort"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of ExpressRoutePort resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRoutePortListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRoutePortsLocation(Resource): + """Definition of the ExpressRoutePorts peering location resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar address: Address of peering location. + :vartype address: str + :ivar contact: Contact details of peering locations. + :vartype contact: str + :ivar available_bandwidths: The inventory of available ExpressRoutePort bandwidths. + :vartype available_bandwidths: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsLocationBandwidths] + :ivar provisioning_state: The provisioning state of the express route port location resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'address': {'readonly': True}, + 'contact': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'address': {'key': 'properties.address', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'str'}, + 'available_bandwidths': {'key': 'properties.availableBandwidths', 'type': '[ExpressRoutePortsLocationBandwidths]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + available_bandwidths: Optional[List["ExpressRoutePortsLocationBandwidths"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword available_bandwidths: The inventory of available ExpressRoutePort bandwidths. + :paramtype available_bandwidths: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsLocationBandwidths] + """ + super(ExpressRoutePortsLocation, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.address = None + self.contact = None + self.available_bandwidths = available_bandwidths + self.provisioning_state = None + + +class ExpressRoutePortsLocationBandwidths(msrest.serialization.Model): + """Real-time inventory of available ExpressRoute port bandwidths. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar offer_name: Bandwidth descriptive name. + :vartype offer_name: str + :ivar value_in_gbps: Bandwidth value in Gbps. + :vartype value_in_gbps: int + """ + + _validation = { + 'offer_name': {'readonly': True}, + 'value_in_gbps': {'readonly': True}, + } + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_gbps': {'key': 'valueInGbps', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ExpressRoutePortsLocationBandwidths, self).__init__(**kwargs) + self.offer_name = None + self.value_in_gbps = None + + +class ExpressRoutePortsLocationListResult(msrest.serialization.Model): + """Response for ListExpressRoutePortsLocations API service call. + + :ivar value: The list of all ExpressRoutePort peering locations. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsLocation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRoutePortsLocation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRoutePortsLocation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of all ExpressRoutePort peering locations. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsLocation] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRoutePortsLocationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteServiceProvider(Resource): + """A ExpressRouteResourceProvider object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar peering_locations: A list of peering locations. + :vartype peering_locations: list[str] + :ivar bandwidths_offered: A list of bandwidths offered. + :vartype bandwidths_offered: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteServiceProviderBandwidthsOffered] + :ivar provisioning_state: The provisioning state of the express route service provider + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, + 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + peering_locations: Optional[List[str]] = None, + bandwidths_offered: Optional[List["ExpressRouteServiceProviderBandwidthsOffered"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword peering_locations: A list of peering locations. + :paramtype peering_locations: list[str] + :keyword bandwidths_offered: A list of bandwidths offered. + :paramtype bandwidths_offered: + list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteServiceProviderBandwidthsOffered] + """ + super(ExpressRouteServiceProvider, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.peering_locations = peering_locations + self.bandwidths_offered = bandwidths_offered + self.provisioning_state = None + + +class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): + """Contains bandwidths offered in ExpressRouteServiceProvider resources. + + :ivar offer_name: The OfferName. + :vartype offer_name: str + :ivar value_in_mbps: The ValueInMbps. + :vartype value_in_mbps: int + """ + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, + } + + def __init__( + self, + *, + offer_name: Optional[str] = None, + value_in_mbps: Optional[int] = None, + **kwargs + ): + """ + :keyword offer_name: The OfferName. + :paramtype offer_name: str + :keyword value_in_mbps: The ValueInMbps. + :paramtype value_in_mbps: int + """ + super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) + self.offer_name = offer_name + self.value_in_mbps = value_in_mbps + + +class ExpressRouteServiceProviderListResult(msrest.serialization.Model): + """Response for the ListExpressRouteServiceProvider API service call. + + :ivar value: A list of ExpressRouteResourceProvider resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteServiceProvider] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteServiceProvider"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of ExpressRouteResourceProvider resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteServiceProvider] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExtendedLocation(msrest.serialization.Model): + """ExtendedLocation complex type. + + :ivar name: The name of the extended location. + :vartype name: str + :ivar type: The type of the extended location. Possible values include: "EdgeZone". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.ExtendedLocationTypes + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "ExtendedLocationTypes"]] = None, + **kwargs + ): + """ + :keyword name: The name of the extended location. + :paramtype name: str + :keyword type: The type of the extended location. Possible values include: "EdgeZone". + :paramtype type: str or ~azure.mgmt.network.v2021_08_01.models.ExtendedLocationTypes + """ + super(ExtendedLocation, self).__init__(**kwargs) + self.name = name + self.type = type + + +class FilterItems(msrest.serialization.Model): + """Will contain the filter name and values to operate on. + + :ivar field: The name of the field we would like to filter. + :vartype field: str + :ivar values: List of values to filter the current field by. + :vartype values: list[str] + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__( + self, + *, + field: Optional[str] = None, + values: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword field: The name of the field we would like to filter. + :paramtype field: str + :keyword values: List of values to filter the current field by. + :paramtype values: list[str] + """ + super(FilterItems, self).__init__(**kwargs) + self.field = field + self.values = values + + +class FirewallPolicy(Resource): + """FirewallPolicy Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar identity: The identity of the firewall policy. + :vartype identity: ~azure.mgmt.network.v2021_08_01.models.ManagedServiceIdentity + :ivar rule_collection_groups: List of references to FirewallPolicyRuleCollectionGroups. + :vartype rule_collection_groups: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the firewall policy resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar base_policy: The parent firewall policy from which rules are inherited. + :vartype base_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar firewalls: List of references to Azure Firewalls that this Firewall Policy is associated + with. + :vartype firewalls: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar child_policies: List of references to Child Firewall Policies. + :vartype child_policies: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar threat_intel_mode: The operation mode for Threat Intelligence. Possible values include: + "Alert", "Deny", "Off". + :vartype threat_intel_mode: str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallThreatIntelMode + :ivar threat_intel_whitelist: ThreatIntel Whitelist for Firewall Policy. + :vartype threat_intel_whitelist: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyThreatIntelWhitelist + :ivar insights: Insights on Firewall Policy. + :vartype insights: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyInsights + :ivar snat: The private IP addresses/IP ranges to which traffic will not be SNAT. + :vartype snat: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicySNAT + :ivar sql: SQL Settings definition. + :vartype sql: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicySQL + :ivar dns_settings: DNS Proxy Settings definition. + :vartype dns_settings: ~azure.mgmt.network.v2021_08_01.models.DnsSettings + :ivar explicit_proxy_settings: Explicit Proxy Settings definition. + :vartype explicit_proxy_settings: ~azure.mgmt.network.v2021_08_01.models.ExplicitProxySettings + :ivar intrusion_detection: The configuration for Intrusion detection. + :vartype intrusion_detection: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetection + :ivar transport_security: TLS Configuration definition. + :vartype transport_security: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyTransportSecurity + :ivar sku: The Firewall Policy SKU. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicySku + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'rule_collection_groups': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'firewalls': {'readonly': True}, + 'child_policies': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'rule_collection_groups': {'key': 'properties.ruleCollectionGroups', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'base_policy': {'key': 'properties.basePolicy', 'type': 'SubResource'}, + 'firewalls': {'key': 'properties.firewalls', 'type': '[SubResource]'}, + 'child_policies': {'key': 'properties.childPolicies', 'type': '[SubResource]'}, + 'threat_intel_mode': {'key': 'properties.threatIntelMode', 'type': 'str'}, + 'threat_intel_whitelist': {'key': 'properties.threatIntelWhitelist', 'type': 'FirewallPolicyThreatIntelWhitelist'}, + 'insights': {'key': 'properties.insights', 'type': 'FirewallPolicyInsights'}, + 'snat': {'key': 'properties.snat', 'type': 'FirewallPolicySNAT'}, + 'sql': {'key': 'properties.sql', 'type': 'FirewallPolicySQL'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'DnsSettings'}, + 'explicit_proxy_settings': {'key': 'properties.explicitProxySettings', 'type': 'ExplicitProxySettings'}, + 'intrusion_detection': {'key': 'properties.intrusionDetection', 'type': 'FirewallPolicyIntrusionDetection'}, + 'transport_security': {'key': 'properties.transportSecurity', 'type': 'FirewallPolicyTransportSecurity'}, + 'sku': {'key': 'properties.sku', 'type': 'FirewallPolicySku'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + base_policy: Optional["SubResource"] = None, + threat_intel_mode: Optional[Union[str, "AzureFirewallThreatIntelMode"]] = None, + threat_intel_whitelist: Optional["FirewallPolicyThreatIntelWhitelist"] = None, + insights: Optional["FirewallPolicyInsights"] = None, + snat: Optional["FirewallPolicySNAT"] = None, + sql: Optional["FirewallPolicySQL"] = None, + dns_settings: Optional["DnsSettings"] = None, + explicit_proxy_settings: Optional["ExplicitProxySettings"] = None, + intrusion_detection: Optional["FirewallPolicyIntrusionDetection"] = None, + transport_security: Optional["FirewallPolicyTransportSecurity"] = None, + sku: Optional["FirewallPolicySku"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword identity: The identity of the firewall policy. + :paramtype identity: ~azure.mgmt.network.v2021_08_01.models.ManagedServiceIdentity + :keyword base_policy: The parent firewall policy from which rules are inherited. + :paramtype base_policy: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword threat_intel_mode: The operation mode for Threat Intelligence. Possible values + include: "Alert", "Deny", "Off". + :paramtype threat_intel_mode: str or + ~azure.mgmt.network.v2021_08_01.models.AzureFirewallThreatIntelMode + :keyword threat_intel_whitelist: ThreatIntel Whitelist for Firewall Policy. + :paramtype threat_intel_whitelist: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyThreatIntelWhitelist + :keyword insights: Insights on Firewall Policy. + :paramtype insights: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyInsights + :keyword snat: The private IP addresses/IP ranges to which traffic will not be SNAT. + :paramtype snat: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicySNAT + :keyword sql: SQL Settings definition. + :paramtype sql: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicySQL + :keyword dns_settings: DNS Proxy Settings definition. + :paramtype dns_settings: ~azure.mgmt.network.v2021_08_01.models.DnsSettings + :keyword explicit_proxy_settings: Explicit Proxy Settings definition. + :paramtype explicit_proxy_settings: + ~azure.mgmt.network.v2021_08_01.models.ExplicitProxySettings + :keyword intrusion_detection: The configuration for Intrusion detection. + :paramtype intrusion_detection: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetection + :keyword transport_security: TLS Configuration definition. + :paramtype transport_security: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyTransportSecurity + :keyword sku: The Firewall Policy SKU. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicySku + """ + super(FirewallPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.identity = identity + self.rule_collection_groups = None + self.provisioning_state = None + self.base_policy = base_policy + self.firewalls = None + self.child_policies = None + self.threat_intel_mode = threat_intel_mode + self.threat_intel_whitelist = threat_intel_whitelist + self.insights = insights + self.snat = snat + self.sql = sql + self.dns_settings = dns_settings + self.explicit_proxy_settings = explicit_proxy_settings + self.intrusion_detection = intrusion_detection + self.transport_security = transport_security + self.sku = sku + + +class FirewallPolicyCertificateAuthority(msrest.serialization.Model): + """Trusted Root certificates properties for tls. + + :ivar key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :vartype key_vault_secret_id: str + :ivar name: Name of the CA certificate. + :vartype name: str + """ + + _attribute_map = { + 'key_vault_secret_id': {'key': 'keyVaultSecretId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + key_vault_secret_id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :paramtype key_vault_secret_id: str + :keyword name: Name of the CA certificate. + :paramtype name: str + """ + super(FirewallPolicyCertificateAuthority, self).__init__(**kwargs) + self.key_vault_secret_id = key_vault_secret_id + self.name = name + + +class FirewallPolicyRuleCollection(msrest.serialization.Model): + """Properties of the rule collection. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FirewallPolicyFilterRuleCollection, FirewallPolicyNatRuleCollection. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :vartype rule_collection_type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionType + :ivar name: The name of the rule collection. + :vartype name: str + :ivar priority: Priority of the Firewall Policy Rule Collection resource. + :vartype priority: int + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + } + + _subtype_map = { + 'rule_collection_type': {'FirewallPolicyFilterRuleCollection': 'FirewallPolicyFilterRuleCollection', 'FirewallPolicyNatRuleCollection': 'FirewallPolicyNatRuleCollection'} + } + + def __init__( + self, + *, + name: Optional[str] = None, + priority: Optional[int] = None, + **kwargs + ): + """ + :keyword name: The name of the rule collection. + :paramtype name: str + :keyword priority: Priority of the Firewall Policy Rule Collection resource. + :paramtype priority: int + """ + super(FirewallPolicyRuleCollection, self).__init__(**kwargs) + self.rule_collection_type = None # type: Optional[str] + self.name = name + self.priority = priority + + +class FirewallPolicyFilterRuleCollection(FirewallPolicyRuleCollection): + """Firewall Policy Filter Rule Collection. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :vartype rule_collection_type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionType + :ivar name: The name of the rule collection. + :vartype name: str + :ivar priority: Priority of the Firewall Policy Rule Collection resource. + :vartype priority: int + :ivar action: The action type of a Filter rule collection. + :vartype action: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyFilterRuleCollectionAction + :ivar rules: List of rules included in a rule collection. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRule] + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'FirewallPolicyFilterRuleCollectionAction'}, + 'rules': {'key': 'rules', 'type': '[FirewallPolicyRule]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["FirewallPolicyFilterRuleCollectionAction"] = None, + rules: Optional[List["FirewallPolicyRule"]] = None, + **kwargs + ): + """ + :keyword name: The name of the rule collection. + :paramtype name: str + :keyword priority: Priority of the Firewall Policy Rule Collection resource. + :paramtype priority: int + :keyword action: The action type of a Filter rule collection. + :paramtype action: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyFilterRuleCollectionAction + :keyword rules: List of rules included in a rule collection. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRule] + """ + super(FirewallPolicyFilterRuleCollection, self).__init__(name=name, priority=priority, **kwargs) + self.rule_collection_type = 'FirewallPolicyFilterRuleCollection' # type: str + self.action = action + self.rules = rules + + +class FirewallPolicyFilterRuleCollectionAction(msrest.serialization.Model): + """Properties of the FirewallPolicyFilterRuleCollectionAction. + + :ivar type: The type of action. Possible values include: "Allow", "Deny". + :vartype type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyFilterRuleCollectionActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "FirewallPolicyFilterRuleCollectionActionType"]] = None, + **kwargs + ): + """ + :keyword type: The type of action. Possible values include: "Allow", "Deny". + :paramtype type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyFilterRuleCollectionActionType + """ + super(FirewallPolicyFilterRuleCollectionAction, self).__init__(**kwargs) + self.type = type + + +class FirewallPolicyInsights(msrest.serialization.Model): + """Firewall Policy Insights. + + :ivar is_enabled: A flag to indicate if the insights are enabled on the policy. + :vartype is_enabled: bool + :ivar retention_days: Number of days the insights should be enabled on the policy. + :vartype retention_days: int + :ivar log_analytics_resources: Workspaces needed to configure the Firewall Policy Insights. + :vartype log_analytics_resources: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyLogAnalyticsResources + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'retention_days': {'key': 'retentionDays', 'type': 'int'}, + 'log_analytics_resources': {'key': 'logAnalyticsResources', 'type': 'FirewallPolicyLogAnalyticsResources'}, + } + + def __init__( + self, + *, + is_enabled: Optional[bool] = None, + retention_days: Optional[int] = None, + log_analytics_resources: Optional["FirewallPolicyLogAnalyticsResources"] = None, + **kwargs + ): + """ + :keyword is_enabled: A flag to indicate if the insights are enabled on the policy. + :paramtype is_enabled: bool + :keyword retention_days: Number of days the insights should be enabled on the policy. + :paramtype retention_days: int + :keyword log_analytics_resources: Workspaces needed to configure the Firewall Policy Insights. + :paramtype log_analytics_resources: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyLogAnalyticsResources + """ + super(FirewallPolicyInsights, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.retention_days = retention_days + self.log_analytics_resources = log_analytics_resources + + +class FirewallPolicyIntrusionDetection(msrest.serialization.Model): + """Configuration for intrusion detection mode and rules. + + :ivar mode: Intrusion detection general state. Possible values include: "Off", "Alert", "Deny". + :vartype mode: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionStateType + :ivar configuration: Intrusion detection configuration properties. + :vartype configuration: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionConfiguration + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'FirewallPolicyIntrusionDetectionConfiguration'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "FirewallPolicyIntrusionDetectionStateType"]] = None, + configuration: Optional["FirewallPolicyIntrusionDetectionConfiguration"] = None, + **kwargs + ): + """ + :keyword mode: Intrusion detection general state. Possible values include: "Off", "Alert", + "Deny". + :paramtype mode: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionStateType + :keyword configuration: Intrusion detection configuration properties. + :paramtype configuration: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionConfiguration + """ + super(FirewallPolicyIntrusionDetection, self).__init__(**kwargs) + self.mode = mode + self.configuration = configuration + + +class FirewallPolicyIntrusionDetectionBypassTrafficSpecifications(msrest.serialization.Model): + """Intrusion detection bypass traffic specification. + + :ivar name: Name of the bypass traffic rule. + :vartype name: str + :ivar description: Description of the bypass traffic rule. + :vartype description: str + :ivar protocol: The rule bypass protocol. Possible values include: "TCP", "UDP", "ICMP", "ANY". + :vartype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionProtocol + :ivar source_addresses: List of source IP addresses or ranges for this rule. + :vartype source_addresses: list[str] + :ivar destination_addresses: List of destination IP addresses or ranges for this rule. + :vartype destination_addresses: list[str] + :ivar destination_ports: List of destination ports or ranges. + :vartype destination_ports: list[str] + :ivar source_ip_groups: List of source IpGroups for this rule. + :vartype source_ip_groups: list[str] + :ivar destination_ip_groups: List of destination IpGroups for this rule. + :vartype destination_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "FirewallPolicyIntrusionDetectionProtocol"]] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + destination_ip_groups: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword name: Name of the bypass traffic rule. + :paramtype name: str + :keyword description: Description of the bypass traffic rule. + :paramtype description: str + :keyword protocol: The rule bypass protocol. Possible values include: "TCP", "UDP", "ICMP", + "ANY". + :paramtype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionProtocol + :keyword source_addresses: List of source IP addresses or ranges for this rule. + :paramtype source_addresses: list[str] + :keyword destination_addresses: List of destination IP addresses or ranges for this rule. + :paramtype destination_addresses: list[str] + :keyword destination_ports: List of destination ports or ranges. + :paramtype destination_ports: list[str] + :keyword source_ip_groups: List of source IpGroups for this rule. + :paramtype source_ip_groups: list[str] + :keyword destination_ip_groups: List of destination IpGroups for this rule. + :paramtype destination_ip_groups: list[str] + """ + super(FirewallPolicyIntrusionDetectionBypassTrafficSpecifications, self).__init__(**kwargs) + self.name = name + self.description = description + self.protocol = protocol + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.source_ip_groups = source_ip_groups + self.destination_ip_groups = destination_ip_groups + + +class FirewallPolicyIntrusionDetectionConfiguration(msrest.serialization.Model): + """The operation for configuring intrusion detection. + + :ivar signature_overrides: List of specific signatures states. + :vartype signature_overrides: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionSignatureSpecification] + :ivar bypass_traffic_settings: List of rules for traffic to bypass. + :vartype bypass_traffic_settings: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications] + :ivar private_ranges: IDPS Private IP address ranges are used to identify traffic direction + (i.e. inbound, outbound, etc.). By default, only ranges defined by IANA RFC 1918 are considered + private IP addresses. To modify default ranges, specify your Private IP address ranges with + this property. + :vartype private_ranges: list[str] + """ + + _attribute_map = { + 'signature_overrides': {'key': 'signatureOverrides', 'type': '[FirewallPolicyIntrusionDetectionSignatureSpecification]'}, + 'bypass_traffic_settings': {'key': 'bypassTrafficSettings', 'type': '[FirewallPolicyIntrusionDetectionBypassTrafficSpecifications]'}, + 'private_ranges': {'key': 'privateRanges', 'type': '[str]'}, + } + + def __init__( + self, + *, + signature_overrides: Optional[List["FirewallPolicyIntrusionDetectionSignatureSpecification"]] = None, + bypass_traffic_settings: Optional[List["FirewallPolicyIntrusionDetectionBypassTrafficSpecifications"]] = None, + private_ranges: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword signature_overrides: List of specific signatures states. + :paramtype signature_overrides: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionSignatureSpecification] + :keyword bypass_traffic_settings: List of rules for traffic to bypass. + :paramtype bypass_traffic_settings: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications] + :keyword private_ranges: IDPS Private IP address ranges are used to identify traffic direction + (i.e. inbound, outbound, etc.). By default, only ranges defined by IANA RFC 1918 are considered + private IP addresses. To modify default ranges, specify your Private IP address ranges with + this property. + :paramtype private_ranges: list[str] + """ + super(FirewallPolicyIntrusionDetectionConfiguration, self).__init__(**kwargs) + self.signature_overrides = signature_overrides + self.bypass_traffic_settings = bypass_traffic_settings + self.private_ranges = private_ranges + + +class FirewallPolicyIntrusionDetectionSignatureSpecification(msrest.serialization.Model): + """Intrusion detection signatures specification states. + + :ivar id: Signature id. + :vartype id: str + :ivar mode: The signature state. Possible values include: "Off", "Alert", "Deny". + :vartype mode: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionStateType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + mode: Optional[Union[str, "FirewallPolicyIntrusionDetectionStateType"]] = None, + **kwargs + ): + """ + :keyword id: Signature id. + :paramtype id: str + :keyword mode: The signature state. Possible values include: "Off", "Alert", "Deny". + :paramtype mode: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIntrusionDetectionStateType + """ + super(FirewallPolicyIntrusionDetectionSignatureSpecification, self).__init__(**kwargs) + self.id = id + self.mode = mode + + +class FirewallPolicyListResult(msrest.serialization.Model): + """Response for ListFirewallPolicies API service call. + + :ivar value: List of Firewall Policies in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicy] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FirewallPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["FirewallPolicy"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Firewall Policies in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicy] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(FirewallPolicyListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class FirewallPolicyLogAnalyticsResources(msrest.serialization.Model): + """Log Analytics Resources for Firewall Policy Insights. + + :ivar workspaces: List of workspaces for Firewall Policy Insights. + :vartype workspaces: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyLogAnalyticsWorkspace] + :ivar default_workspace_id: The default workspace Id for Firewall Policy Insights. + :vartype default_workspace_id: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _attribute_map = { + 'workspaces': {'key': 'workspaces', 'type': '[FirewallPolicyLogAnalyticsWorkspace]'}, + 'default_workspace_id': {'key': 'defaultWorkspaceId', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + workspaces: Optional[List["FirewallPolicyLogAnalyticsWorkspace"]] = None, + default_workspace_id: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword workspaces: List of workspaces for Firewall Policy Insights. + :paramtype workspaces: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyLogAnalyticsWorkspace] + :keyword default_workspace_id: The default workspace Id for Firewall Policy Insights. + :paramtype default_workspace_id: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(FirewallPolicyLogAnalyticsResources, self).__init__(**kwargs) + self.workspaces = workspaces + self.default_workspace_id = default_workspace_id + + +class FirewallPolicyLogAnalyticsWorkspace(msrest.serialization.Model): + """Log Analytics Workspace for Firewall Policy Insights. + + :ivar region: Region to configure the Workspace. + :vartype region: str + :ivar workspace_id: The workspace Id for Firewall Policy Insights. + :vartype workspace_id: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + region: Optional[str] = None, + workspace_id: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword region: Region to configure the Workspace. + :paramtype region: str + :keyword workspace_id: The workspace Id for Firewall Policy Insights. + :paramtype workspace_id: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(FirewallPolicyLogAnalyticsWorkspace, self).__init__(**kwargs) + self.region = region + self.workspace_id = workspace_id + + +class FirewallPolicyNatRuleCollection(FirewallPolicyRuleCollection): + """Firewall Policy NAT Rule Collection. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :vartype rule_collection_type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionType + :ivar name: The name of the rule collection. + :vartype name: str + :ivar priority: Priority of the Firewall Policy Rule Collection resource. + :vartype priority: int + :ivar action: The action type of a Nat rule collection. + :vartype action: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyNatRuleCollectionAction + :ivar rules: List of rules included in a rule collection. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRule] + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'FirewallPolicyNatRuleCollectionAction'}, + 'rules': {'key': 'rules', 'type': '[FirewallPolicyRule]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["FirewallPolicyNatRuleCollectionAction"] = None, + rules: Optional[List["FirewallPolicyRule"]] = None, + **kwargs + ): + """ + :keyword name: The name of the rule collection. + :paramtype name: str + :keyword priority: Priority of the Firewall Policy Rule Collection resource. + :paramtype priority: int + :keyword action: The action type of a Nat rule collection. + :paramtype action: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyNatRuleCollectionAction + :keyword rules: List of rules included in a rule collection. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRule] + """ + super(FirewallPolicyNatRuleCollection, self).__init__(name=name, priority=priority, **kwargs) + self.rule_collection_type = 'FirewallPolicyNatRuleCollection' # type: str + self.action = action + self.rules = rules + + +class FirewallPolicyNatRuleCollectionAction(msrest.serialization.Model): + """Properties of the FirewallPolicyNatRuleCollectionAction. + + :ivar type: The type of action. Possible values include: "DNAT". + :vartype type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyNatRuleCollectionActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "FirewallPolicyNatRuleCollectionActionType"]] = None, + **kwargs + ): + """ + :keyword type: The type of action. Possible values include: "DNAT". + :paramtype type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyNatRuleCollectionActionType + """ + super(FirewallPolicyNatRuleCollectionAction, self).__init__(**kwargs) + self.type = type + + +class FirewallPolicyRuleApplicationProtocol(msrest.serialization.Model): + """Properties of the application rule protocol. + + :ivar protocol_type: Protocol type. Possible values include: "Http", "Https". + :vartype protocol_type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleApplicationProtocolType + :ivar port: Port number for the protocol, cannot be greater than 64000. + :vartype port: int + """ + + _validation = { + 'port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + protocol_type: Optional[Union[str, "FirewallPolicyRuleApplicationProtocolType"]] = None, + port: Optional[int] = None, + **kwargs + ): + """ + :keyword protocol_type: Protocol type. Possible values include: "Http", "Https". + :paramtype protocol_type: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleApplicationProtocolType + :keyword port: Port number for the protocol, cannot be greater than 64000. + :paramtype port: int + """ + super(FirewallPolicyRuleApplicationProtocol, self).__init__(**kwargs) + self.protocol_type = protocol_type + self.port = port + + +class FirewallPolicyRuleCollectionGroup(SubResource): + """Rule Collection Group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Rule Group type. + :vartype type: str + :ivar priority: Priority of the Firewall Policy Rule Collection Group resource. + :vartype priority: int + :ivar rule_collections: Group of Firewall Policy rule collections. + :vartype rule_collections: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollection] + :ivar provisioning_state: The provisioning state of the firewall policy rule collection group + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'rule_collections': {'key': 'properties.ruleCollections', 'type': '[FirewallPolicyRuleCollection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + rule_collections: Optional[List["FirewallPolicyRuleCollection"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword priority: Priority of the Firewall Policy Rule Collection Group resource. + :paramtype priority: int + :keyword rule_collections: Group of Firewall Policy rule collections. + :paramtype rule_collections: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollection] + """ + super(FirewallPolicyRuleCollectionGroup, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.priority = priority + self.rule_collections = rule_collections + self.provisioning_state = None + + +class FirewallPolicyRuleCollectionGroupListResult(msrest.serialization.Model): + """Response for ListFirewallPolicyRuleCollectionGroups API service call. + + :ivar value: List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroup] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FirewallPolicyRuleCollectionGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["FirewallPolicyRuleCollectionGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroup] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(FirewallPolicyRuleCollectionGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class FirewallPolicySku(msrest.serialization.Model): + """SKU of Firewall policy. + + :ivar tier: Tier of Firewall Policy. Possible values include: "Standard", "Premium", "Basic". + :vartype tier: str or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicySkuTier + """ + + _attribute_map = { + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + tier: Optional[Union[str, "FirewallPolicySkuTier"]] = None, + **kwargs + ): + """ + :keyword tier: Tier of Firewall Policy. Possible values include: "Standard", "Premium", + "Basic". + :paramtype tier: str or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicySkuTier + """ + super(FirewallPolicySku, self).__init__(**kwargs) + self.tier = tier + + +class FirewallPolicySNAT(msrest.serialization.Model): + """The private IP addresses/IP ranges to which traffic will not be SNAT. + + :ivar private_ranges: List of private IP addresses/IP address ranges to not be SNAT. + :vartype private_ranges: list[str] + """ + + _attribute_map = { + 'private_ranges': {'key': 'privateRanges', 'type': '[str]'}, + } + + def __init__( + self, + *, + private_ranges: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword private_ranges: List of private IP addresses/IP address ranges to not be SNAT. + :paramtype private_ranges: list[str] + """ + super(FirewallPolicySNAT, self).__init__(**kwargs) + self.private_ranges = private_ranges + + +class FirewallPolicySQL(msrest.serialization.Model): + """SQL Settings in Firewall Policy. + + :ivar allow_sql_redirect: A flag to indicate if SQL Redirect traffic filtering is enabled. + Turning on the flag requires no rule using port 11000-11999. + :vartype allow_sql_redirect: bool + """ + + _attribute_map = { + 'allow_sql_redirect': {'key': 'allowSqlRedirect', 'type': 'bool'}, + } + + def __init__( + self, + *, + allow_sql_redirect: Optional[bool] = None, + **kwargs + ): + """ + :keyword allow_sql_redirect: A flag to indicate if SQL Redirect traffic filtering is enabled. + Turning on the flag requires no rule using port 11000-11999. + :paramtype allow_sql_redirect: bool + """ + super(FirewallPolicySQL, self).__init__(**kwargs) + self.allow_sql_redirect = allow_sql_redirect + + +class FirewallPolicyThreatIntelWhitelist(msrest.serialization.Model): + """ThreatIntel Whitelist for Firewall Policy. + + :ivar ip_addresses: List of IP addresses for the ThreatIntel Whitelist. + :vartype ip_addresses: list[str] + :ivar fqdns: List of FQDNs for the ThreatIntel Whitelist. + :vartype fqdns: list[str] + """ + + _attribute_map = { + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + } + + def __init__( + self, + *, + ip_addresses: Optional[List[str]] = None, + fqdns: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword ip_addresses: List of IP addresses for the ThreatIntel Whitelist. + :paramtype ip_addresses: list[str] + :keyword fqdns: List of FQDNs for the ThreatIntel Whitelist. + :paramtype fqdns: list[str] + """ + super(FirewallPolicyThreatIntelWhitelist, self).__init__(**kwargs) + self.ip_addresses = ip_addresses + self.fqdns = fqdns + + +class FirewallPolicyTransportSecurity(msrest.serialization.Model): + """Configuration needed to perform TLS termination & initiation. + + :ivar certificate_authority: The CA used for intermediate CA generation. + :vartype certificate_authority: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyCertificateAuthority + """ + + _attribute_map = { + 'certificate_authority': {'key': 'certificateAuthority', 'type': 'FirewallPolicyCertificateAuthority'}, + } + + def __init__( + self, + *, + certificate_authority: Optional["FirewallPolicyCertificateAuthority"] = None, + **kwargs + ): + """ + :keyword certificate_authority: The CA used for intermediate CA generation. + :paramtype certificate_authority: + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyCertificateAuthority + """ + super(FirewallPolicyTransportSecurity, self).__init__(**kwargs) + self.certificate_authority = certificate_authority + + +class FlowLog(Resource): + """A flow log resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar target_resource_id: ID of network security group to which flow log will be applied. + :vartype target_resource_id: str + :ivar target_resource_guid: Guid of network security group to which flow log will be applied. + :vartype target_resource_guid: str + :ivar storage_id: ID of the storage account which is used to store the flow log. + :vartype storage_id: str + :ivar enabled: Flag to enable/disable flow logging. + :vartype enabled: bool + :ivar retention_policy: Parameters that define the retention policy for flow log. + :vartype retention_policy: ~azure.mgmt.network.v2021_08_01.models.RetentionPolicyParameters + :ivar format: Parameters that define the flow log format. + :vartype format: ~azure.mgmt.network.v2021_08_01.models.FlowLogFormatParameters + :ivar flow_analytics_configuration: Parameters that define the configuration of traffic + analytics. + :vartype flow_analytics_configuration: + ~azure.mgmt.network.v2021_08_01.models.TrafficAnalyticsProperties + :ivar provisioning_state: The provisioning state of the flow log. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'target_resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'target_resource_guid': {'key': 'properties.targetResourceGuid', 'type': 'str'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, + 'format': {'key': 'properties.format', 'type': 'FlowLogFormatParameters'}, + 'flow_analytics_configuration': {'key': 'properties.flowAnalyticsConfiguration', 'type': 'TrafficAnalyticsProperties'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + target_resource_id: Optional[str] = None, + storage_id: Optional[str] = None, + enabled: Optional[bool] = None, + retention_policy: Optional["RetentionPolicyParameters"] = None, + format: Optional["FlowLogFormatParameters"] = None, + flow_analytics_configuration: Optional["TrafficAnalyticsProperties"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword target_resource_id: ID of network security group to which flow log will be applied. + :paramtype target_resource_id: str + :keyword storage_id: ID of the storage account which is used to store the flow log. + :paramtype storage_id: str + :keyword enabled: Flag to enable/disable flow logging. + :paramtype enabled: bool + :keyword retention_policy: Parameters that define the retention policy for flow log. + :paramtype retention_policy: ~azure.mgmt.network.v2021_08_01.models.RetentionPolicyParameters + :keyword format: Parameters that define the flow log format. + :paramtype format: ~azure.mgmt.network.v2021_08_01.models.FlowLogFormatParameters + :keyword flow_analytics_configuration: Parameters that define the configuration of traffic + analytics. + :paramtype flow_analytics_configuration: + ~azure.mgmt.network.v2021_08_01.models.TrafficAnalyticsProperties + """ + super(FlowLog, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.target_resource_id = target_resource_id + self.target_resource_guid = None + self.storage_id = storage_id + self.enabled = enabled + self.retention_policy = retention_policy + self.format = format + self.flow_analytics_configuration = flow_analytics_configuration + self.provisioning_state = None + + +class FlowLogFormatParameters(msrest.serialization.Model): + """Parameters that define the flow log format. + + :ivar type: The file type of flow log. Possible values include: "JSON". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.FlowLogFormatType + :ivar version: The version (revision) of the flow log. + :vartype version: int + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "FlowLogFormatType"]] = None, + version: Optional[int] = 0, + **kwargs + ): + """ + :keyword type: The file type of flow log. Possible values include: "JSON". + :paramtype type: str or ~azure.mgmt.network.v2021_08_01.models.FlowLogFormatType + :keyword version: The version (revision) of the flow log. + :paramtype version: int + """ + super(FlowLogFormatParameters, self).__init__(**kwargs) + self.type = type + self.version = version + + +class FlowLogInformation(msrest.serialization.Model): + """Information on the configuration of flow log and traffic analytics (optional) . + + All required parameters must be populated in order to send to Azure. + + :ivar target_resource_id: Required. The ID of the resource to configure for flow log and + traffic analytics (optional) . + :vartype target_resource_id: str + :ivar flow_analytics_configuration: Parameters that define the configuration of traffic + analytics. + :vartype flow_analytics_configuration: + ~azure.mgmt.network.v2021_08_01.models.TrafficAnalyticsProperties + :ivar storage_id: Required. ID of the storage account which is used to store the flow log. + :vartype storage_id: str + :ivar enabled: Required. Flag to enable/disable flow logging. + :vartype enabled: bool + :ivar retention_policy: Parameters that define the retention policy for flow log. + :vartype retention_policy: ~azure.mgmt.network.v2021_08_01.models.RetentionPolicyParameters + :ivar format: Parameters that define the flow log format. + :vartype format: ~azure.mgmt.network.v2021_08_01.models.FlowLogFormatParameters + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'storage_id': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'flow_analytics_configuration': {'key': 'flowAnalyticsConfiguration', 'type': 'TrafficAnalyticsProperties'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, + 'format': {'key': 'properties.format', 'type': 'FlowLogFormatParameters'}, + } + + def __init__( + self, + *, + target_resource_id: str, + storage_id: str, + enabled: bool, + flow_analytics_configuration: Optional["TrafficAnalyticsProperties"] = None, + retention_policy: Optional["RetentionPolicyParameters"] = None, + format: Optional["FlowLogFormatParameters"] = None, + **kwargs + ): + """ + :keyword target_resource_id: Required. The ID of the resource to configure for flow log and + traffic analytics (optional) . + :paramtype target_resource_id: str + :keyword flow_analytics_configuration: Parameters that define the configuration of traffic + analytics. + :paramtype flow_analytics_configuration: + ~azure.mgmt.network.v2021_08_01.models.TrafficAnalyticsProperties + :keyword storage_id: Required. ID of the storage account which is used to store the flow log. + :paramtype storage_id: str + :keyword enabled: Required. Flag to enable/disable flow logging. + :paramtype enabled: bool + :keyword retention_policy: Parameters that define the retention policy for flow log. + :paramtype retention_policy: ~azure.mgmt.network.v2021_08_01.models.RetentionPolicyParameters + :keyword format: Parameters that define the flow log format. + :paramtype format: ~azure.mgmt.network.v2021_08_01.models.FlowLogFormatParameters + """ + super(FlowLogInformation, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.flow_analytics_configuration = flow_analytics_configuration + self.storage_id = storage_id + self.enabled = enabled + self.retention_policy = retention_policy + self.format = format + + +class FlowLogListResult(msrest.serialization.Model): + """List of flow logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Information about flow log resource. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.FlowLog] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FlowLog]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["FlowLog"]] = None, + **kwargs + ): + """ + :keyword value: Information about flow log resource. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.FlowLog] + """ + super(FlowLogListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class FlowLogStatusParameters(msrest.serialization.Model): + """Parameters that define a resource to query flow log and traffic analytics (optional) status. + + All required parameters must be populated in order to send to Azure. + + :ivar target_resource_id: Required. The target resource where getting the flow log and traffic + analytics (optional) status. + :vartype target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + **kwargs + ): + """ + :keyword target_resource_id: Required. The target resource where getting the flow log and + traffic analytics (optional) status. + :paramtype target_resource_id: str + """ + super(FlowLogStatusParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + + +class FrontendIPConfiguration(SubResource): + """Frontend IP address of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the set of frontend IP + configurations used by the load balancer. This name can be used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :vartype zones: list[str] + :ivar inbound_nat_rules: An array of references to inbound rules that use this frontend IP. + :vartype inbound_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar inbound_nat_pools: An array of references to inbound pools that use this frontend IP. + :vartype inbound_nat_pools: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar outbound_rules: An array of references to outbound rules that use this frontend IP. + :vartype outbound_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar load_balancing_rules: An array of references to load balancing rules that use this + frontend IP. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar private_ip_address: The private IP address of the IP configuration. + :vartype private_ip_address: str + :ivar private_ip_allocation_method: The Private IP allocation method. Possible values include: + "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar private_ip_address_version: Whether the specific ipconfiguration is IPv4 or IPv6. Default + is taken as IPv4. Possible values include: "IPv4", "IPv6". + :vartype private_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :ivar subnet: The reference to the subnet resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :ivar public_ip_address: The reference to the Public IP resource. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :ivar public_ip_prefix: The reference to the Public IP Prefix resource. + :vartype public_ip_prefix: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar gateway_load_balancer: The reference to gateway load balancer frontend IP. + :vartype gateway_load_balancer: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the frontend IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'inbound_nat_rules': {'readonly': True}, + 'inbound_nat_pools': {'readonly': True}, + 'outbound_rules': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, + 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[SubResource]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + 'gateway_load_balancer': {'key': 'properties.gatewayLoadBalancer', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + zones: Optional[List[str]] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + subnet: Optional["Subnet"] = None, + public_ip_address: Optional["PublicIPAddress"] = None, + public_ip_prefix: Optional["SubResource"] = None, + gateway_load_balancer: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the set of frontend IP + configurations used by the load balancer. This name can be used to access the resource. + :paramtype name: str + :keyword zones: A list of availability zones denoting the IP allocated for the resource needs + to come from. + :paramtype zones: list[str] + :keyword private_ip_address: The private IP address of the IP configuration. + :paramtype private_ip_address: str + :keyword private_ip_allocation_method: The Private IP allocation method. Possible values + include: "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword private_ip_address_version: Whether the specific ipconfiguration is IPv4 or IPv6. + Default is taken as IPv4. Possible values include: "IPv4", "IPv6". + :paramtype private_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :keyword subnet: The reference to the subnet resource. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :keyword public_ip_address: The reference to the Public IP resource. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :keyword public_ip_prefix: The reference to the Public IP Prefix resource. + :paramtype public_ip_prefix: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword gateway_load_balancer: The reference to gateway load balancer frontend IP. + :paramtype gateway_load_balancer: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(FrontendIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.zones = zones + self.inbound_nat_rules = None + self.inbound_nat_pools = None + self.outbound_rules = None + self.load_balancing_rules = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.private_ip_address_version = private_ip_address_version + self.subnet = subnet + self.public_ip_address = public_ip_address + self.public_ip_prefix = public_ip_prefix + self.gateway_load_balancer = gateway_load_balancer + self.provisioning_state = None + + +class GatewayCustomBgpIpAddressIpConfiguration(msrest.serialization.Model): + """GatewayCustomBgpIpAddressIpConfiguration for a virtual network gateway connection. + + All required parameters must be populated in order to send to Azure. + + :ivar ip_configuration_id: Required. The IpconfigurationId of ipconfiguration which belongs to + gateway. + :vartype ip_configuration_id: str + :ivar custom_bgp_ip_address: Required. The custom BgpPeeringAddress which belongs to + IpconfigurationId. + :vartype custom_bgp_ip_address: str + """ + + _validation = { + 'ip_configuration_id': {'required': True}, + 'custom_bgp_ip_address': {'required': True}, + } + + _attribute_map = { + 'ip_configuration_id': {'key': 'ipConfigurationId', 'type': 'str'}, + 'custom_bgp_ip_address': {'key': 'customBgpIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_configuration_id: str, + custom_bgp_ip_address: str, + **kwargs + ): + """ + :keyword ip_configuration_id: Required. The IpconfigurationId of ipconfiguration which belongs + to gateway. + :paramtype ip_configuration_id: str + :keyword custom_bgp_ip_address: Required. The custom BgpPeeringAddress which belongs to + IpconfigurationId. + :paramtype custom_bgp_ip_address: str + """ + super(GatewayCustomBgpIpAddressIpConfiguration, self).__init__(**kwargs) + self.ip_configuration_id = ip_configuration_id + self.custom_bgp_ip_address = custom_bgp_ip_address + + +class GatewayLoadBalancerTunnelInterface(msrest.serialization.Model): + """Gateway load balancer tunnel interface of a load balancer backend address pool. + + :ivar port: Port of gateway load balancer tunnel interface. + :vartype port: int + :ivar identifier: Identifier of gateway load balancer tunnel interface. + :vartype identifier: int + :ivar protocol: Protocol of gateway load balancer tunnel interface. Possible values include: + "None", "Native", "VXLAN". + :vartype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.GatewayLoadBalancerTunnelProtocol + :ivar type: Traffic type of gateway load balancer tunnel interface. Possible values include: + "None", "Internal", "External". + :vartype type: str or + ~azure.mgmt.network.v2021_08_01.models.GatewayLoadBalancerTunnelInterfaceType + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'identifier': {'key': 'identifier', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + identifier: Optional[int] = None, + protocol: Optional[Union[str, "GatewayLoadBalancerTunnelProtocol"]] = None, + type: Optional[Union[str, "GatewayLoadBalancerTunnelInterfaceType"]] = None, + **kwargs + ): + """ + :keyword port: Port of gateway load balancer tunnel interface. + :paramtype port: int + :keyword identifier: Identifier of gateway load balancer tunnel interface. + :paramtype identifier: int + :keyword protocol: Protocol of gateway load balancer tunnel interface. Possible values include: + "None", "Native", "VXLAN". + :paramtype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.GatewayLoadBalancerTunnelProtocol + :keyword type: Traffic type of gateway load balancer tunnel interface. Possible values include: + "None", "Internal", "External". + :paramtype type: str or + ~azure.mgmt.network.v2021_08_01.models.GatewayLoadBalancerTunnelInterfaceType + """ + super(GatewayLoadBalancerTunnelInterface, self).__init__(**kwargs) + self.port = port + self.identifier = identifier + self.protocol = protocol + self.type = type + + +class GatewayRoute(msrest.serialization.Model): + """Gateway routing details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The gateway's local address. + :vartype local_address: str + :ivar network: The route's network prefix. + :vartype network: str + :ivar next_hop: The route's next hop. + :vartype next_hop: str + :ivar source_peer: The peer this route was learned from. + :vartype source_peer: str + :ivar origin: The source this route was learned from. + :vartype origin: str + :ivar as_path: The route's AS path sequence. + :vartype as_path: str + :ivar weight: The route's weight. + :vartype weight: int + """ + + _validation = { + 'local_address': {'readonly': True}, + 'network': {'readonly': True}, + 'next_hop': {'readonly': True}, + 'source_peer': {'readonly': True}, + 'origin': {'readonly': True}, + 'as_path': {'readonly': True}, + 'weight': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(GatewayRoute, self).__init__(**kwargs) + self.local_address = None + self.network = None + self.next_hop = None + self.source_peer = None + self.origin = None + self.as_path = None + self.weight = None + + +class GatewayRouteListResult(msrest.serialization.Model): + """List of virtual network gateway routes. + + :ivar value: List of gateway routes. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.GatewayRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GatewayRoute]'}, + } + + def __init__( + self, + *, + value: Optional[List["GatewayRoute"]] = None, + **kwargs + ): + """ + :keyword value: List of gateway routes. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.GatewayRoute] + """ + super(GatewayRouteListResult, self).__init__(**kwargs) + self.value = value + + +class GenerateExpressRoutePortsLOARequest(msrest.serialization.Model): + """The customer name to be printed on a letter of authorization. + + All required parameters must be populated in order to send to Azure. + + :ivar customer_name: Required. The customer name. + :vartype customer_name: str + """ + + _validation = { + 'customer_name': {'required': True}, + } + + _attribute_map = { + 'customer_name': {'key': 'customerName', 'type': 'str'}, + } + + def __init__( + self, + *, + customer_name: str, + **kwargs + ): + """ + :keyword customer_name: Required. The customer name. + :paramtype customer_name: str + """ + super(GenerateExpressRoutePortsLOARequest, self).__init__(**kwargs) + self.customer_name = customer_name + + +class GenerateExpressRoutePortsLOAResult(msrest.serialization.Model): + """Response for GenerateExpressRoutePortsLOA API service call. + + :ivar encoded_content: The content as a base64 encoded string. + :vartype encoded_content: str + """ + + _attribute_map = { + 'encoded_content': {'key': 'encodedContent', 'type': 'str'}, + } + + def __init__( + self, + *, + encoded_content: Optional[str] = None, + **kwargs + ): + """ + :keyword encoded_content: The content as a base64 encoded string. + :paramtype encoded_content: str + """ + super(GenerateExpressRoutePortsLOAResult, self).__init__(**kwargs) + self.encoded_content = encoded_content + + +class GetVpnSitesConfigurationRequest(msrest.serialization.Model): + """List of Vpn-Sites. + + All required parameters must be populated in order to send to Azure. + + :ivar vpn_sites: List of resource-ids of the vpn-sites for which config is to be downloaded. + :vartype vpn_sites: list[str] + :ivar output_blob_sas_url: Required. The sas-url to download the configurations for vpn-sites. + :vartype output_blob_sas_url: str + """ + + _validation = { + 'output_blob_sas_url': {'required': True}, + } + + _attribute_map = { + 'vpn_sites': {'key': 'vpnSites', 'type': '[str]'}, + 'output_blob_sas_url': {'key': 'outputBlobSasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + output_blob_sas_url: str, + vpn_sites: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword vpn_sites: List of resource-ids of the vpn-sites for which config is to be downloaded. + :paramtype vpn_sites: list[str] + :keyword output_blob_sas_url: Required. The sas-url to download the configurations for + vpn-sites. + :paramtype output_blob_sas_url: str + """ + super(GetVpnSitesConfigurationRequest, self).__init__(**kwargs) + self.vpn_sites = vpn_sites + self.output_blob_sas_url = output_blob_sas_url + + +class HopLink(msrest.serialization.Model): + """Hop link. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar next_hop_id: The ID of the next hop. + :vartype next_hop_id: str + :ivar link_type: Link type. + :vartype link_type: str + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.network.v2021_08_01.models.ConnectivityIssue] + :ivar context: Provides additional context on links. + :vartype context: dict[str, str] + :ivar resource_id: Resource ID. + :vartype resource_id: str + :ivar round_trip_time_min: Minimum roundtrip time in milliseconds. + :vartype round_trip_time_min: long + :ivar round_trip_time_avg: Average roundtrip time in milliseconds. + :vartype round_trip_time_avg: long + :ivar round_trip_time_max: Maximum roundtrip time in milliseconds. + :vartype round_trip_time_max: long + """ + + _validation = { + 'next_hop_id': {'readonly': True}, + 'link_type': {'readonly': True}, + 'issues': {'readonly': True}, + 'context': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'round_trip_time_min': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'round_trip_time_avg': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'round_trip_time_max': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'next_hop_id': {'key': 'nextHopId', 'type': 'str'}, + 'link_type': {'key': 'linkType', 'type': 'str'}, + 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, + 'context': {'key': 'context', 'type': '{str}'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'round_trip_time_min': {'key': 'properties.roundTripTimeMin', 'type': 'long'}, + 'round_trip_time_avg': {'key': 'properties.roundTripTimeAvg', 'type': 'long'}, + 'round_trip_time_max': {'key': 'properties.roundTripTimeMax', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(HopLink, self).__init__(**kwargs) + self.next_hop_id = None + self.link_type = None + self.issues = None + self.context = None + self.resource_id = None + self.round_trip_time_min = None + self.round_trip_time_avg = None + self.round_trip_time_max = None + + +class HTTPConfiguration(msrest.serialization.Model): + """HTTP configuration of the connectivity check. + + :ivar method: HTTP method. Possible values include: "Get". + :vartype method: str or ~azure.mgmt.network.v2021_08_01.models.HTTPMethod + :ivar headers: List of HTTP headers. + :vartype headers: list[~azure.mgmt.network.v2021_08_01.models.HTTPHeader] + :ivar valid_status_codes: Valid status codes. + :vartype valid_status_codes: list[int] + """ + + _attribute_map = { + 'method': {'key': 'method', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '[HTTPHeader]'}, + 'valid_status_codes': {'key': 'validStatusCodes', 'type': '[int]'}, + } + + def __init__( + self, + *, + method: Optional[Union[str, "HTTPMethod"]] = None, + headers: Optional[List["HTTPHeader"]] = None, + valid_status_codes: Optional[List[int]] = None, + **kwargs + ): + """ + :keyword method: HTTP method. Possible values include: "Get". + :paramtype method: str or ~azure.mgmt.network.v2021_08_01.models.HTTPMethod + :keyword headers: List of HTTP headers. + :paramtype headers: list[~azure.mgmt.network.v2021_08_01.models.HTTPHeader] + :keyword valid_status_codes: Valid status codes. + :paramtype valid_status_codes: list[int] + """ + super(HTTPConfiguration, self).__init__(**kwargs) + self.method = method + self.headers = headers + self.valid_status_codes = valid_status_codes + + +class HTTPHeader(msrest.serialization.Model): + """The HTTP header. + + :ivar name: The name in HTTP header. + :vartype name: str + :ivar value: The value in HTTP header. + :vartype value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name in HTTP header. + :paramtype name: str + :keyword value: The value in HTTP header. + :paramtype value: str + """ + super(HTTPHeader, self).__init__(**kwargs) + self.name = name + self.value = value + + +class HubIPAddresses(msrest.serialization.Model): + """IP addresses associated with azure firewall. + + :ivar public_i_ps: Public IP addresses associated with azure firewall. + :vartype public_i_ps: ~azure.mgmt.network.v2021_08_01.models.HubPublicIPAddresses + :ivar private_ip_address: Private IP Address associated with azure firewall. + :vartype private_ip_address: str + """ + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': 'HubPublicIPAddresses'}, + 'private_ip_address': {'key': 'privateIPAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + public_i_ps: Optional["HubPublicIPAddresses"] = None, + private_ip_address: Optional[str] = None, + **kwargs + ): + """ + :keyword public_i_ps: Public IP addresses associated with azure firewall. + :paramtype public_i_ps: ~azure.mgmt.network.v2021_08_01.models.HubPublicIPAddresses + :keyword private_ip_address: Private IP Address associated with azure firewall. + :paramtype private_ip_address: str + """ + super(HubIPAddresses, self).__init__(**kwargs) + self.public_i_ps = public_i_ps + self.private_ip_address = private_ip_address + + +class HubIpConfiguration(SubResource): + """IpConfigurations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the Ip Configuration. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Ipconfiguration type. + :vartype type: str + :ivar private_ip_address: The private IP address of the IP configuration. + :vartype private_ip_address: str + :ivar private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar subnet: The reference to the subnet resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :ivar public_ip_address: The reference to the public IP resource. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :ivar provisioning_state: The provisioning state of the IP configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["Subnet"] = None, + public_ip_address: Optional["PublicIPAddress"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the Ip Configuration. + :paramtype name: str + :keyword private_ip_address: The private IP address of the IP configuration. + :paramtype private_ip_address: str + :keyword private_ip_allocation_method: The private IP address allocation method. Possible + values include: "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword subnet: The reference to the subnet resource. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :keyword public_ip_address: The reference to the public IP resource. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + """ + super(HubIpConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.public_ip_address = public_ip_address + self.provisioning_state = None + + +class HubPublicIPAddresses(msrest.serialization.Model): + """Public IP addresses associated with azure firewall. + + :ivar addresses: The list of Public IP addresses associated with azure firewall or IP addresses + to be retained. + :vartype addresses: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallPublicIPAddress] + :ivar count: The number of Public IP addresses associated with azure firewall. + :vartype count: int + """ + + _attribute_map = { + 'addresses': {'key': 'addresses', 'type': '[AzureFirewallPublicIPAddress]'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + *, + addresses: Optional[List["AzureFirewallPublicIPAddress"]] = None, + count: Optional[int] = None, + **kwargs + ): + """ + :keyword addresses: The list of Public IP addresses associated with azure firewall or IP + addresses to be retained. + :paramtype addresses: list[~azure.mgmt.network.v2021_08_01.models.AzureFirewallPublicIPAddress] + :keyword count: The number of Public IP addresses associated with azure firewall. + :paramtype count: int + """ + super(HubPublicIPAddresses, self).__init__(**kwargs) + self.addresses = addresses + self.count = count + + +class HubRoute(msrest.serialization.Model): + """RouteTable route. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The name of the Route that is unique within a RouteTable. This name can + be used to access this route. + :vartype name: str + :ivar destination_type: Required. The type of destinations (eg: CIDR, ResourceId, Service). + :vartype destination_type: str + :ivar destinations: Required. List of all destinations. + :vartype destinations: list[str] + :ivar next_hop_type: Required. The type of next hop (eg: ResourceId). + :vartype next_hop_type: str + :ivar next_hop: Required. NextHop resource ID. + :vartype next_hop: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_type': {'required': True}, + 'destinations': {'required': True}, + 'next_hop_type': {'required': True}, + 'next_hop': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'destination_type': {'key': 'destinationType', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + destination_type: str, + destinations: List[str], + next_hop_type: str, + next_hop: str, + **kwargs + ): + """ + :keyword name: Required. The name of the Route that is unique within a RouteTable. This name + can be used to access this route. + :paramtype name: str + :keyword destination_type: Required. The type of destinations (eg: CIDR, ResourceId, Service). + :paramtype destination_type: str + :keyword destinations: Required. List of all destinations. + :paramtype destinations: list[str] + :keyword next_hop_type: Required. The type of next hop (eg: ResourceId). + :paramtype next_hop_type: str + :keyword next_hop: Required. NextHop resource ID. + :paramtype next_hop: str + """ + super(HubRoute, self).__init__(**kwargs) + self.name = name + self.destination_type = destination_type + self.destinations = destinations + self.next_hop_type = next_hop_type + self.next_hop = next_hop + + +class HubRouteTable(SubResource): + """RouteTable resource in a virtual hub. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar routes: List of all routes. + :vartype routes: list[~azure.mgmt.network.v2021_08_01.models.HubRoute] + :ivar labels: List of labels associated with this route table. + :vartype labels: list[str] + :ivar associated_connections: List of all connections associated with this route table. + :vartype associated_connections: list[str] + :ivar propagating_connections: List of all connections that advertise to this route table. + :vartype propagating_connections: list[str] + :ivar provisioning_state: The provisioning state of the RouteTable resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'associated_connections': {'readonly': True}, + 'propagating_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[HubRoute]'}, + 'labels': {'key': 'properties.labels', 'type': '[str]'}, + 'associated_connections': {'key': 'properties.associatedConnections', 'type': '[str]'}, + 'propagating_connections': {'key': 'properties.propagatingConnections', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + routes: Optional[List["HubRoute"]] = None, + labels: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword routes: List of all routes. + :paramtype routes: list[~azure.mgmt.network.v2021_08_01.models.HubRoute] + :keyword labels: List of labels associated with this route table. + :paramtype labels: list[str] + """ + super(HubRouteTable, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.routes = routes + self.labels = labels + self.associated_connections = None + self.propagating_connections = None + self.provisioning_state = None + + +class HubVirtualNetworkConnection(SubResource): + """HubVirtualNetworkConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar remote_virtual_network: Reference to the remote virtual network. + :vartype remote_virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar allow_hub_to_remote_vnet_transit: Deprecated: VirtualHub to RemoteVnet transit to enabled + or not. + :vartype allow_hub_to_remote_vnet_transit: bool + :ivar allow_remote_vnet_to_use_hub_vnet_gateways: Deprecated: Allow RemoteVnet to use Virtual + Hub's gateways. + :vartype allow_remote_vnet_to_use_hub_vnet_gateways: bool + :ivar enable_internet_security: Enable internet security. + :vartype enable_internet_security: bool + :ivar routing_configuration: The Routing Configuration indicating the associated and propagated + route tables on this connection. + :vartype routing_configuration: ~azure.mgmt.network.v2021_08_01.models.RoutingConfiguration + :ivar provisioning_state: The provisioning state of the hub virtual network connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, + 'allow_hub_to_remote_vnet_transit': {'key': 'properties.allowHubToRemoteVnetTransit', 'type': 'bool'}, + 'allow_remote_vnet_to_use_hub_vnet_gateways': {'key': 'properties.allowRemoteVnetToUseHubVnetGateways', 'type': 'bool'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + remote_virtual_network: Optional["SubResource"] = None, + allow_hub_to_remote_vnet_transit: Optional[bool] = None, + allow_remote_vnet_to_use_hub_vnet_gateways: Optional[bool] = None, + enable_internet_security: Optional[bool] = None, + routing_configuration: Optional["RoutingConfiguration"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword remote_virtual_network: Reference to the remote virtual network. + :paramtype remote_virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword allow_hub_to_remote_vnet_transit: Deprecated: VirtualHub to RemoteVnet transit to + enabled or not. + :paramtype allow_hub_to_remote_vnet_transit: bool + :keyword allow_remote_vnet_to_use_hub_vnet_gateways: Deprecated: Allow RemoteVnet to use + Virtual Hub's gateways. + :paramtype allow_remote_vnet_to_use_hub_vnet_gateways: bool + :keyword enable_internet_security: Enable internet security. + :paramtype enable_internet_security: bool + :keyword routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :paramtype routing_configuration: ~azure.mgmt.network.v2021_08_01.models.RoutingConfiguration + """ + super(HubVirtualNetworkConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.remote_virtual_network = remote_virtual_network + self.allow_hub_to_remote_vnet_transit = allow_hub_to_remote_vnet_transit + self.allow_remote_vnet_to_use_hub_vnet_gateways = allow_remote_vnet_to_use_hub_vnet_gateways + self.enable_internet_security = enable_internet_security + self.routing_configuration = routing_configuration + self.provisioning_state = None + + +class IDPSQueryObject(msrest.serialization.Model): + """Will describe the query to run against the IDPS signatures DB. + + :ivar filters: Contain all filters names and values. + :vartype filters: list[~azure.mgmt.network.v2021_08_01.models.FilterItems] + :ivar search: Search term in all columns. + :vartype search: str + :ivar order_by: Column to sort response by. + :vartype order_by: ~azure.mgmt.network.v2021_08_01.models.OrderBy + :ivar results_per_page: The number of the results to return in each page. + :vartype results_per_page: int + :ivar skip: The number of records matching the filter to skip. + :vartype skip: int + """ + + _validation = { + 'results_per_page': {'maximum': 1000, 'minimum': 1}, + } + + _attribute_map = { + 'filters': {'key': 'filters', 'type': '[FilterItems]'}, + 'search': {'key': 'search', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'OrderBy'}, + 'results_per_page': {'key': 'resultsPerPage', 'type': 'int'}, + 'skip': {'key': 'skip', 'type': 'int'}, + } + + def __init__( + self, + *, + filters: Optional[List["FilterItems"]] = None, + search: Optional[str] = None, + order_by: Optional["OrderBy"] = None, + results_per_page: Optional[int] = None, + skip: Optional[int] = None, + **kwargs + ): + """ + :keyword filters: Contain all filters names and values. + :paramtype filters: list[~azure.mgmt.network.v2021_08_01.models.FilterItems] + :keyword search: Search term in all columns. + :paramtype search: str + :keyword order_by: Column to sort response by. + :paramtype order_by: ~azure.mgmt.network.v2021_08_01.models.OrderBy + :keyword results_per_page: The number of the results to return in each page. + :paramtype results_per_page: int + :keyword skip: The number of records matching the filter to skip. + :paramtype skip: int + """ + super(IDPSQueryObject, self).__init__(**kwargs) + self.filters = filters + self.search = search + self.order_by = order_by + self.results_per_page = results_per_page + self.skip = skip + + +class InboundNatPool(SubResource): + """Inbound NAT pool of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the set of inbound NAT pools used by + the load balancer. This name can be used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar frontend_ip_configuration: A reference to frontend IP addresses. + :vartype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar protocol: The reference to the transport protocol used by the inbound NAT pool. Possible + values include: "Udp", "Tcp", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.TransportProtocol + :ivar frontend_port_range_start: The first port number in the range of external ports that will + be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range + between 1 and 65534. + :vartype frontend_port_range_start: int + :ivar frontend_port_range_end: The last port number in the range of external ports that will be + used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range + between 1 and 65535. + :vartype frontend_port_range_end: int + :ivar backend_port: The port used for internal connections on the endpoint. Acceptable values + are between 1 and 65535. + :vartype backend_port: int + :ivar idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :vartype idle_timeout_in_minutes: int + :ivar enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :vartype enable_floating_ip: bool + :ivar enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :vartype enable_tcp_reset: bool + :ivar provisioning_state: The provisioning state of the inbound NAT pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, + 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + protocol: Optional[Union[str, "TransportProtocol"]] = None, + frontend_port_range_start: Optional[int] = None, + frontend_port_range_end: Optional[int] = None, + backend_port: Optional[int] = None, + idle_timeout_in_minutes: Optional[int] = None, + enable_floating_ip: Optional[bool] = None, + enable_tcp_reset: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the set of inbound NAT pools used + by the load balancer. This name can be used to access the resource. + :paramtype name: str + :keyword frontend_ip_configuration: A reference to frontend IP addresses. + :paramtype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword protocol: The reference to the transport protocol used by the inbound NAT pool. + Possible values include: "Udp", "Tcp", "All". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.TransportProtocol + :keyword frontend_port_range_start: The first port number in the range of external ports that + will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values + range between 1 and 65534. + :paramtype frontend_port_range_start: int + :keyword frontend_port_range_end: The last port number in the range of external ports that will + be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range + between 1 and 65535. + :paramtype frontend_port_range_end: int + :keyword backend_port: The port used for internal connections on the endpoint. Acceptable + values are between 1 and 65535. + :paramtype backend_port: int + :keyword idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :paramtype idle_timeout_in_minutes: int + :keyword enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :paramtype enable_floating_ip: bool + :keyword enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or + unexpected connection termination. This element is only used when the protocol is set to TCP. + :paramtype enable_tcp_reset: bool + """ + super(InboundNatPool, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.protocol = protocol + self.frontend_port_range_start = frontend_port_range_start + self.frontend_port_range_end = frontend_port_range_end + self.backend_port = backend_port + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_floating_ip = enable_floating_ip + self.enable_tcp_reset = enable_tcp_reset + self.provisioning_state = None + + +class InboundNatRule(SubResource): + """Inbound NAT rule of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the set of inbound NAT rules used by + the load balancer. This name can be used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar frontend_ip_configuration: A reference to frontend IP addresses. + :vartype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar backend_ip_configuration: A reference to a private IP address defined on a network + interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations + is forwarded to the backend IP. + :vartype backend_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :ivar protocol: The reference to the transport protocol used by the load balancing rule. + Possible values include: "Udp", "Tcp", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.TransportProtocol + :ivar frontend_port: The port for the external endpoint. Port numbers for each rule must be + unique within the Load Balancer. Acceptable values range from 1 to 65534. + :vartype frontend_port: int + :ivar backend_port: The port used for the internal endpoint. Acceptable values range from 1 to + 65535. + :vartype backend_port: int + :ivar idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :vartype idle_timeout_in_minutes: int + :ivar enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :vartype enable_floating_ip: bool + :ivar enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :vartype enable_tcp_reset: bool + :ivar frontend_port_range_start: The port range start for the external endpoint. This property + is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule + port mappings will be created for each backend address from BackendAddressPool. Acceptable + values range from 1 to 65534. + :vartype frontend_port_range_start: int + :ivar frontend_port_range_end: The port range end for the external endpoint. This property is + used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule + port mappings will be created for each backend address from BackendAddressPool. Acceptable + values range from 1 to 65534. + :vartype frontend_port_range_end: int + :ivar backend_address_pool: A reference to backendAddressPool resource. + :vartype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the inbound NAT rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configuration': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, + 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + protocol: Optional[Union[str, "TransportProtocol"]] = None, + frontend_port: Optional[int] = None, + backend_port: Optional[int] = None, + idle_timeout_in_minutes: Optional[int] = None, + enable_floating_ip: Optional[bool] = None, + enable_tcp_reset: Optional[bool] = None, + frontend_port_range_start: Optional[int] = None, + frontend_port_range_end: Optional[int] = None, + backend_address_pool: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the set of inbound NAT rules used + by the load balancer. This name can be used to access the resource. + :paramtype name: str + :keyword frontend_ip_configuration: A reference to frontend IP addresses. + :paramtype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword protocol: The reference to the transport protocol used by the load balancing rule. + Possible values include: "Udp", "Tcp", "All". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.TransportProtocol + :keyword frontend_port: The port for the external endpoint. Port numbers for each rule must be + unique within the Load Balancer. Acceptable values range from 1 to 65534. + :paramtype frontend_port: int + :keyword backend_port: The port used for the internal endpoint. Acceptable values range from 1 + to 65535. + :paramtype backend_port: int + :keyword idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :paramtype idle_timeout_in_minutes: int + :keyword enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :paramtype enable_floating_ip: bool + :keyword enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or + unexpected connection termination. This element is only used when the protocol is set to TCP. + :paramtype enable_tcp_reset: bool + :keyword frontend_port_range_start: The port range start for the external endpoint. This + property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound + NAT rule port mappings will be created for each backend address from BackendAddressPool. + Acceptable values range from 1 to 65534. + :paramtype frontend_port_range_start: int + :keyword frontend_port_range_end: The port range end for the external endpoint. This property + is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT + rule port mappings will be created for each backend address from BackendAddressPool. Acceptable + values range from 1 to 65534. + :paramtype frontend_port_range_end: int + :keyword backend_address_pool: A reference to backendAddressPool resource. + :paramtype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(InboundNatRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.backend_ip_configuration = None + self.protocol = protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_floating_ip = enable_floating_ip + self.enable_tcp_reset = enable_tcp_reset + self.frontend_port_range_start = frontend_port_range_start + self.frontend_port_range_end = frontend_port_range_end + self.backend_address_pool = backend_address_pool + self.provisioning_state = None + + +class InboundNatRuleListResult(msrest.serialization.Model): + """Response for ListInboundNatRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of inbound NAT rules in a load balancer. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.InboundNatRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InboundNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["InboundNatRule"]] = None, + **kwargs + ): + """ + :keyword value: A list of inbound NAT rules in a load balancer. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.InboundNatRule] + """ + super(InboundNatRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class InboundNatRulePortMapping(msrest.serialization.Model): + """Individual port mappings for inbound NAT rule created for backend pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar inbound_nat_rule_name: Name of inbound NAT rule. + :vartype inbound_nat_rule_name: str + :ivar protocol: The reference to the transport protocol used by the inbound NAT rule. Possible + values include: "Udp", "Tcp", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.TransportProtocol + :ivar frontend_port: Frontend port. + :vartype frontend_port: int + :ivar backend_port: Backend port. + :vartype backend_port: int + """ + + _validation = { + 'inbound_nat_rule_name': {'readonly': True}, + 'protocol': {'readonly': True}, + 'frontend_port': {'readonly': True}, + 'backend_port': {'readonly': True}, + } + + _attribute_map = { + 'inbound_nat_rule_name': {'key': 'inboundNatRuleName', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(InboundNatRulePortMapping, self).__init__(**kwargs) + self.inbound_nat_rule_name = None + self.protocol = None + self.frontend_port = None + self.backend_port = None + + +class InboundSecurityRule(SubResource): + """NVA Inbound Security Rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of security rule collection. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: NVA inbound security rule type. + :vartype type: str + :ivar rules: List of allowed rules. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.InboundSecurityRules] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rules': {'key': 'properties.rules', 'type': '[InboundSecurityRules]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + rules: Optional[List["InboundSecurityRules"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of security rule collection. + :paramtype name: str + :keyword rules: List of allowed rules. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.InboundSecurityRules] + """ + super(InboundSecurityRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.rules = rules + self.provisioning_state = None + + +class InboundSecurityRules(msrest.serialization.Model): + """Properties of the Inbound Security Rules resource. + + :ivar protocol: Protocol. This should be either TCP or UDP. Possible values include: "TCP", + "UDP". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.InboundSecurityRulesProtocol + :ivar source_address_prefix: The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are + allowed. + :vartype source_address_prefix: str + :ivar destination_port_range: NVA port ranges to be opened up. One needs to provide specific + ports. + :vartype destination_port_range: int + """ + + _validation = { + 'destination_port_range': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'destination_port_range': {'key': 'destinationPortRange', 'type': 'int'}, + } + + def __init__( + self, + *, + protocol: Optional[Union[str, "InboundSecurityRulesProtocol"]] = None, + source_address_prefix: Optional[str] = None, + destination_port_range: Optional[int] = None, + **kwargs + ): + """ + :keyword protocol: Protocol. This should be either TCP or UDP. Possible values include: "TCP", + "UDP". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.InboundSecurityRulesProtocol + :keyword source_address_prefix: The CIDR or source IP range. Only /30, /31 and /32 Ip ranges + are allowed. + :paramtype source_address_prefix: str + :keyword destination_port_range: NVA port ranges to be opened up. One needs to provide specific + ports. + :paramtype destination_port_range: int + """ + super(InboundSecurityRules, self).__init__(**kwargs) + self.protocol = protocol + self.source_address_prefix = source_address_prefix + self.destination_port_range = destination_port_range + + +class IPAddressAvailabilityResult(msrest.serialization.Model): + """Response for CheckIPAddressAvailability API service call. + + :ivar available: Private IP address availability. + :vartype available: bool + :ivar available_ip_addresses: Contains other available private IP addresses if the asked for + address is taken. + :vartype available_ip_addresses: list[str] + :ivar is_platform_reserved: Private IP address platform reserved. + :vartype is_platform_reserved: bool + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, + 'is_platform_reserved': {'key': 'isPlatformReserved', 'type': 'bool'}, + } + + def __init__( + self, + *, + available: Optional[bool] = None, + available_ip_addresses: Optional[List[str]] = None, + is_platform_reserved: Optional[bool] = None, + **kwargs + ): + """ + :keyword available: Private IP address availability. + :paramtype available: bool + :keyword available_ip_addresses: Contains other available private IP addresses if the asked for + address is taken. + :paramtype available_ip_addresses: list[str] + :keyword is_platform_reserved: Private IP address platform reserved. + :paramtype is_platform_reserved: bool + """ + super(IPAddressAvailabilityResult, self).__init__(**kwargs) + self.available = available + self.available_ip_addresses = available_ip_addresses + self.is_platform_reserved = is_platform_reserved + + +class IpAllocation(Resource): + """IpAllocation resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar subnet: The Subnet that using the prefix of this IpAllocation resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar virtual_network: The VirtualNetwork that using the prefix of this IpAllocation resource. + :vartype virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar type_properties_type: The type for the IpAllocation. Possible values include: + "Undefined", "Hypernet". + :vartype type_properties_type: str or ~azure.mgmt.network.v2021_08_01.models.IpAllocationType + :ivar prefix: The address prefix for the IpAllocation. + :vartype prefix: str + :ivar prefix_length: The address prefix length for the IpAllocation. + :vartype prefix_length: int + :ivar prefix_type: The address prefix Type for the IpAllocation. Possible values include: + "IPv4", "IPv6". + :vartype prefix_type: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :ivar ipam_allocation_id: The IPAM allocation ID. + :vartype ipam_allocation_id: str + :ivar allocation_tags: IpAllocation tags. + :vartype allocation_tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnet': {'readonly': True}, + 'virtual_network': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'prefix_length': {'key': 'properties.prefixLength', 'type': 'int'}, + 'prefix_type': {'key': 'properties.prefixType', 'type': 'str'}, + 'ipam_allocation_id': {'key': 'properties.ipamAllocationId', 'type': 'str'}, + 'allocation_tags': {'key': 'properties.allocationTags', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + type_properties_type: Optional[Union[str, "IpAllocationType"]] = None, + prefix: Optional[str] = None, + prefix_length: Optional[int] = 0, + prefix_type: Optional[Union[str, "IPVersion"]] = None, + ipam_allocation_id: Optional[str] = None, + allocation_tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword type_properties_type: The type for the IpAllocation. Possible values include: + "Undefined", "Hypernet". + :paramtype type_properties_type: str or ~azure.mgmt.network.v2021_08_01.models.IpAllocationType + :keyword prefix: The address prefix for the IpAllocation. + :paramtype prefix: str + :keyword prefix_length: The address prefix length for the IpAllocation. + :paramtype prefix_length: int + :keyword prefix_type: The address prefix Type for the IpAllocation. Possible values include: + "IPv4", "IPv6". + :paramtype prefix_type: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :keyword ipam_allocation_id: The IPAM allocation ID. + :paramtype ipam_allocation_id: str + :keyword allocation_tags: IpAllocation tags. + :paramtype allocation_tags: dict[str, str] + """ + super(IpAllocation, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.subnet = None + self.virtual_network = None + self.type_properties_type = type_properties_type + self.prefix = prefix + self.prefix_length = prefix_length + self.prefix_type = prefix_type + self.ipam_allocation_id = ipam_allocation_id + self.allocation_tags = allocation_tags + + +class IpAllocationListResult(msrest.serialization.Model): + """Response for the ListIpAllocations API service call. + + :ivar value: A list of IpAllocation resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.IpAllocation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IpAllocation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["IpAllocation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of IpAllocation resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.IpAllocation] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(IpAllocationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class IPConfiguration(SubResource): + """IP configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar private_ip_address: The private IP address of the IP configuration. + :vartype private_ip_address: str + :ivar private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar subnet: The reference to the subnet resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :ivar public_ip_address: The reference to the public IP resource. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :ivar provisioning_state: The provisioning state of the IP configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["Subnet"] = None, + public_ip_address: Optional["PublicIPAddress"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword private_ip_address: The private IP address of the IP configuration. + :paramtype private_ip_address: str + :keyword private_ip_allocation_method: The private IP address allocation method. Possible + values include: "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword subnet: The reference to the subnet resource. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :keyword public_ip_address: The reference to the public IP resource. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + """ + super(IPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.public_ip_address = public_ip_address + self.provisioning_state = None + + +class IPConfigurationBgpPeeringAddress(msrest.serialization.Model): + """Properties of IPConfigurationBgpPeeringAddress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar ipconfiguration_id: The ID of IP configuration which belongs to gateway. + :vartype ipconfiguration_id: str + :ivar default_bgp_ip_addresses: The list of default BGP peering addresses which belong to IP + configuration. + :vartype default_bgp_ip_addresses: list[str] + :ivar custom_bgp_ip_addresses: The list of custom BGP peering addresses which belong to IP + configuration. + :vartype custom_bgp_ip_addresses: list[str] + :ivar tunnel_ip_addresses: The list of tunnel public IP addresses which belong to IP + configuration. + :vartype tunnel_ip_addresses: list[str] + """ + + _validation = { + 'default_bgp_ip_addresses': {'readonly': True}, + 'tunnel_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'ipconfiguration_id': {'key': 'ipconfigurationId', 'type': 'str'}, + 'default_bgp_ip_addresses': {'key': 'defaultBgpIpAddresses', 'type': '[str]'}, + 'custom_bgp_ip_addresses': {'key': 'customBgpIpAddresses', 'type': '[str]'}, + 'tunnel_ip_addresses': {'key': 'tunnelIpAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + ipconfiguration_id: Optional[str] = None, + custom_bgp_ip_addresses: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword ipconfiguration_id: The ID of IP configuration which belongs to gateway. + :paramtype ipconfiguration_id: str + :keyword custom_bgp_ip_addresses: The list of custom BGP peering addresses which belong to IP + configuration. + :paramtype custom_bgp_ip_addresses: list[str] + """ + super(IPConfigurationBgpPeeringAddress, self).__init__(**kwargs) + self.ipconfiguration_id = ipconfiguration_id + self.default_bgp_ip_addresses = None + self.custom_bgp_ip_addresses = custom_bgp_ip_addresses + self.tunnel_ip_addresses = None + + +class IPConfigurationProfile(SubResource): + """IP configuration profile child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource. This name can be used to access the resource. + :vartype name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar subnet: The reference to the subnet resource to create a container network interface ip + configuration. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :ivar provisioning_state: The provisioning state of the IP configuration profile resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + subnet: Optional["Subnet"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource. This name can be used to access the resource. + :paramtype name: str + :keyword subnet: The reference to the subnet resource to create a container network interface + ip configuration. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + """ + super(IPConfigurationProfile, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.subnet = subnet + self.provisioning_state = None + + +class IpGroup(Resource): + """The IpGroups resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the IpGroups resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar ip_addresses: IpAddresses/IpAddressPrefixes in the IpGroups resource. + :vartype ip_addresses: list[str] + :ivar firewalls: List of references to Firewall resources that this IpGroups is associated + with. + :vartype firewalls: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar firewall_policies: List of references to Firewall Policies resources that this IpGroups + is associated with. + :vartype firewall_policies: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'firewalls': {'readonly': True}, + 'firewall_policies': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'ip_addresses': {'key': 'properties.ipAddresses', 'type': '[str]'}, + 'firewalls': {'key': 'properties.firewalls', 'type': '[SubResource]'}, + 'firewall_policies': {'key': 'properties.firewallPolicies', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + ip_addresses: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword ip_addresses: IpAddresses/IpAddressPrefixes in the IpGroups resource. + :paramtype ip_addresses: list[str] + """ + super(IpGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.provisioning_state = None + self.ip_addresses = ip_addresses + self.firewalls = None + self.firewall_policies = None + + +class IpGroupListResult(msrest.serialization.Model): + """Response for the ListIpGroups API service call. + + :ivar value: The list of IpGroups information resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.IpGroup] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IpGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["IpGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of IpGroups information resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.IpGroup] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(IpGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class IpsecPolicy(msrest.serialization.Model): + """An IPSec Policy configuration for a virtual network gateway connection. + + All required parameters must be populated in order to send to Azure. + + :ivar sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode or + Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + :vartype sa_life_time_seconds: int + :ivar sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + :vartype sa_data_size_kilobytes: int + :ivar ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible values + include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", + "GCMAES256". + :vartype ipsec_encryption: str or ~azure.mgmt.network.v2021_08_01.models.IpsecEncryption + :ivar ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values + include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". + :vartype ipsec_integrity: str or ~azure.mgmt.network.v2021_08_01.models.IpsecIntegrity + :ivar ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values + include: "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES256", "GCMAES128". + :vartype ike_encryption: str or ~azure.mgmt.network.v2021_08_01.models.IkeEncryption + :ivar ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values + include: "MD5", "SHA1", "SHA256", "SHA384", "GCMAES256", "GCMAES128". + :vartype ike_integrity: str or ~azure.mgmt.network.v2021_08_01.models.IkeIntegrity + :ivar dh_group: Required. The DH Group used in IKE Phase 1 for initial SA. Possible values + include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", + "DHGroup24". + :vartype dh_group: str or ~azure.mgmt.network.v2021_08_01.models.DhGroup + :ivar pfs_group: Required. The Pfs Group used in IKE Phase 2 for new child SA. Possible values + include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24", "PFS14", "PFSMM". + :vartype pfs_group: str or ~azure.mgmt.network.v2021_08_01.models.PfsGroup + """ + + _validation = { + 'sa_life_time_seconds': {'required': True}, + 'sa_data_size_kilobytes': {'required': True}, + 'ipsec_encryption': {'required': True}, + 'ipsec_integrity': {'required': True}, + 'ike_encryption': {'required': True}, + 'ike_integrity': {'required': True}, + 'dh_group': {'required': True}, + 'pfs_group': {'required': True}, + } + + _attribute_map = { + 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, + 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, + 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, + 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, + 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, + 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, + 'dh_group': {'key': 'dhGroup', 'type': 'str'}, + 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, + } + + def __init__( + self, + *, + sa_life_time_seconds: int, + sa_data_size_kilobytes: int, + ipsec_encryption: Union[str, "IpsecEncryption"], + ipsec_integrity: Union[str, "IpsecIntegrity"], + ike_encryption: Union[str, "IkeEncryption"], + ike_integrity: Union[str, "IkeIntegrity"], + dh_group: Union[str, "DhGroup"], + pfs_group: Union[str, "PfsGroup"], + **kwargs + ): + """ + :keyword sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + :paramtype sa_life_time_seconds: int + :keyword sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick + Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + :paramtype sa_data_size_kilobytes: int + :keyword ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible + values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", + "GCMAES256". + :paramtype ipsec_encryption: str or ~azure.mgmt.network.v2021_08_01.models.IpsecEncryption + :keyword ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible + values include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". + :paramtype ipsec_integrity: str or ~azure.mgmt.network.v2021_08_01.models.IpsecIntegrity + :keyword ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values + include: "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES256", "GCMAES128". + :paramtype ike_encryption: str or ~azure.mgmt.network.v2021_08_01.models.IkeEncryption + :keyword ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values + include: "MD5", "SHA1", "SHA256", "SHA384", "GCMAES256", "GCMAES128". + :paramtype ike_integrity: str or ~azure.mgmt.network.v2021_08_01.models.IkeIntegrity + :keyword dh_group: Required. The DH Group used in IKE Phase 1 for initial SA. Possible values + include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", + "DHGroup24". + :paramtype dh_group: str or ~azure.mgmt.network.v2021_08_01.models.DhGroup + :keyword pfs_group: Required. The Pfs Group used in IKE Phase 2 for new child SA. Possible + values include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24", "PFS14", + "PFSMM". + :paramtype pfs_group: str or ~azure.mgmt.network.v2021_08_01.models.PfsGroup + """ + super(IpsecPolicy, self).__init__(**kwargs) + self.sa_life_time_seconds = sa_life_time_seconds + self.sa_data_size_kilobytes = sa_data_size_kilobytes + self.ipsec_encryption = ipsec_encryption + self.ipsec_integrity = ipsec_integrity + self.ike_encryption = ike_encryption + self.ike_integrity = ike_integrity + self.dh_group = dh_group + self.pfs_group = pfs_group + + +class IpTag(msrest.serialization.Model): + """Contains the IpTag associated with the object. + + :ivar ip_tag_type: The IP tag type. Example: FirstPartyUsage. + :vartype ip_tag_type: str + :ivar tag: The value of the IP tag associated with the public IP. Example: SQL. + :vartype tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_tag_type: Optional[str] = None, + tag: Optional[str] = None, + **kwargs + ): + """ + :keyword ip_tag_type: The IP tag type. Example: FirstPartyUsage. + :paramtype ip_tag_type: str + :keyword tag: The value of the IP tag associated with the public IP. Example: SQL. + :paramtype tag: str + """ + super(IpTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag + + +class Ipv6CircuitConnectionConfig(msrest.serialization.Model): + """IPv6 Circuit Connection properties for global reach. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar address_prefix: /125 IP address space to carve out customer addresses for global reach. + :vartype address_prefix: str + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_08_01.models.CircuitConnectionStatus + """ + + _validation = { + 'circuit_connection_status': {'readonly': True}, + } + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'circuit_connection_status': {'key': 'circuitConnectionStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefix: Optional[str] = None, + **kwargs + ): + """ + :keyword address_prefix: /125 IP address space to carve out customer addresses for global + reach. + :paramtype address_prefix: str + """ + super(Ipv6CircuitConnectionConfig, self).__init__(**kwargs) + self.address_prefix = address_prefix + self.circuit_connection_status = None + + +class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): + """Contains IPv6 peering config. + + :ivar primary_peer_address_prefix: The primary address prefix. + :vartype primary_peer_address_prefix: str + :ivar secondary_peer_address_prefix: The secondary address prefix. + :vartype secondary_peer_address_prefix: str + :ivar microsoft_peering_config: The Microsoft peering configuration. + :vartype microsoft_peering_config: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringConfig + :ivar route_filter: The reference to the RouteFilter resource. + :vartype route_filter: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar state: The state of peering. Possible values include: "Disabled", "Enabled". + :vartype state: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringState + """ + + _attribute_map = { + 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, + 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'route_filter': {'key': 'routeFilter', 'type': 'SubResource'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + *, + primary_peer_address_prefix: Optional[str] = None, + secondary_peer_address_prefix: Optional[str] = None, + microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, + route_filter: Optional["SubResource"] = None, + state: Optional[Union[str, "ExpressRouteCircuitPeeringState"]] = None, + **kwargs + ): + """ + :keyword primary_peer_address_prefix: The primary address prefix. + :paramtype primary_peer_address_prefix: str + :keyword secondary_peer_address_prefix: The secondary address prefix. + :paramtype secondary_peer_address_prefix: str + :keyword microsoft_peering_config: The Microsoft peering configuration. + :paramtype microsoft_peering_config: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringConfig + :keyword route_filter: The reference to the RouteFilter resource. + :paramtype route_filter: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword state: The state of peering. Possible values include: "Disabled", "Enabled". + :paramtype state: str or ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringState + """ + super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) + self.primary_peer_address_prefix = primary_peer_address_prefix + self.secondary_peer_address_prefix = secondary_peer_address_prefix + self.microsoft_peering_config = microsoft_peering_config + self.route_filter = route_filter + self.state = state + + +class ListHubRouteTablesResult(msrest.serialization.Model): + """List of RouteTables and a URL nextLink to get the next set of results. + + :ivar value: List of RouteTables. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.HubRouteTable] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubRouteTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["HubRouteTable"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of RouteTables. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.HubRouteTable] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListHubRouteTablesResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListHubVirtualNetworkConnectionsResult(msrest.serialization.Model): + """List of HubVirtualNetworkConnections and a URL nextLink to get the next set of results. + + :ivar value: List of HubVirtualNetworkConnections. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.HubVirtualNetworkConnection] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubVirtualNetworkConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["HubVirtualNetworkConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of HubVirtualNetworkConnections. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.HubVirtualNetworkConnection] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListHubVirtualNetworkConnectionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListP2SVpnGatewaysResult(msrest.serialization.Model): + """Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set of results. + + :ivar value: List of P2SVpnGateways. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[P2SVpnGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["P2SVpnGateway"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of P2SVpnGateways. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListP2SVpnGatewaysResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListRoutingIntentResult(msrest.serialization.Model): + """List of the routing intent result and a URL nextLink to get the next set of results. + + :ivar value: List of RoutingIntent resource. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.RoutingIntent] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoutingIntent]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RoutingIntent"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of RoutingIntent resource. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.RoutingIntent] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListRoutingIntentResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualHubBgpConnectionResults(msrest.serialization.Model): + """VirtualHubBgpConnections list. + + :ivar value: The list of VirtualHubBgpConnections. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.BgpConnection] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BgpConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of VirtualHubBgpConnections. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.BgpConnection] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(ListVirtualHubBgpConnectionResults, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualHubIpConfigurationResults(msrest.serialization.Model): + """VirtualHubIpConfigurations list. + + :ivar value: The list of VirtualHubIpConfigurations. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.HubIpConfiguration] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubIpConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["HubIpConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list of VirtualHubIpConfigurations. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.HubIpConfiguration] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(ListVirtualHubIpConfigurationResults, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualHubRouteTableV2SResult(msrest.serialization.Model): + """List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. + + :ivar value: List of VirtualHubRouteTableV2s. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHubRouteTableV2]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualHubRouteTableV2"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VirtualHubRouteTableV2s. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVirtualHubRouteTableV2SResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualHubsResult(msrest.serialization.Model): + """Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results. + + :ivar value: List of VirtualHubs. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualHub] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHub]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualHub"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VirtualHubs. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualHub] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVirtualHubsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualNetworkGatewayNatRulesResult(msrest.serialization.Model): + """Result of the request to list all nat rules to a virtual network gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. + + :ivar value: List of Nat Rules. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkGatewayNatRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Nat Rules. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVirtualNetworkGatewayNatRulesResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualWANsResult(msrest.serialization.Model): + """Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of results. + + :ivar value: List of VirtualWANs. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualWAN] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualWAN]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualWAN"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VirtualWANs. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualWAN] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVirtualWANsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnConnectionsResult(msrest.serialization.Model): + """Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. + + :ivar value: List of Vpn Connections. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnConnection] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Vpn Connections. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VpnConnection] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVpnConnectionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnGatewayNatRulesResult(msrest.serialization.Model): + """Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. + + :ivar value: List of Nat Rules. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnGatewayNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnGatewayNatRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Nat Rules. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVpnGatewayNatRulesResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnGatewaysResult(msrest.serialization.Model): + """Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of results. + + :ivar value: List of VpnGateways. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnGateway] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnGateway"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VpnGateways. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VpnGateway] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVpnGatewaysResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnServerConfigurationPolicyGroupsResult(msrest.serialization.Model): + """Result of the request to list VpnServerConfigurationPolicyGroups. It contains a list of VpnServerConfigurationPolicyGroups and a URL nextLink to get the next set of results. + + :ivar value: List of VpnServerConfigurationPolicyGroups. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnServerConfigurationPolicyGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnServerConfigurationPolicyGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VpnServerConfigurationPolicyGroups. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVpnServerConfigurationPolicyGroupsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnServerConfigurationsResult(msrest.serialization.Model): + """Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink to get the next set of results. + + :ivar value: List of VpnServerConfigurations. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnServerConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnServerConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VpnServerConfigurations. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVpnServerConfigurationsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnSiteLinkConnectionsResult(msrest.serialization.Model): + """Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. + + :ivar value: List of VpnSiteLinkConnections. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnSiteLinkConnection] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSiteLinkConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnSiteLinkConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VpnSiteLinkConnections. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VpnSiteLinkConnection] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVpnSiteLinkConnectionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnSiteLinksResult(msrest.serialization.Model): + """Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink to get the next set of results. + + :ivar value: List of VpnSitesLinks. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnSiteLink] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSiteLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnSiteLink"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VpnSitesLinks. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VpnSiteLink] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVpnSiteLinksResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnSitesResult(msrest.serialization.Model): + """Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. + + :ivar value: List of VpnSites. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnSite] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSite]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnSite"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VpnSites. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VpnSite] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(ListVpnSitesResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class LoadBalancer(Resource): + """LoadBalancer resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of the load balancer. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar sku: The load balancer SKU. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.LoadBalancerSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar frontend_ip_configurations: Object representing the frontend IPs to be used for the load + balancer. + :vartype frontend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration] + :ivar backend_address_pools: Collection of backend address pools used by a load balancer. + :vartype backend_address_pools: list[~azure.mgmt.network.v2021_08_01.models.BackendAddressPool] + :ivar load_balancing_rules: Object collection representing the load balancing rules Gets the + provisioning. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_08_01.models.LoadBalancingRule] + :ivar probes: Collection of probe objects used in the load balancer. + :vartype probes: list[~azure.mgmt.network.v2021_08_01.models.Probe] + :ivar inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining + inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT + pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are + associated with individual virtual machines cannot reference an Inbound NAT pool. They have to + reference individual inbound NAT rules. + :vartype inbound_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.InboundNatRule] + :ivar inbound_nat_pools: Defines an external port range for inbound NAT to a single backend + port on NICs associated with a load balancer. Inbound NAT rules are created automatically for + each NIC associated with the Load Balancer using an external port from this range. Defining an + Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. + Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with + individual virtual machines cannot reference an inbound NAT pool. They have to reference + individual inbound NAT rules. + :vartype inbound_nat_pools: list[~azure.mgmt.network.v2021_08_01.models.InboundNatPool] + :ivar outbound_rules: The outbound rules. + :vartype outbound_rules: list[~azure.mgmt.network.v2021_08_01.models.OutboundRule] + :ivar resource_guid: The resource GUID property of the load balancer resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the load balancer resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, + 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, + 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[OutboundRule]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + sku: Optional["LoadBalancerSku"] = None, + frontend_ip_configurations: Optional[List["FrontendIPConfiguration"]] = None, + backend_address_pools: Optional[List["BackendAddressPool"]] = None, + load_balancing_rules: Optional[List["LoadBalancingRule"]] = None, + probes: Optional[List["Probe"]] = None, + inbound_nat_rules: Optional[List["InboundNatRule"]] = None, + inbound_nat_pools: Optional[List["InboundNatPool"]] = None, + outbound_rules: Optional[List["OutboundRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of the load balancer. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword sku: The load balancer SKU. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.LoadBalancerSku + :keyword frontend_ip_configurations: Object representing the frontend IPs to be used for the + load balancer. + :paramtype frontend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration] + :keyword backend_address_pools: Collection of backend address pools used by a load balancer. + :paramtype backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.BackendAddressPool] + :keyword load_balancing_rules: Object collection representing the load balancing rules Gets the + provisioning. + :paramtype load_balancing_rules: list[~azure.mgmt.network.v2021_08_01.models.LoadBalancingRule] + :keyword probes: Collection of probe objects used in the load balancer. + :paramtype probes: list[~azure.mgmt.network.v2021_08_01.models.Probe] + :keyword inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining + inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT + pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are + associated with individual virtual machines cannot reference an Inbound NAT pool. They have to + reference individual inbound NAT rules. + :paramtype inbound_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.InboundNatRule] + :keyword inbound_nat_pools: Defines an external port range for inbound NAT to a single backend + port on NICs associated with a load balancer. Inbound NAT rules are created automatically for + each NIC associated with the Load Balancer using an external port from this range. Defining an + Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. + Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with + individual virtual machines cannot reference an inbound NAT pool. They have to reference + individual inbound NAT rules. + :paramtype inbound_nat_pools: list[~azure.mgmt.network.v2021_08_01.models.InboundNatPool] + :keyword outbound_rules: The outbound rules. + :paramtype outbound_rules: list[~azure.mgmt.network.v2021_08_01.models.OutboundRule] + """ + super(LoadBalancer, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.sku = sku + self.etag = None + self.frontend_ip_configurations = frontend_ip_configurations + self.backend_address_pools = backend_address_pools + self.load_balancing_rules = load_balancing_rules + self.probes = probes + self.inbound_nat_rules = inbound_nat_rules + self.inbound_nat_pools = inbound_nat_pools + self.outbound_rules = outbound_rules + self.resource_guid = None + self.provisioning_state = None + + +class LoadBalancerBackendAddress(msrest.serialization.Model): + """Load balancer backend addresses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the backend address. + :vartype name: str + :ivar virtual_network: Reference to an existing virtual network. + :vartype virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar subnet: Reference to an existing subnet. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar ip_address: IP Address belonging to the referenced virtual network. + :vartype ip_address: str + :ivar network_interface_ip_configuration: Reference to IP address defined in network + interfaces. + :vartype network_interface_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar load_balancer_frontend_ip_configuration: Reference to the frontend ip address + configuration defined in regional loadbalancer. + :vartype load_balancer_frontend_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar inbound_nat_rules_port_mapping: Collection of inbound NAT rule port mappings. + :vartype inbound_nat_rules_port_mapping: + list[~azure.mgmt.network.v2021_08_01.models.NatRulePortMapping] + :ivar admin_state: A list of administrative states which once set can override health probe so + that Load Balancer will always forward new connections to backend, or deny new connections and + reset existing connections. Possible values include: "None", "Up", "Down", "Drain". + :vartype admin_state: str or + ~azure.mgmt.network.v2021_08_01.models.LoadBalancerBackendAddressAdminState + """ + + _validation = { + 'network_interface_ip_configuration': {'readonly': True}, + 'inbound_nat_rules_port_mapping': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'network_interface_ip_configuration': {'key': 'properties.networkInterfaceIPConfiguration', 'type': 'SubResource'}, + 'load_balancer_frontend_ip_configuration': {'key': 'properties.loadBalancerFrontendIPConfiguration', 'type': 'SubResource'}, + 'inbound_nat_rules_port_mapping': {'key': 'properties.inboundNatRulesPortMapping', 'type': '[NatRulePortMapping]'}, + 'admin_state': {'key': 'properties.adminState', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + virtual_network: Optional["SubResource"] = None, + subnet: Optional["SubResource"] = None, + ip_address: Optional[str] = None, + load_balancer_frontend_ip_configuration: Optional["SubResource"] = None, + admin_state: Optional[Union[str, "LoadBalancerBackendAddressAdminState"]] = None, + **kwargs + ): + """ + :keyword name: Name of the backend address. + :paramtype name: str + :keyword virtual_network: Reference to an existing virtual network. + :paramtype virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword subnet: Reference to an existing subnet. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword ip_address: IP Address belonging to the referenced virtual network. + :paramtype ip_address: str + :keyword load_balancer_frontend_ip_configuration: Reference to the frontend ip address + configuration defined in regional loadbalancer. + :paramtype load_balancer_frontend_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword admin_state: A list of administrative states which once set can override health probe + so that Load Balancer will always forward new connections to backend, or deny new connections + and reset existing connections. Possible values include: "None", "Up", "Down", "Drain". + :paramtype admin_state: str or + ~azure.mgmt.network.v2021_08_01.models.LoadBalancerBackendAddressAdminState + """ + super(LoadBalancerBackendAddress, self).__init__(**kwargs) + self.name = name + self.virtual_network = virtual_network + self.subnet = subnet + self.ip_address = ip_address + self.network_interface_ip_configuration = None + self.load_balancer_frontend_ip_configuration = load_balancer_frontend_ip_configuration + self.inbound_nat_rules_port_mapping = None + self.admin_state = admin_state + + +class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): + """Response for ListBackendAddressPool API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of backend address pools in a load balancer. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.BackendAddressPool] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BackendAddressPool"]] = None, + **kwargs + ): + """ + :keyword value: A list of backend address pools in a load balancer. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.BackendAddressPool] + """ + super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): + """Response for ListFrontendIPConfiguration API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of frontend IP configurations in a load balancer. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["FrontendIPConfiguration"]] = None, + **kwargs + ): + """ + :keyword value: A list of frontend IP configurations in a load balancer. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration] + """ + super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerListResult(msrest.serialization.Model): + """Response for ListLoadBalancers API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of load balancers in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.LoadBalancer] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancer]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LoadBalancer"]] = None, + **kwargs + ): + """ + :keyword value: A list of load balancers in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.LoadBalancer] + """ + super(LoadBalancerListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): + """Response for ListLoadBalancingRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of load balancing rules in a load balancer. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.LoadBalancingRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LoadBalancingRule"]] = None, + **kwargs + ): + """ + :keyword value: A list of load balancing rules in a load balancer. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.LoadBalancingRule] + """ + super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerOutboundRuleListResult(msrest.serialization.Model): + """Response for ListOutboundRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of outbound rules in a load balancer. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.OutboundRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["OutboundRule"]] = None, + **kwargs + ): + """ + :keyword value: A list of outbound rules in a load balancer. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.OutboundRule] + """ + super(LoadBalancerOutboundRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerProbeListResult(msrest.serialization.Model): + """Response for ListProbe API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of probes in a load balancer. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.Probe] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Probe]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Probe"]] = None, + **kwargs + ): + """ + :keyword value: A list of probes in a load balancer. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.Probe] + """ + super(LoadBalancerProbeListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerSku(msrest.serialization.Model): + """SKU of a load balancer. + + :ivar name: Name of a load balancer SKU. Possible values include: "Basic", "Standard", + "Gateway". + :vartype name: str or ~azure.mgmt.network.v2021_08_01.models.LoadBalancerSkuName + :ivar tier: Tier of a load balancer SKU. Possible values include: "Regional", "Global". + :vartype tier: str or ~azure.mgmt.network.v2021_08_01.models.LoadBalancerSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "LoadBalancerSkuName"]] = None, + tier: Optional[Union[str, "LoadBalancerSkuTier"]] = None, + **kwargs + ): + """ + :keyword name: Name of a load balancer SKU. Possible values include: "Basic", "Standard", + "Gateway". + :paramtype name: str or ~azure.mgmt.network.v2021_08_01.models.LoadBalancerSkuName + :keyword tier: Tier of a load balancer SKU. Possible values include: "Regional", "Global". + :paramtype tier: str or ~azure.mgmt.network.v2021_08_01.models.LoadBalancerSkuTier + """ + super(LoadBalancerSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class LoadBalancerVipSwapRequest(msrest.serialization.Model): + """The request for a VIP swap. + + :ivar frontend_ip_configurations: A list of frontend IP configuration resources that should + swap VIPs. + :vartype frontend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.LoadBalancerVipSwapRequestFrontendIPConfiguration] + """ + + _attribute_map = { + 'frontend_ip_configurations': {'key': 'frontendIPConfigurations', 'type': '[LoadBalancerVipSwapRequestFrontendIPConfiguration]'}, + } + + def __init__( + self, + *, + frontend_ip_configurations: Optional[List["LoadBalancerVipSwapRequestFrontendIPConfiguration"]] = None, + **kwargs + ): + """ + :keyword frontend_ip_configurations: A list of frontend IP configuration resources that should + swap VIPs. + :paramtype frontend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.LoadBalancerVipSwapRequestFrontendIPConfiguration] + """ + super(LoadBalancerVipSwapRequest, self).__init__(**kwargs) + self.frontend_ip_configurations = frontend_ip_configurations + + +class LoadBalancerVipSwapRequestFrontendIPConfiguration(msrest.serialization.Model): + """VIP swap request's frontend IP configuration object. + + :ivar id: The ID of frontend IP configuration resource. + :vartype id: str + :ivar public_ip_address: A reference to public IP address resource. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + public_ip_address: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: The ID of frontend IP configuration resource. + :paramtype id: str + :keyword public_ip_address: A reference to public IP address resource. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(LoadBalancerVipSwapRequestFrontendIPConfiguration, self).__init__(**kwargs) + self.id = id + self.public_ip_address = public_ip_address + + +class LoadBalancingRule(SubResource): + """A load balancing rule for a load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the set of load balancing rules used + by the load balancer. This name can be used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar frontend_ip_configuration: A reference to frontend IP addresses. + :vartype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load + balanced across IPs in the backend IPs. + :vartype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar backend_address_pools: An array of references to pool of DIPs. + :vartype backend_address_pools: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar probe: The reference to the load balancer probe used by the load balancing rule. + :vartype probe: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar protocol: The reference to the transport protocol used by the load balancing rule. + Possible values include: "Udp", "Tcp", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.TransportProtocol + :ivar load_distribution: The load distribution policy for this rule. Possible values include: + "Default", "SourceIP", "SourceIPProtocol". + :vartype load_distribution: str or ~azure.mgmt.network.v2021_08_01.models.LoadDistribution + :ivar frontend_port: The port for the external endpoint. Port numbers for each rule must be + unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 + enables "Any Port". + :vartype frontend_port: int + :ivar backend_port: The port used for internal connections on the endpoint. Acceptable values + are between 0 and 65535. Note that value 0 enables "Any Port". + :vartype backend_port: int + :ivar idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :vartype idle_timeout_in_minutes: int + :ivar enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :vartype enable_floating_ip: bool + :ivar enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :vartype enable_tcp_reset: bool + :ivar disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the + publicIP address specified in the frontend of the load balancing rule. + :vartype disable_outbound_snat: bool + :ivar provisioning_state: The provisioning state of the load balancing rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[SubResource]'}, + 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_address_pools: Optional[List["SubResource"]] = None, + probe: Optional["SubResource"] = None, + protocol: Optional[Union[str, "TransportProtocol"]] = None, + load_distribution: Optional[Union[str, "LoadDistribution"]] = None, + frontend_port: Optional[int] = None, + backend_port: Optional[int] = None, + idle_timeout_in_minutes: Optional[int] = None, + enable_floating_ip: Optional[bool] = None, + enable_tcp_reset: Optional[bool] = None, + disable_outbound_snat: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the set of load balancing rules + used by the load balancer. This name can be used to access the resource. + :paramtype name: str + :keyword frontend_ip_configuration: A reference to frontend IP addresses. + :paramtype frontend_ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load + balanced across IPs in the backend IPs. + :paramtype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword backend_address_pools: An array of references to pool of DIPs. + :paramtype backend_address_pools: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword probe: The reference to the load balancer probe used by the load balancing rule. + :paramtype probe: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword protocol: The reference to the transport protocol used by the load balancing rule. + Possible values include: "Udp", "Tcp", "All". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.TransportProtocol + :keyword load_distribution: The load distribution policy for this rule. Possible values + include: "Default", "SourceIP", "SourceIPProtocol". + :paramtype load_distribution: str or ~azure.mgmt.network.v2021_08_01.models.LoadDistribution + :keyword frontend_port: The port for the external endpoint. Port numbers for each rule must be + unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 + enables "Any Port". + :paramtype frontend_port: int + :keyword backend_port: The port used for internal connections on the endpoint. Acceptable + values are between 0 and 65535. Note that value 0 enables "Any Port". + :paramtype backend_port: int + :keyword idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :paramtype idle_timeout_in_minutes: int + :keyword enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :paramtype enable_floating_ip: bool + :keyword enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or + unexpected connection termination. This element is only used when the protocol is set to TCP. + :paramtype enable_tcp_reset: bool + :keyword disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the + publicIP address specified in the frontend of the load balancing rule. + :paramtype disable_outbound_snat: bool + """ + super(LoadBalancingRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.backend_address_pool = backend_address_pool + self.backend_address_pools = backend_address_pools + self.probe = probe + self.protocol = protocol + self.load_distribution = load_distribution + self.frontend_port = frontend_port + self.backend_port = backend_port + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_floating_ip = enable_floating_ip + self.enable_tcp_reset = enable_tcp_reset + self.disable_outbound_snat = disable_outbound_snat + self.provisioning_state = None + + +class LocalNetworkGateway(Resource): + """A common class for general resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar local_network_address_space: Local network site address space. + :vartype local_network_address_space: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :ivar gateway_ip_address: IP address of local network gateway. + :vartype gateway_ip_address: str + :ivar fqdn: FQDN of local network gateway. + :vartype fqdn: str + :ivar bgp_settings: Local network gateway's BGP speaker settings. + :vartype bgp_settings: ~azure.mgmt.network.v2021_08_01.models.BgpSettings + :ivar resource_guid: The resource GUID property of the local network gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the local network gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, + 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + local_network_address_space: Optional["AddressSpace"] = None, + gateway_ip_address: Optional[str] = None, + fqdn: Optional[str] = None, + bgp_settings: Optional["BgpSettings"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword local_network_address_space: Local network site address space. + :paramtype local_network_address_space: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :keyword gateway_ip_address: IP address of local network gateway. + :paramtype gateway_ip_address: str + :keyword fqdn: FQDN of local network gateway. + :paramtype fqdn: str + :keyword bgp_settings: Local network gateway's BGP speaker settings. + :paramtype bgp_settings: ~azure.mgmt.network.v2021_08_01.models.BgpSettings + """ + super(LocalNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.local_network_address_space = local_network_address_space + self.gateway_ip_address = gateway_ip_address + self.fqdn = fqdn + self.bgp_settings = bgp_settings + self.resource_guid = None + self.provisioning_state = None + + +class LocalNetworkGatewayListResult(msrest.serialization.Model): + """Response for ListLocalNetworkGateways API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of local network gateways that exists in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LocalNetworkGateway"]] = None, + **kwargs + ): + """ + :keyword value: A list of local network gateways that exists in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway] + """ + super(LocalNetworkGatewayListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LogSpecification(msrest.serialization.Model): + """Description of logging specification. + + :ivar name: The name of the specification. + :vartype name: str + :ivar display_name: The display name of the specification. + :vartype display_name: str + :ivar blob_duration: Duration of the blob. + :vartype blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the specification. + :paramtype name: str + :keyword display_name: The display name of the specification. + :paramtype display_name: str + :keyword blob_duration: Duration of the blob. + :paramtype blob_duration: str + """ + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class ManagedRuleGroupOverride(msrest.serialization.Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_group_name: Required. The managed rule group to override. + :vartype rule_group_name: str + :ivar rules: List of rules that will be disabled. If none specified, all rules in the group + will be disabled. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.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: Optional[List["ManagedRuleOverride"]] = None, + **kwargs + ): + """ + :keyword rule_group_name: Required. The managed rule group to override. + :paramtype rule_group_name: str + :keyword rules: List of rules that will be disabled. If none specified, all rules in the group + will be disabled. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.ManagedRuleOverride] + """ + super(ManagedRuleGroupOverride, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.rules = rules + + +class ManagedRuleOverride(msrest.serialization.Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_id: Required. Identifier for the managed rule. + :vartype rule_id: str + :ivar state: The state of the managed rule. Defaults to Disabled if not specified. Possible + values include: "Disabled". + :vartype state: str or ~azure.mgmt.network.v2021_08_01.models.ManagedRuleEnabledState + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + *, + rule_id: str, + state: Optional[Union[str, "ManagedRuleEnabledState"]] = None, + **kwargs + ): + """ + :keyword rule_id: Required. Identifier for the managed rule. + :paramtype rule_id: str + :keyword state: The state of the managed rule. Defaults to Disabled if not specified. Possible + values include: "Disabled". + :paramtype state: str or ~azure.mgmt.network.v2021_08_01.models.ManagedRuleEnabledState + """ + super(ManagedRuleOverride, self).__init__(**kwargs) + self.rule_id = rule_id + self.state = state + + +class ManagedRulesDefinition(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :ivar exclusions: The Exclusions that are applied on the policy. + :vartype exclusions: list[~azure.mgmt.network.v2021_08_01.models.OwaspCrsExclusionEntry] + :ivar managed_rule_sets: Required. The managed rule sets that are associated with the policy. + :vartype managed_rule_sets: list[~azure.mgmt.network.v2021_08_01.models.ManagedRuleSet] + """ + + _validation = { + 'managed_rule_sets': {'required': True}, + } + + _attribute_map = { + 'exclusions': {'key': 'exclusions', 'type': '[OwaspCrsExclusionEntry]'}, + 'managed_rule_sets': {'key': 'managedRuleSets', 'type': '[ManagedRuleSet]'}, + } + + def __init__( + self, + *, + managed_rule_sets: List["ManagedRuleSet"], + exclusions: Optional[List["OwaspCrsExclusionEntry"]] = None, + **kwargs + ): + """ + :keyword exclusions: The Exclusions that are applied on the policy. + :paramtype exclusions: list[~azure.mgmt.network.v2021_08_01.models.OwaspCrsExclusionEntry] + :keyword managed_rule_sets: Required. The managed rule sets that are associated with the + policy. + :paramtype managed_rule_sets: list[~azure.mgmt.network.v2021_08_01.models.ManagedRuleSet] + """ + super(ManagedRulesDefinition, self).__init__(**kwargs) + self.exclusions = exclusions + self.managed_rule_sets = managed_rule_sets + + +class ManagedRuleSet(msrest.serialization.Model): + """Defines a managed rule set. + + All required parameters must be populated in order to send to Azure. + + :ivar rule_set_type: Required. Defines the rule set type to use. + :vartype rule_set_type: str + :ivar rule_set_version: Required. Defines the version of the rule set to use. + :vartype rule_set_version: str + :ivar rule_group_overrides: Defines the rule group overrides to apply to the rule set. + :vartype rule_group_overrides: + list[~azure.mgmt.network.v2021_08_01.models.ManagedRuleGroupOverride] + """ + + _validation = { + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + } + + _attribute_map = { + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, + } + + def __init__( + self, + *, + rule_set_type: str, + rule_set_version: str, + rule_group_overrides: Optional[List["ManagedRuleGroupOverride"]] = None, + **kwargs + ): + """ + :keyword rule_set_type: Required. Defines the rule set type to use. + :paramtype rule_set_type: str + :keyword rule_set_version: Required. Defines the version of the rule set to use. + :paramtype rule_set_version: str + :keyword rule_group_overrides: Defines the rule group overrides to apply to the rule set. + :paramtype rule_group_overrides: + list[~azure.mgmt.network.v2021_08_01.models.ManagedRuleGroupOverride] + """ + super(ManagedRuleSet, self).__init__(**kwargs) + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.rule_group_overrides = rule_group_overrides + + +class ManagedServiceIdentity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity. This property will only + be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' + includes both an implicitly created identity and a set of user assigned identities. The type + 'None' will remove any identities from the virtual machine. Possible values include: + "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.ResourceIdentityType + :ivar user_assigned_identities: The list of user identities associated with resource. The user + identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.network.v2021_08_01.models.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): + """ + :keyword type: The type of identity used for the resource. The type 'SystemAssigned, + UserAssigned' includes both an implicitly created identity and a set of user assigned + identities. The type 'None' will remove any identities from the virtual machine. Possible + values include: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None". + :paramtype type: str or ~azure.mgmt.network.v2021_08_01.models.ResourceIdentityType + :keyword user_assigned_identities: The list of user identities associated with resource. The + user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :paramtype user_assigned_identities: dict[str, + ~azure.mgmt.network.v2021_08_01.models.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class MatchCondition(msrest.serialization.Model): + """Define match conditions. + + All required parameters must be populated in order to send to Azure. + + :ivar match_variables: Required. List of match variables. + :vartype match_variables: list[~azure.mgmt.network.v2021_08_01.models.MatchVariable] + :ivar operator: Required. The operator to be matched. Possible values include: "IPMatch", + "Equal", "Contains", "LessThan", "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", + "BeginsWith", "EndsWith", "Regex", "GeoMatch". + :vartype operator: str or ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallOperator + :ivar negation_conditon: Whether this is negate condition or not. + :vartype negation_conditon: bool + :ivar match_values: Required. Match value. + :vartype match_values: list[str] + :ivar transforms: List of transforms. + :vartype transforms: list[str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallTransform] + """ + + _validation = { + 'match_variables': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'match_variables': {'key': 'matchVariables', 'type': '[MatchVariable]'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negation_conditon': {'key': 'negationConditon', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + def __init__( + self, + *, + match_variables: List["MatchVariable"], + operator: Union[str, "WebApplicationFirewallOperator"], + match_values: List[str], + negation_conditon: Optional[bool] = None, + transforms: Optional[List[Union[str, "WebApplicationFirewallTransform"]]] = None, + **kwargs + ): + """ + :keyword match_variables: Required. List of match variables. + :paramtype match_variables: list[~azure.mgmt.network.v2021_08_01.models.MatchVariable] + :keyword operator: Required. The operator to be matched. Possible values include: "IPMatch", + "Equal", "Contains", "LessThan", "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", + "BeginsWith", "EndsWith", "Regex", "GeoMatch". + :paramtype operator: str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallOperator + :keyword negation_conditon: Whether this is negate condition or not. + :paramtype negation_conditon: bool + :keyword match_values: Required. Match value. + :paramtype match_values: list[str] + :keyword transforms: List of transforms. + :paramtype transforms: list[str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallTransform] + """ + super(MatchCondition, self).__init__(**kwargs) + self.match_variables = match_variables + self.operator = operator + self.negation_conditon = negation_conditon + self.match_values = match_values + self.transforms = transforms + + +class MatchedRule(msrest.serialization.Model): + """Matched rule. + + :ivar rule_name: Name of the matched network security rule. + :vartype rule_name: str + :ivar action: The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. + :vartype action: str + """ + + _attribute_map = { + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + *, + rule_name: Optional[str] = None, + action: Optional[str] = None, + **kwargs + ): + """ + :keyword rule_name: Name of the matched network security rule. + :paramtype rule_name: str + :keyword action: The network traffic is allowed or denied. Possible values are 'Allow' and + 'Deny'. + :paramtype action: str + """ + super(MatchedRule, self).__init__(**kwargs) + self.rule_name = rule_name + self.action = action + + +class MatchVariable(msrest.serialization.Model): + """Define match variables. + + All required parameters must be populated in order to send to Azure. + + :ivar variable_name: Required. Match Variable. Possible values include: "RemoteAddr", + "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeaders", "RequestBody", + "RequestCookies". + :vartype variable_name: str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallMatchVariable + :ivar selector: The selector of match variable. + :vartype selector: str + """ + + _validation = { + 'variable_name': {'required': True}, + } + + _attribute_map = { + 'variable_name': {'key': 'variableName', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + } + + def __init__( + self, + *, + variable_name: Union[str, "WebApplicationFirewallMatchVariable"], + selector: Optional[str] = None, + **kwargs + ): + """ + :keyword variable_name: Required. Match Variable. Possible values include: "RemoteAddr", + "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeaders", "RequestBody", + "RequestCookies". + :paramtype variable_name: str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallMatchVariable + :keyword selector: The selector of match variable. + :paramtype selector: str + """ + super(MatchVariable, self).__init__(**kwargs) + self.variable_name = variable_name + self.selector = selector + + +class MetricSpecification(msrest.serialization.Model): + """Description of metrics specification. + + :ivar name: The name of the metric. + :vartype name: str + :ivar display_name: The display name of the metric. + :vartype display_name: str + :ivar display_description: The description of the metric. + :vartype display_description: str + :ivar unit: Units the metric to be displayed in. + :vartype unit: str + :ivar aggregation_type: The aggregation type. + :vartype aggregation_type: str + :ivar availabilities: List of availability. + :vartype availabilities: list[~azure.mgmt.network.v2021_08_01.models.Availability] + :ivar enable_regional_mdm_account: Whether regional MDM account enabled. + :vartype enable_regional_mdm_account: bool + :ivar fill_gap_with_zero: Whether gaps would be filled with zeros. + :vartype fill_gap_with_zero: bool + :ivar metric_filter_pattern: Pattern for the filter of the metric. + :vartype metric_filter_pattern: str + :ivar dimensions: List of dimensions. + :vartype dimensions: list[~azure.mgmt.network.v2021_08_01.models.Dimension] + :ivar is_internal: Whether the metric is internal. + :vartype is_internal: bool + :ivar source_mdm_account: The source MDM account. + :vartype source_mdm_account: str + :ivar source_mdm_namespace: The source MDM namespace. + :vartype source_mdm_namespace: str + :ivar resource_id_dimension_name_override: The resource Id dimension name override. + :vartype resource_id_dimension_name_override: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'availabilities': {'key': 'availabilities', 'type': '[Availability]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'is_internal': {'key': 'isInternal', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + availabilities: Optional[List["Availability"]] = None, + enable_regional_mdm_account: Optional[bool] = None, + fill_gap_with_zero: Optional[bool] = None, + metric_filter_pattern: Optional[str] = None, + dimensions: Optional[List["Dimension"]] = None, + is_internal: Optional[bool] = None, + source_mdm_account: Optional[str] = None, + source_mdm_namespace: Optional[str] = None, + resource_id_dimension_name_override: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the metric. + :paramtype name: str + :keyword display_name: The display name of the metric. + :paramtype display_name: str + :keyword display_description: The description of the metric. + :paramtype display_description: str + :keyword unit: Units the metric to be displayed in. + :paramtype unit: str + :keyword aggregation_type: The aggregation type. + :paramtype aggregation_type: str + :keyword availabilities: List of availability. + :paramtype availabilities: list[~azure.mgmt.network.v2021_08_01.models.Availability] + :keyword enable_regional_mdm_account: Whether regional MDM account enabled. + :paramtype enable_regional_mdm_account: bool + :keyword fill_gap_with_zero: Whether gaps would be filled with zeros. + :paramtype fill_gap_with_zero: bool + :keyword metric_filter_pattern: Pattern for the filter of the metric. + :paramtype metric_filter_pattern: str + :keyword dimensions: List of dimensions. + :paramtype dimensions: list[~azure.mgmt.network.v2021_08_01.models.Dimension] + :keyword is_internal: Whether the metric is internal. + :paramtype is_internal: bool + :keyword source_mdm_account: The source MDM account. + :paramtype source_mdm_account: str + :keyword source_mdm_namespace: The source MDM namespace. + :paramtype source_mdm_namespace: str + :keyword resource_id_dimension_name_override: The resource Id dimension name override. + :paramtype resource_id_dimension_name_override: str + """ + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.availabilities = availabilities + self.enable_regional_mdm_account = enable_regional_mdm_account + self.fill_gap_with_zero = fill_gap_with_zero + self.metric_filter_pattern = metric_filter_pattern + self.dimensions = dimensions + self.is_internal = is_internal + self.source_mdm_account = source_mdm_account + self.source_mdm_namespace = source_mdm_namespace + self.resource_id_dimension_name_override = resource_id_dimension_name_override + + +class NatGateway(Resource): + """Nat Gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar sku: The nat gateway SKU. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.NatGatewaySku + :ivar zones: A list of availability zones denoting the zone in which Nat Gateway should be + deployed. + :vartype zones: list[str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar idle_timeout_in_minutes: The idle timeout of the nat gateway. + :vartype idle_timeout_in_minutes: int + :ivar public_ip_addresses: An array of public ip addresses associated with the nat gateway + resource. + :vartype public_ip_addresses: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar public_ip_prefixes: An array of public ip prefixes associated with the nat gateway + resource. + :vartype public_ip_prefixes: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar subnets: An array of references to the subnets using this nat gateway resource. + :vartype subnets: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar resource_guid: The resource GUID property of the NAT gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the NAT gateway resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnets': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'NatGatewaySku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'public_ip_addresses': {'key': 'properties.publicIpAddresses', 'type': '[SubResource]'}, + 'public_ip_prefixes': {'key': 'properties.publicIpPrefixes', 'type': '[SubResource]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[SubResource]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["NatGatewaySku"] = None, + zones: Optional[List[str]] = None, + idle_timeout_in_minutes: Optional[int] = None, + public_ip_addresses: Optional[List["SubResource"]] = None, + public_ip_prefixes: Optional[List["SubResource"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword sku: The nat gateway SKU. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.NatGatewaySku + :keyword zones: A list of availability zones denoting the zone in which Nat Gateway should be + deployed. + :paramtype zones: list[str] + :keyword idle_timeout_in_minutes: The idle timeout of the nat gateway. + :paramtype idle_timeout_in_minutes: int + :keyword public_ip_addresses: An array of public ip addresses associated with the nat gateway + resource. + :paramtype public_ip_addresses: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword public_ip_prefixes: An array of public ip prefixes associated with the nat gateway + resource. + :paramtype public_ip_prefixes: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + super(NatGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.sku = sku + self.zones = zones + self.etag = None + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.public_ip_addresses = public_ip_addresses + self.public_ip_prefixes = public_ip_prefixes + self.subnets = None + self.resource_guid = None + self.provisioning_state = None + + +class NatGatewayListResult(msrest.serialization.Model): + """Response for ListNatGateways API service call. + + :ivar value: A list of Nat Gateways that exists in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NatGateway] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NatGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NatGateway"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of Nat Gateways that exists in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NatGateway] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(NatGatewayListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NatGatewaySku(msrest.serialization.Model): + """SKU of nat gateway. + + :ivar name: Name of Nat Gateway SKU. Possible values include: "Standard". + :vartype name: str or ~azure.mgmt.network.v2021_08_01.models.NatGatewaySkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "NatGatewaySkuName"]] = None, + **kwargs + ): + """ + :keyword name: Name of Nat Gateway SKU. Possible values include: "Standard". + :paramtype name: str or ~azure.mgmt.network.v2021_08_01.models.NatGatewaySkuName + """ + super(NatGatewaySku, self).__init__(**kwargs) + self.name = name + + +class NatRule(FirewallPolicyRule): + """Rule of type nat. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Name of the rule. + :vartype name: str + :ivar description: Description of the rule. + :vartype description: str + :ivar rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :vartype rule_type: str or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleType + :ivar ip_protocols: Array of FirewallPolicyRuleNetworkProtocols. + :vartype ip_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleNetworkProtocol] + :ivar source_addresses: List of source IP addresses for this rule. + :vartype source_addresses: list[str] + :ivar destination_addresses: List of destination IP addresses or Service Tags. + :vartype destination_addresses: list[str] + :ivar destination_ports: List of destination ports. + :vartype destination_ports: list[str] + :ivar translated_address: The translated address for this NAT rule. + :vartype translated_address: str + :ivar translated_port: The translated port for this NAT rule. + :vartype translated_port: str + :ivar source_ip_groups: List of source IpGroups for this rule. + :vartype source_ip_groups: list[str] + :ivar translated_fqdn: The translated FQDN for this NAT rule. + :vartype translated_fqdn: str + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'ip_protocols': {'key': 'ipProtocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'translated_address': {'key': 'translatedAddress', 'type': 'str'}, + 'translated_port': {'key': 'translatedPort', 'type': 'str'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'translated_fqdn': {'key': 'translatedFqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + ip_protocols: Optional[List[Union[str, "FirewallPolicyRuleNetworkProtocol"]]] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + translated_address: Optional[str] = None, + translated_port: Optional[str] = None, + source_ip_groups: Optional[List[str]] = None, + translated_fqdn: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the rule. + :paramtype name: str + :keyword description: Description of the rule. + :paramtype description: str + :keyword ip_protocols: Array of FirewallPolicyRuleNetworkProtocols. + :paramtype ip_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleNetworkProtocol] + :keyword source_addresses: List of source IP addresses for this rule. + :paramtype source_addresses: list[str] + :keyword destination_addresses: List of destination IP addresses or Service Tags. + :paramtype destination_addresses: list[str] + :keyword destination_ports: List of destination ports. + :paramtype destination_ports: list[str] + :keyword translated_address: The translated address for this NAT rule. + :paramtype translated_address: str + :keyword translated_port: The translated port for this NAT rule. + :paramtype translated_port: str + :keyword source_ip_groups: List of source IpGroups for this rule. + :paramtype source_ip_groups: list[str] + :keyword translated_fqdn: The translated FQDN for this NAT rule. + :paramtype translated_fqdn: str + """ + super(NatRule, self).__init__(name=name, description=description, **kwargs) + self.rule_type = 'NatRule' # type: str + self.ip_protocols = ip_protocols + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.translated_address = translated_address + self.translated_port = translated_port + self.source_ip_groups = source_ip_groups + self.translated_fqdn = translated_fqdn + + +class NatRulePortMapping(msrest.serialization.Model): + """Individual port mappings for inbound NAT rule created for backend pool. + + :ivar inbound_nat_rule_name: Name of inbound NAT rule. + :vartype inbound_nat_rule_name: str + :ivar frontend_port: Frontend port. + :vartype frontend_port: int + :ivar backend_port: Backend port. + :vartype backend_port: int + """ + + _attribute_map = { + 'inbound_nat_rule_name': {'key': 'inboundNatRuleName', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__( + self, + *, + inbound_nat_rule_name: Optional[str] = None, + frontend_port: Optional[int] = None, + backend_port: Optional[int] = None, + **kwargs + ): + """ + :keyword inbound_nat_rule_name: Name of inbound NAT rule. + :paramtype inbound_nat_rule_name: str + :keyword frontend_port: Frontend port. + :paramtype frontend_port: int + :keyword backend_port: Backend port. + :paramtype backend_port: int + """ + super(NatRulePortMapping, self).__init__(**kwargs) + self.inbound_nat_rule_name = inbound_nat_rule_name + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class NetworkConfigurationDiagnosticParameters(msrest.serialization.Model): + """Parameters to get network configuration diagnostic. + + All required parameters must be populated in order to send to Azure. + + :ivar target_resource_id: Required. The ID of the target resource to perform network + configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and + Application Gateway. + :vartype target_resource_id: str + :ivar verbosity_level: Verbosity level. Possible values include: "Normal", "Minimum", "Full". + :vartype verbosity_level: str or ~azure.mgmt.network.v2021_08_01.models.VerbosityLevel + :ivar profiles: Required. List of network configuration diagnostic profiles. + :vartype profiles: + list[~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticProfile] + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'profiles': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'verbosity_level': {'key': 'verbosityLevel', 'type': 'str'}, + 'profiles': {'key': 'profiles', 'type': '[NetworkConfigurationDiagnosticProfile]'}, + } + + def __init__( + self, + *, + target_resource_id: str, + profiles: List["NetworkConfigurationDiagnosticProfile"], + verbosity_level: Optional[Union[str, "VerbosityLevel"]] = None, + **kwargs + ): + """ + :keyword target_resource_id: Required. The ID of the target resource to perform network + configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and + Application Gateway. + :paramtype target_resource_id: str + :keyword verbosity_level: Verbosity level. Possible values include: "Normal", "Minimum", + "Full". + :paramtype verbosity_level: str or ~azure.mgmt.network.v2021_08_01.models.VerbosityLevel + :keyword profiles: Required. List of network configuration diagnostic profiles. + :paramtype profiles: + list[~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticProfile] + """ + super(NetworkConfigurationDiagnosticParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.verbosity_level = verbosity_level + self.profiles = profiles + + +class NetworkConfigurationDiagnosticProfile(msrest.serialization.Model): + """Parameters to compare with network configuration. + + All required parameters must be populated in order to send to Azure. + + :ivar direction: Required. The direction of the traffic. Possible values include: "Inbound", + "Outbound". + :vartype direction: str or ~azure.mgmt.network.v2021_08_01.models.Direction + :ivar protocol: Required. Protocol to be verified on. Accepted values are '*', TCP, UDP. + :vartype protocol: str + :ivar source: Required. Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + :vartype source: str + :ivar destination: Required. Traffic destination. Accepted values are: '*', IP Address/CIDR, + Service Tag. + :vartype destination: str + :ivar destination_port: Required. Traffic destination port. Accepted values are '*' and a + single port in the range (0 - 65535). + :vartype destination_port: str + """ + + _validation = { + 'direction': {'required': True}, + 'protocol': {'required': True}, + 'source': {'required': True}, + 'destination': {'required': True}, + 'destination_port': {'required': True}, + } + + _attribute_map = { + 'direction': {'key': 'direction', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + 'destination_port': {'key': 'destinationPort', 'type': 'str'}, + } + + def __init__( + self, + *, + direction: Union[str, "Direction"], + protocol: str, + source: str, + destination: str, + destination_port: str, + **kwargs + ): + """ + :keyword direction: Required. The direction of the traffic. Possible values include: "Inbound", + "Outbound". + :paramtype direction: str or ~azure.mgmt.network.v2021_08_01.models.Direction + :keyword protocol: Required. Protocol to be verified on. Accepted values are '*', TCP, UDP. + :paramtype protocol: str + :keyword source: Required. Traffic source. Accepted values are '*', IP Address/CIDR, Service + Tag. + :paramtype source: str + :keyword destination: Required. Traffic destination. Accepted values are: '*', IP Address/CIDR, + Service Tag. + :paramtype destination: str + :keyword destination_port: Required. Traffic destination port. Accepted values are '*' and a + single port in the range (0 - 65535). + :paramtype destination_port: str + """ + super(NetworkConfigurationDiagnosticProfile, self).__init__(**kwargs) + self.direction = direction + self.protocol = protocol + self.source = source + self.destination = destination + self.destination_port = destination_port + + +class NetworkConfigurationDiagnosticResponse(msrest.serialization.Model): + """Results of network configuration diagnostic on the target resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar results: List of network configuration diagnostic results. + :vartype results: + list[~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticResult] + """ + + _validation = { + 'results': {'readonly': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': '[NetworkConfigurationDiagnosticResult]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NetworkConfigurationDiagnosticResponse, self).__init__(**kwargs) + self.results = None + + +class NetworkConfigurationDiagnosticResult(msrest.serialization.Model): + """Network configuration diagnostic result corresponded to provided traffic query. + + :ivar profile: Network configuration diagnostic profile. + :vartype profile: ~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticProfile + :ivar network_security_group_result: Network security group result. + :vartype network_security_group_result: + ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroupResult + """ + + _attribute_map = { + 'profile': {'key': 'profile', 'type': 'NetworkConfigurationDiagnosticProfile'}, + 'network_security_group_result': {'key': 'networkSecurityGroupResult', 'type': 'NetworkSecurityGroupResult'}, + } + + def __init__( + self, + *, + profile: Optional["NetworkConfigurationDiagnosticProfile"] = None, + network_security_group_result: Optional["NetworkSecurityGroupResult"] = None, + **kwargs + ): + """ + :keyword profile: Network configuration diagnostic profile. + :paramtype profile: + ~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticProfile + :keyword network_security_group_result: Network security group result. + :paramtype network_security_group_result: + ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroupResult + """ + super(NetworkConfigurationDiagnosticResult, self).__init__(**kwargs) + self.profile = profile + self.network_security_group_result = network_security_group_result + + +class NetworkIntentPolicy(Resource): + """Network Intent Policy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(NetworkIntentPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + + +class NetworkIntentPolicyConfiguration(msrest.serialization.Model): + """Details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. + + :ivar network_intent_policy_name: The name of the Network Intent Policy for storing in target + subscription. + :vartype network_intent_policy_name: str + :ivar source_network_intent_policy: Source network intent policy. + :vartype source_network_intent_policy: + ~azure.mgmt.network.v2021_08_01.models.NetworkIntentPolicy + """ + + _attribute_map = { + 'network_intent_policy_name': {'key': 'networkIntentPolicyName', 'type': 'str'}, + 'source_network_intent_policy': {'key': 'sourceNetworkIntentPolicy', 'type': 'NetworkIntentPolicy'}, + } + + def __init__( + self, + *, + network_intent_policy_name: Optional[str] = None, + source_network_intent_policy: Optional["NetworkIntentPolicy"] = None, + **kwargs + ): + """ + :keyword network_intent_policy_name: The name of the Network Intent Policy for storing in + target subscription. + :paramtype network_intent_policy_name: str + :keyword source_network_intent_policy: Source network intent policy. + :paramtype source_network_intent_policy: + ~azure.mgmt.network.v2021_08_01.models.NetworkIntentPolicy + """ + super(NetworkIntentPolicyConfiguration, self).__init__(**kwargs) + self.network_intent_policy_name = network_intent_policy_name + self.source_network_intent_policy = source_network_intent_policy + + +class NetworkInterface(Resource): + """A network interface in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of the network interface. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar virtual_machine: The reference to a virtual machine. + :vartype virtual_machine: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar network_security_group: The reference to the NetworkSecurityGroup resource. + :vartype network_security_group: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :ivar private_endpoint: A reference to the private endpoint to which the network interface is + linked. + :vartype private_endpoint: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint + :ivar ip_configurations: A list of IPConfigurations of the network interface. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration] + :ivar tap_configurations: A list of TapConfigurations of the network interface. + :vartype tap_configurations: + list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration] + :ivar dns_settings: The DNS settings in network interface. + :vartype dns_settings: ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceDnsSettings + :ivar mac_address: The MAC address of the network interface. + :vartype mac_address: str + :ivar primary: Whether this is a primary network interface on a virtual machine. + :vartype primary: bool + :ivar vnet_encryption_supported: Whether the virtual machine this nic is attached to supports + encryption. + :vartype vnet_encryption_supported: bool + :ivar enable_accelerated_networking: If the network interface is accelerated networking + enabled. + :vartype enable_accelerated_networking: bool + :ivar enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network + interface. + :vartype enable_ip_forwarding: bool + :ivar hosted_workloads: A list of references to linked BareMetal resources. + :vartype hosted_workloads: list[str] + :ivar dscp_configuration: A reference to the dscp configuration to which the network interface + is linked. + :vartype dscp_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar resource_guid: The resource GUID property of the network interface resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network interface resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar workload_type: WorkloadType of the NetworkInterface for BareMetal resources. + :vartype workload_type: str + :ivar nic_type: Type of Network Interface resource. Possible values include: "Standard", + "Elastic". + :vartype nic_type: str or ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceNicType + :ivar private_link_service: Privatelinkservice of the network interface resource. + :vartype private_link_service: ~azure.mgmt.network.v2021_08_01.models.PrivateLinkService + :ivar migration_phase: Migration phase of Network Interface resource. Possible values include: + "None", "Prepare", "Commit", "Abort", "Committed". + :vartype migration_phase: str or + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceMigrationPhase + :ivar auxiliary_mode: Auxiliary mode of Network Interface resource. Possible values include: + "None", "MaxConnections", "Floating". + :vartype auxiliary_mode: str or + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceAuxiliaryMode + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_machine': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'tap_configurations': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'primary': {'readonly': True}, + 'vnet_encryption_supported': {'readonly': True}, + 'hosted_workloads': {'readonly': True}, + 'dscp_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'tap_configurations': {'key': 'properties.tapConfigurations', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, + 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'vnet_encryption_supported': {'key': 'properties.vnetEncryptionSupported', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + 'hosted_workloads': {'key': 'properties.hostedWorkloads', 'type': '[str]'}, + 'dscp_configuration': {'key': 'properties.dscpConfiguration', 'type': 'SubResource'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'workload_type': {'key': 'properties.workloadType', 'type': 'str'}, + 'nic_type': {'key': 'properties.nicType', 'type': 'str'}, + 'private_link_service': {'key': 'properties.privateLinkService', 'type': 'PrivateLinkService'}, + 'migration_phase': {'key': 'properties.migrationPhase', 'type': 'str'}, + 'auxiliary_mode': {'key': 'properties.auxiliaryMode', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + network_security_group: Optional["NetworkSecurityGroup"] = None, + ip_configurations: Optional[List["NetworkInterfaceIPConfiguration"]] = None, + dns_settings: Optional["NetworkInterfaceDnsSettings"] = None, + enable_accelerated_networking: Optional[bool] = None, + enable_ip_forwarding: Optional[bool] = None, + workload_type: Optional[str] = None, + nic_type: Optional[Union[str, "NetworkInterfaceNicType"]] = None, + private_link_service: Optional["PrivateLinkService"] = None, + migration_phase: Optional[Union[str, "NetworkInterfaceMigrationPhase"]] = None, + auxiliary_mode: Optional[Union[str, "NetworkInterfaceAuxiliaryMode"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of the network interface. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword network_security_group: The reference to the NetworkSecurityGroup resource. + :paramtype network_security_group: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :keyword ip_configurations: A list of IPConfigurations of the network interface. + :paramtype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration] + :keyword dns_settings: The DNS settings in network interface. + :paramtype dns_settings: ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceDnsSettings + :keyword enable_accelerated_networking: If the network interface is accelerated networking + enabled. + :paramtype enable_accelerated_networking: bool + :keyword enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network + interface. + :paramtype enable_ip_forwarding: bool + :keyword workload_type: WorkloadType of the NetworkInterface for BareMetal resources. + :paramtype workload_type: str + :keyword nic_type: Type of Network Interface resource. Possible values include: "Standard", + "Elastic". + :paramtype nic_type: str or ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceNicType + :keyword private_link_service: Privatelinkservice of the network interface resource. + :paramtype private_link_service: ~azure.mgmt.network.v2021_08_01.models.PrivateLinkService + :keyword migration_phase: Migration phase of Network Interface resource. Possible values + include: "None", "Prepare", "Commit", "Abort", "Committed". + :paramtype migration_phase: str or + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceMigrationPhase + :keyword auxiliary_mode: Auxiliary mode of Network Interface resource. Possible values include: + "None", "MaxConnections", "Floating". + :paramtype auxiliary_mode: str or + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceAuxiliaryMode + """ + super(NetworkInterface, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.virtual_machine = None + self.network_security_group = network_security_group + self.private_endpoint = None + self.ip_configurations = ip_configurations + self.tap_configurations = None + self.dns_settings = dns_settings + self.mac_address = None + self.primary = None + self.vnet_encryption_supported = None + self.enable_accelerated_networking = enable_accelerated_networking + self.enable_ip_forwarding = enable_ip_forwarding + self.hosted_workloads = None + self.dscp_configuration = None + self.resource_guid = None + self.provisioning_state = None + self.workload_type = workload_type + self.nic_type = nic_type + self.private_link_service = private_link_service + self.migration_phase = migration_phase + self.auxiliary_mode = auxiliary_mode + + +class NetworkInterfaceAssociation(msrest.serialization.Model): + """Network interface and its custom security rules. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Network interface ID. + :vartype id: str + :ivar security_rules: Collection of custom security rules. + :vartype security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, + } + + def __init__( + self, + *, + security_rules: Optional[List["SecurityRule"]] = None, + **kwargs + ): + """ + :keyword security_rules: Collection of custom security rules. + :paramtype security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + """ + super(NetworkInterfaceAssociation, self).__init__(**kwargs) + self.id = None + self.security_rules = security_rules + + +class NetworkInterfaceDnsSettings(msrest.serialization.Model): + """DNS settings of a network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure + provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be + the only value in dnsServers collection. + :vartype dns_servers: list[str] + :ivar applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then + this list will have the union of all DNS servers from all NICs that are part of the + Availability Set. This property is what is configured on each of those VMs. + :vartype applied_dns_servers: list[str] + :ivar internal_dns_name_label: Relative DNS name for this NIC used for internal communications + between VMs in the same virtual network. + :vartype internal_dns_name_label: str + :ivar internal_fqdn: Fully qualified DNS name supporting internal communications between VMs in + the same virtual network. + :vartype internal_fqdn: str + :ivar internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry + is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the + VM name with the value of internalDomainNameSuffix. + :vartype internal_domain_name_suffix: str + """ + + _validation = { + 'applied_dns_servers': {'readonly': True}, + 'internal_fqdn': {'readonly': True}, + 'internal_domain_name_suffix': {'readonly': True}, + } + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, + 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, + 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, + 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, + } + + def __init__( + self, + *, + dns_servers: Optional[List[str]] = None, + internal_dns_name_label: Optional[str] = None, + **kwargs + ): + """ + :keyword dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to + azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it + must be the only value in dnsServers collection. + :paramtype dns_servers: list[str] + :keyword internal_dns_name_label: Relative DNS name for this NIC used for internal + communications between VMs in the same virtual network. + :paramtype internal_dns_name_label: str + """ + super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers + self.applied_dns_servers = None + self.internal_dns_name_label = internal_dns_name_label + self.internal_fqdn = None + self.internal_domain_name_suffix = None + + +class NetworkInterfaceIPConfiguration(SubResource): + """IPConfiguration in a network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar gateway_load_balancer: The reference to gateway load balancer frontend IP. + :vartype gateway_load_balancer: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar virtual_network_taps: The reference to Virtual Network Taps. + :vartype virtual_network_taps: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap] + :ivar application_gateway_backend_address_pools: The reference to + ApplicationGatewayBackendAddressPool resource. + :vartype application_gateway_backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddressPool] + :ivar load_balancer_backend_address_pools: The reference to LoadBalancerBackendAddressPool + resource. + :vartype load_balancer_backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.BackendAddressPool] + :ivar load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. + :vartype load_balancer_inbound_nat_rules: + list[~azure.mgmt.network.v2021_08_01.models.InboundNatRule] + :ivar private_ip_address: Private IP address of the IP configuration. + :vartype private_ip_address: str + :ivar private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. + Default is IPv4. Possible values include: "IPv4", "IPv6". + :vartype private_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :ivar subnet: Subnet bound to the IP configuration. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :ivar primary: Whether this is a primary customer address on the network interface. + :vartype primary: bool + :ivar public_ip_address: Public IP address bound to the IP configuration. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :ivar application_security_groups: Application security groups in which the IP configuration is + included. + :vartype application_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :ivar provisioning_state: The provisioning state of the network interface IP configuration. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar private_link_connection_properties: PrivateLinkConnection properties for the network + interface. + :vartype private_link_connection_properties: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_link_connection_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'gateway_load_balancer': {'key': 'properties.gatewayLoadBalancer', 'type': 'SubResource'}, + 'virtual_network_taps': {'key': 'properties.virtualNetworkTaps', 'type': '[VirtualNetworkTap]'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, + 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_connection_properties': {'key': 'properties.privateLinkConnectionProperties', 'type': 'NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + gateway_load_balancer: Optional["SubResource"] = None, + virtual_network_taps: Optional[List["VirtualNetworkTap"]] = None, + application_gateway_backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, + load_balancer_backend_address_pools: Optional[List["BackendAddressPool"]] = None, + load_balancer_inbound_nat_rules: Optional[List["InboundNatRule"]] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + subnet: Optional["Subnet"] = None, + primary: Optional[bool] = None, + public_ip_address: Optional["PublicIPAddress"] = None, + application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword type: Resource type. + :paramtype type: str + :keyword gateway_load_balancer: The reference to gateway load balancer frontend IP. + :paramtype gateway_load_balancer: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword virtual_network_taps: The reference to Virtual Network Taps. + :paramtype virtual_network_taps: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap] + :keyword application_gateway_backend_address_pools: The reference to + ApplicationGatewayBackendAddressPool resource. + :paramtype application_gateway_backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendAddressPool] + :keyword load_balancer_backend_address_pools: The reference to LoadBalancerBackendAddressPool + resource. + :paramtype load_balancer_backend_address_pools: + list[~azure.mgmt.network.v2021_08_01.models.BackendAddressPool] + :keyword load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. + :paramtype load_balancer_inbound_nat_rules: + list[~azure.mgmt.network.v2021_08_01.models.InboundNatRule] + :keyword private_ip_address: Private IP address of the IP configuration. + :paramtype private_ip_address: str + :keyword private_ip_allocation_method: The private IP address allocation method. Possible + values include: "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. + Default is IPv4. Possible values include: "IPv4", "IPv6". + :paramtype private_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :keyword subnet: Subnet bound to the IP configuration. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :keyword primary: Whether this is a primary customer address on the network interface. + :paramtype primary: bool + :keyword public_ip_address: Public IP address bound to the IP configuration. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :keyword application_security_groups: Application security groups in which the IP configuration + is included. + :paramtype application_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + """ + super(NetworkInterfaceIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.gateway_load_balancer = gateway_load_balancer + self.virtual_network_taps = virtual_network_taps + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_rules = load_balancer_inbound_nat_rules + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.private_ip_address_version = private_ip_address_version + self.subnet = subnet + self.primary = primary + self.public_ip_address = public_ip_address + self.application_security_groups = application_security_groups + self.provisioning_state = None + self.private_link_connection_properties = None + + +class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): + """Response for list ip configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of ip configurations. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkInterfaceIPConfiguration"]] = None, + **kwargs + ): + """ + :keyword value: A list of ip configurations. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration] + """ + super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties(msrest.serialization.Model): + """PrivateLinkConnection properties for the network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The group ID for current private link connection. + :vartype group_id: str + :ivar required_member_name: The required member name for current private link connection. + :vartype required_member_name: str + :ivar fqdns: List of FQDNs for current private link connection. + :vartype fqdns: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_member_name': {'readonly': True}, + 'fqdns': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_member_name': {'key': 'requiredMemberName', 'type': 'str'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties, self).__init__(**kwargs) + self.group_id = None + self.required_member_name = None + self.fqdns = None + + +class NetworkInterfaceListResult(msrest.serialization.Model): + """Response for the ListNetworkInterface API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of network interfaces in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterface] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterface]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkInterface"]] = None, + **kwargs + ): + """ + :keyword value: A list of network interfaces in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterface] + """ + super(NetworkInterfaceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): + """Response for list ip configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of load balancers. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.LoadBalancer] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancer]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LoadBalancer"]] = None, + **kwargs + ): + """ + :keyword value: A list of load balancers. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.LoadBalancer] + """ + super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NetworkInterfaceTapConfiguration(SubResource): + """Tap configuration in a Network Interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar virtual_network_tap: The reference to the Virtual Network Tap resource. + :vartype virtual_network_tap: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap + :ivar provisioning_state: The provisioning state of the network interface tap configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_tap': {'key': 'properties.virtualNetworkTap', 'type': 'VirtualNetworkTap'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + virtual_network_tap: Optional["VirtualNetworkTap"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword virtual_network_tap: The reference to the Virtual Network Tap resource. + :paramtype virtual_network_tap: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap + """ + super(NetworkInterfaceTapConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.virtual_network_tap = virtual_network_tap + self.provisioning_state = None + + +class NetworkInterfaceTapConfigurationListResult(msrest.serialization.Model): + """Response for list tap configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of tap configurations. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkInterfaceTapConfiguration"]] = None, + **kwargs + ): + """ + :keyword value: A list of tap configurations. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration] + """ + super(NetworkInterfaceTapConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NetworkProfile(Resource): + """Network profile resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar container_network_interfaces: List of child container network interfaces. + :vartype container_network_interfaces: + list[~azure.mgmt.network.v2021_08_01.models.ContainerNetworkInterface] + :ivar container_network_interface_configurations: List of chid container network interface + configurations. + :vartype container_network_interface_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ContainerNetworkInterfaceConfiguration] + :ivar resource_guid: The resource GUID property of the network profile resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network profile resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'container_network_interfaces': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'container_network_interfaces': {'key': 'properties.containerNetworkInterfaces', 'type': '[ContainerNetworkInterface]'}, + 'container_network_interface_configurations': {'key': 'properties.containerNetworkInterfaceConfigurations', 'type': '[ContainerNetworkInterfaceConfiguration]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + container_network_interface_configurations: Optional[List["ContainerNetworkInterfaceConfiguration"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword container_network_interface_configurations: List of chid container network interface + configurations. + :paramtype container_network_interface_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ContainerNetworkInterfaceConfiguration] + """ + super(NetworkProfile, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.container_network_interfaces = None + self.container_network_interface_configurations = container_network_interface_configurations + self.resource_guid = None + self.provisioning_state = None + + +class NetworkProfileListResult(msrest.serialization.Model): + """Response for ListNetworkProfiles API service call. + + :ivar value: A list of network profiles that exist in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkProfile] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkProfile]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkProfile"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of network profiles that exist in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkProfile] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(NetworkProfileListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkRule(FirewallPolicyRule): + """Rule of type network. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Name of the rule. + :vartype name: str + :ivar description: Description of the rule. + :vartype description: str + :ivar rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :vartype rule_type: str or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleType + :ivar ip_protocols: Array of FirewallPolicyRuleNetworkProtocols. + :vartype ip_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleNetworkProtocol] + :ivar source_addresses: List of source IP addresses for this rule. + :vartype source_addresses: list[str] + :ivar destination_addresses: List of destination IP addresses or Service Tags. + :vartype destination_addresses: list[str] + :ivar destination_ports: List of destination ports. + :vartype destination_ports: list[str] + :ivar source_ip_groups: List of source IpGroups for this rule. + :vartype source_ip_groups: list[str] + :ivar destination_ip_groups: List of destination IpGroups for this rule. + :vartype destination_ip_groups: list[str] + :ivar destination_fqdns: List of destination FQDNs. + :vartype destination_fqdns: list[str] + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'ip_protocols': {'key': 'ipProtocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + 'destination_fqdns': {'key': 'destinationFqdns', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + ip_protocols: Optional[List[Union[str, "FirewallPolicyRuleNetworkProtocol"]]] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + destination_ip_groups: Optional[List[str]] = None, + destination_fqdns: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword name: Name of the rule. + :paramtype name: str + :keyword description: Description of the rule. + :paramtype description: str + :keyword ip_protocols: Array of FirewallPolicyRuleNetworkProtocols. + :paramtype ip_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleNetworkProtocol] + :keyword source_addresses: List of source IP addresses for this rule. + :paramtype source_addresses: list[str] + :keyword destination_addresses: List of destination IP addresses or Service Tags. + :paramtype destination_addresses: list[str] + :keyword destination_ports: List of destination ports. + :paramtype destination_ports: list[str] + :keyword source_ip_groups: List of source IpGroups for this rule. + :paramtype source_ip_groups: list[str] + :keyword destination_ip_groups: List of destination IpGroups for this rule. + :paramtype destination_ip_groups: list[str] + :keyword destination_fqdns: List of destination FQDNs. + :paramtype destination_fqdns: list[str] + """ + super(NetworkRule, self).__init__(name=name, description=description, **kwargs) + self.rule_type = 'NetworkRule' # type: str + self.ip_protocols = ip_protocols + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.source_ip_groups = source_ip_groups + self.destination_ip_groups = destination_ip_groups + self.destination_fqdns = destination_fqdns + + +class NetworkSecurityGroup(Resource): + """NetworkSecurityGroup resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar security_rules: A collection of security rules of the network security group. + :vartype security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + :ivar default_security_rules: The default security rules of network security group. + :vartype default_security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + :ivar network_interfaces: A collection of references to network interfaces. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterface] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_08_01.models.Subnet] + :ivar flow_logs: A collection of references to flow log resources. + :vartype flow_logs: list[~azure.mgmt.network.v2021_08_01.models.FlowLog] + :ivar resource_guid: The resource GUID property of the network security group resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network security group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'default_security_rules': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'subnets': {'readonly': True}, + 'flow_logs': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, + 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'flow_logs': {'key': 'properties.flowLogs', 'type': '[FlowLog]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + security_rules: Optional[List["SecurityRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword security_rules: A collection of security rules of the network security group. + :paramtype security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + """ + super(NetworkSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.security_rules = security_rules + self.default_security_rules = None + self.network_interfaces = None + self.subnets = None + self.flow_logs = None + self.resource_guid = None + self.provisioning_state = None + + +class NetworkSecurityGroupListResult(msrest.serialization.Model): + """Response for ListNetworkSecurityGroups API service call. + + :ivar value: A list of NetworkSecurityGroup resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkSecurityGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of NetworkSecurityGroup resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(NetworkSecurityGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkSecurityGroupResult(msrest.serialization.Model): + """Network configuration diagnostic result corresponded provided traffic query. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar security_rule_access_result: The network traffic is allowed or denied. Possible values + include: "Allow", "Deny". + :vartype security_rule_access_result: str or + ~azure.mgmt.network.v2021_08_01.models.SecurityRuleAccess + :ivar evaluated_network_security_groups: List of results network security groups diagnostic. + :vartype evaluated_network_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.EvaluatedNetworkSecurityGroup] + """ + + _validation = { + 'evaluated_network_security_groups': {'readonly': True}, + } + + _attribute_map = { + 'security_rule_access_result': {'key': 'securityRuleAccessResult', 'type': 'str'}, + 'evaluated_network_security_groups': {'key': 'evaluatedNetworkSecurityGroups', 'type': '[EvaluatedNetworkSecurityGroup]'}, + } + + def __init__( + self, + *, + security_rule_access_result: Optional[Union[str, "SecurityRuleAccess"]] = None, + **kwargs + ): + """ + :keyword security_rule_access_result: The network traffic is allowed or denied. Possible values + include: "Allow", "Deny". + :paramtype security_rule_access_result: str or + ~azure.mgmt.network.v2021_08_01.models.SecurityRuleAccess + """ + super(NetworkSecurityGroupResult, self).__init__(**kwargs) + self.security_rule_access_result = security_rule_access_result + self.evaluated_network_security_groups = None + + +class NetworkSecurityRulesEvaluationResult(msrest.serialization.Model): + """Network security rules evaluation result. + + :ivar name: Name of the network security rule. + :vartype name: str + :ivar protocol_matched: Value indicating whether protocol is matched. + :vartype protocol_matched: bool + :ivar source_matched: Value indicating whether source is matched. + :vartype source_matched: bool + :ivar source_port_matched: Value indicating whether source port is matched. + :vartype source_port_matched: bool + :ivar destination_matched: Value indicating whether destination is matched. + :vartype destination_matched: bool + :ivar destination_port_matched: Value indicating whether destination port is matched. + :vartype destination_port_matched: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'protocol_matched': {'key': 'protocolMatched', 'type': 'bool'}, + 'source_matched': {'key': 'sourceMatched', 'type': 'bool'}, + 'source_port_matched': {'key': 'sourcePortMatched', 'type': 'bool'}, + 'destination_matched': {'key': 'destinationMatched', 'type': 'bool'}, + 'destination_port_matched': {'key': 'destinationPortMatched', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + protocol_matched: Optional[bool] = None, + source_matched: Optional[bool] = None, + source_port_matched: Optional[bool] = None, + destination_matched: Optional[bool] = None, + destination_port_matched: Optional[bool] = None, + **kwargs + ): + """ + :keyword name: Name of the network security rule. + :paramtype name: str + :keyword protocol_matched: Value indicating whether protocol is matched. + :paramtype protocol_matched: bool + :keyword source_matched: Value indicating whether source is matched. + :paramtype source_matched: bool + :keyword source_port_matched: Value indicating whether source port is matched. + :paramtype source_port_matched: bool + :keyword destination_matched: Value indicating whether destination is matched. + :paramtype destination_matched: bool + :keyword destination_port_matched: Value indicating whether destination port is matched. + :paramtype destination_port_matched: bool + """ + super(NetworkSecurityRulesEvaluationResult, self).__init__(**kwargs) + self.name = name + self.protocol_matched = protocol_matched + self.source_matched = source_matched + self.source_port_matched = source_port_matched + self.destination_matched = destination_matched + self.destination_port_matched = destination_port_matched + + +class NetworkVirtualAppliance(Resource): + """NetworkVirtualAppliance Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar identity: The service principal that has read access to cloud-init and config blob. + :vartype identity: ~azure.mgmt.network.v2021_08_01.models.ManagedServiceIdentity + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar nva_sku: Network Virtual Appliance SKU. + :vartype nva_sku: ~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSkuProperties + :ivar address_prefix: Address Prefix. + :vartype address_prefix: str + :ivar boot_strap_configuration_blobs: BootStrapConfigurationBlobs storage URLs. + :vartype boot_strap_configuration_blobs: list[str] + :ivar virtual_hub: The Virtual Hub where Network Virtual Appliance is being deployed. + :vartype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar cloud_init_configuration_blobs: CloudInitConfigurationBlob storage URLs. + :vartype cloud_init_configuration_blobs: list[str] + :ivar cloud_init_configuration: CloudInitConfiguration string in plain text. + :vartype cloud_init_configuration: str + :ivar virtual_appliance_asn: VirtualAppliance ASN. + :vartype virtual_appliance_asn: long + :ivar ssh_public_key: Public key for SSH login. + :vartype ssh_public_key: str + :ivar virtual_appliance_nics: List of Virtual Appliance Network Interfaces. + :vartype virtual_appliance_nics: + list[~azure.mgmt.network.v2021_08_01.models.VirtualApplianceNicProperties] + :ivar virtual_appliance_sites: List of references to VirtualApplianceSite. + :vartype virtual_appliance_sites: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar inbound_security_rules: List of references to InboundSecurityRules. + :vartype inbound_security_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'address_prefix': {'readonly': True}, + 'virtual_appliance_asn': {'maximum': 4294967295, 'minimum': 0}, + 'virtual_appliance_nics': {'readonly': True}, + 'virtual_appliance_sites': {'readonly': True}, + 'inbound_security_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'nva_sku': {'key': 'properties.nvaSku', 'type': 'VirtualApplianceSkuProperties'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'boot_strap_configuration_blobs': {'key': 'properties.bootStrapConfigurationBlobs', 'type': '[str]'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'cloud_init_configuration_blobs': {'key': 'properties.cloudInitConfigurationBlobs', 'type': '[str]'}, + 'cloud_init_configuration': {'key': 'properties.cloudInitConfiguration', 'type': 'str'}, + 'virtual_appliance_asn': {'key': 'properties.virtualApplianceAsn', 'type': 'long'}, + 'ssh_public_key': {'key': 'properties.sshPublicKey', 'type': 'str'}, + 'virtual_appliance_nics': {'key': 'properties.virtualApplianceNics', 'type': '[VirtualApplianceNicProperties]'}, + 'virtual_appliance_sites': {'key': 'properties.virtualApplianceSites', 'type': '[SubResource]'}, + 'inbound_security_rules': {'key': 'properties.inboundSecurityRules', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + nva_sku: Optional["VirtualApplianceSkuProperties"] = None, + boot_strap_configuration_blobs: Optional[List[str]] = None, + virtual_hub: Optional["SubResource"] = None, + cloud_init_configuration_blobs: Optional[List[str]] = None, + cloud_init_configuration: Optional[str] = None, + virtual_appliance_asn: Optional[int] = None, + ssh_public_key: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword identity: The service principal that has read access to cloud-init and config blob. + :paramtype identity: ~azure.mgmt.network.v2021_08_01.models.ManagedServiceIdentity + :keyword nva_sku: Network Virtual Appliance SKU. + :paramtype nva_sku: ~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSkuProperties + :keyword boot_strap_configuration_blobs: BootStrapConfigurationBlobs storage URLs. + :paramtype boot_strap_configuration_blobs: list[str] + :keyword virtual_hub: The Virtual Hub where Network Virtual Appliance is being deployed. + :paramtype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword cloud_init_configuration_blobs: CloudInitConfigurationBlob storage URLs. + :paramtype cloud_init_configuration_blobs: list[str] + :keyword cloud_init_configuration: CloudInitConfiguration string in plain text. + :paramtype cloud_init_configuration: str + :keyword virtual_appliance_asn: VirtualAppliance ASN. + :paramtype virtual_appliance_asn: long + :keyword ssh_public_key: Public key for SSH login. + :paramtype ssh_public_key: str + """ + super(NetworkVirtualAppliance, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.identity = identity + self.etag = None + self.nva_sku = nva_sku + self.address_prefix = None + self.boot_strap_configuration_blobs = boot_strap_configuration_blobs + self.virtual_hub = virtual_hub + self.cloud_init_configuration_blobs = cloud_init_configuration_blobs + self.cloud_init_configuration = cloud_init_configuration + self.virtual_appliance_asn = virtual_appliance_asn + self.ssh_public_key = ssh_public_key + self.virtual_appliance_nics = None + self.virtual_appliance_sites = None + self.inbound_security_rules = None + self.provisioning_state = None + + +class NetworkVirtualApplianceListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualAppliances API service call. + + :ivar value: List of Network Virtual Appliances. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkVirtualAppliance]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkVirtualAppliance"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Network Virtual Appliances. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(NetworkVirtualApplianceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkVirtualApplianceSiteListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualApplianceSites API service call. + + :ivar value: List of Network Virtual Appliance sites. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSite] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualApplianceSite]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualApplianceSite"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Network Virtual Appliance sites. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSite] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(NetworkVirtualApplianceSiteListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkVirtualApplianceSku(Resource): + """Definition of the NetworkVirtualApplianceSkus resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar vendor: Network Virtual Appliance Sku vendor. + :vartype vendor: str + :ivar available_versions: Available Network Virtual Appliance versions. + :vartype available_versions: list[str] + :ivar available_scale_units: The list of scale units available. + :vartype available_scale_units: + list[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSkuInstances] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'vendor': {'readonly': True}, + 'available_versions': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'available_versions': {'key': 'properties.availableVersions', 'type': '[str]'}, + 'available_scale_units': {'key': 'properties.availableScaleUnits', 'type': '[NetworkVirtualApplianceSkuInstances]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + available_scale_units: Optional[List["NetworkVirtualApplianceSkuInstances"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword available_scale_units: The list of scale units available. + :paramtype available_scale_units: + list[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSkuInstances] + """ + super(NetworkVirtualApplianceSku, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.vendor = None + self.available_versions = None + self.available_scale_units = available_scale_units + + +class NetworkVirtualApplianceSkuInstances(msrest.serialization.Model): + """List of available Sku and instances. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar scale_unit: Scale Unit. + :vartype scale_unit: str + :ivar instance_count: Instance Count. + :vartype instance_count: int + """ + + _validation = { + 'scale_unit': {'readonly': True}, + 'instance_count': {'readonly': True}, + } + + _attribute_map = { + 'scale_unit': {'key': 'scaleUnit', 'type': 'str'}, + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(NetworkVirtualApplianceSkuInstances, self).__init__(**kwargs) + self.scale_unit = None + self.instance_count = None + + +class NetworkVirtualApplianceSkuListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualApplianceSkus API service call. + + :ivar value: List of Network Virtual Appliance Skus that are available. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSku] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkVirtualApplianceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkVirtualApplianceSku"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Network Virtual Appliance Skus that are available. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSku] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(NetworkVirtualApplianceSkuListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkWatcher(Resource): + """Network watcher in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the network watcher resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(NetworkWatcher, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.provisioning_state = None + + +class NetworkWatcherListResult(msrest.serialization.Model): + """Response for ListNetworkWatchers API service call. + + :ivar value: List of network watcher resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkWatcher] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkWatcher"]] = None, + **kwargs + ): + """ + :keyword value: List of network watcher resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.NetworkWatcher] + """ + super(NetworkWatcherListResult, self).__init__(**kwargs) + self.value = value + + +class NextHopParameters(msrest.serialization.Model): + """Parameters that define the source and destination endpoint. + + All required parameters must be populated in order to send to Azure. + + :ivar target_resource_id: Required. The resource identifier of the target resource against + which the action is to be performed. + :vartype target_resource_id: str + :ivar source_ip_address: Required. The source IP address. + :vartype source_ip_address: str + :ivar destination_ip_address: Required. The destination IP address. + :vartype destination_ip_address: str + :ivar target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is enabled + on any of the nics, then this parameter must be specified. Otherwise optional). + :vartype target_nic_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'source_ip_address': {'required': True}, + 'destination_ip_address': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, + 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, + 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + source_ip_address: str, + destination_ip_address: str, + target_nic_resource_id: Optional[str] = None, + **kwargs + ): + """ + :keyword target_resource_id: Required. The resource identifier of the target resource against + which the action is to be performed. + :paramtype target_resource_id: str + :keyword source_ip_address: Required. The source IP address. + :paramtype source_ip_address: str + :keyword destination_ip_address: Required. The destination IP address. + :paramtype destination_ip_address: str + :keyword target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is + enabled on any of the nics, then this parameter must be specified. Otherwise optional). + :paramtype target_nic_resource_id: str + """ + super(NextHopParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.source_ip_address = source_ip_address + self.destination_ip_address = destination_ip_address + self.target_nic_resource_id = target_nic_resource_id + + +class NextHopResult(msrest.serialization.Model): + """The information about next hop from the specified VM. + + :ivar next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", + "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". + :vartype next_hop_type: str or ~azure.mgmt.network.v2021_08_01.models.NextHopType + :ivar next_hop_ip_address: Next hop IP Address. + :vartype next_hop_ip_address: str + :ivar route_table_id: The resource identifier for the route table associated with the route + being returned. If the route being returned does not correspond to any user created routes then + this field will be the string 'System Route'. + :vartype route_table_id: str + """ + + _attribute_map = { + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, + } + + def __init__( + self, + *, + next_hop_type: Optional[Union[str, "NextHopType"]] = None, + next_hop_ip_address: Optional[str] = None, + route_table_id: Optional[str] = None, + **kwargs + ): + """ + :keyword next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", + "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". + :paramtype next_hop_type: str or ~azure.mgmt.network.v2021_08_01.models.NextHopType + :keyword next_hop_ip_address: Next hop IP Address. + :paramtype next_hop_ip_address: str + :keyword route_table_id: The resource identifier for the route table associated with the route + being returned. If the route being returned does not correspond to any user created routes then + this field will be the string 'System Route'. + :paramtype route_table_id: str + """ + super(NextHopResult, self).__init__(**kwargs) + self.next_hop_type = next_hop_type + self.next_hop_ip_address = next_hop_ip_address + self.route_table_id = route_table_id + + +class O365BreakOutCategoryPolicies(msrest.serialization.Model): + """Office365 breakout categories. + + :ivar allow: Flag to control allow category. + :vartype allow: bool + :ivar optimize: Flag to control optimize category. + :vartype optimize: bool + :ivar default: Flag to control default category. + :vartype default: bool + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': 'bool'}, + 'optimize': {'key': 'optimize', 'type': 'bool'}, + 'default': {'key': 'default', 'type': 'bool'}, + } + + def __init__( + self, + *, + allow: Optional[bool] = None, + optimize: Optional[bool] = None, + default: Optional[bool] = None, + **kwargs + ): + """ + :keyword allow: Flag to control allow category. + :paramtype allow: bool + :keyword optimize: Flag to control optimize category. + :paramtype optimize: bool + :keyword default: Flag to control default category. + :paramtype default: bool + """ + super(O365BreakOutCategoryPolicies, self).__init__(**kwargs) + self.allow = allow + self.optimize = optimize + self.default = default + + +class O365PolicyProperties(msrest.serialization.Model): + """The Office365 breakout policy. + + :ivar break_out_categories: Office365 breakout categories. + :vartype break_out_categories: + ~azure.mgmt.network.v2021_08_01.models.O365BreakOutCategoryPolicies + """ + + _attribute_map = { + 'break_out_categories': {'key': 'breakOutCategories', 'type': 'O365BreakOutCategoryPolicies'}, + } + + def __init__( + self, + *, + break_out_categories: Optional["O365BreakOutCategoryPolicies"] = None, + **kwargs + ): + """ + :keyword break_out_categories: Office365 breakout categories. + :paramtype break_out_categories: + ~azure.mgmt.network.v2021_08_01.models.O365BreakOutCategoryPolicies + """ + super(O365PolicyProperties, self).__init__(**kwargs) + self.break_out_categories = break_out_categories + + +class Office365PolicyProperties(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :ivar break_out_categories: Office 365 breakout categories. + :vartype break_out_categories: ~azure.mgmt.network.v2021_08_01.models.BreakOutCategoryPolicies + """ + + _attribute_map = { + 'break_out_categories': {'key': 'breakOutCategories', 'type': 'BreakOutCategoryPolicies'}, + } + + def __init__( + self, + *, + break_out_categories: Optional["BreakOutCategoryPolicies"] = None, + **kwargs + ): + """ + :keyword break_out_categories: Office 365 breakout categories. + :paramtype break_out_categories: + ~azure.mgmt.network.v2021_08_01.models.BreakOutCategoryPolicies + """ + super(Office365PolicyProperties, self).__init__(**kwargs) + self.break_out_categories = break_out_categories + + +class Operation(msrest.serialization.Model): + """Network REST API operation definition. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: Display metadata associated with the operation. + :vartype display: ~azure.mgmt.network.v2021_08_01.models.OperationDisplay + :ivar origin: Origin of the operation. + :vartype origin: str + :ivar service_specification: Specification of the service. + :vartype service_specification: + ~azure.mgmt.network.v2021_08_01.models.OperationPropertiesFormatServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationPropertiesFormatServiceSpecification'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["OperationDisplay"] = None, + origin: Optional[str] = None, + service_specification: Optional["OperationPropertiesFormatServiceSpecification"] = None, + **kwargs + ): + """ + :keyword name: Operation name: {provider}/{resource}/{operation}. + :paramtype name: str + :keyword display: Display metadata associated with the operation. + :paramtype display: ~azure.mgmt.network.v2021_08_01.models.OperationDisplay + :keyword origin: Origin of the operation. + :paramtype origin: str + :keyword service_specification: Specification of the service. + :paramtype service_specification: + ~azure.mgmt.network.v2021_08_01.models.OperationPropertiesFormatServiceSpecification + """ + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.service_specification = service_specification + + +class OperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :ivar provider: Service provider: Microsoft Network. + :vartype provider: str + :ivar resource: Resource on which the operation is performed. + :vartype resource: str + :ivar operation: Type of the operation: get, read, delete, etc. + :vartype operation: str + :ivar description: Description of the operation. + :vartype description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + """ + :keyword provider: Service provider: Microsoft Network. + :paramtype provider: str + :keyword resource: Resource on which the operation is performed. + :paramtype resource: str + :keyword operation: Type of the operation: get, read, delete, etc. + :paramtype operation: str + :keyword description: Description of the operation. + :paramtype description: str + """ + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. + + :ivar value: List of Network operations supported by the Network resource provider. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.Operation] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Operation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Network operations supported by the Network resource provider. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.Operation] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class OperationPropertiesFormatServiceSpecification(msrest.serialization.Model): + """Specification of the service. + + :ivar metric_specifications: Operation service specification. + :vartype metric_specifications: + list[~azure.mgmt.network.v2021_08_01.models.MetricSpecification] + :ivar log_specifications: Operation log specification. + :vartype log_specifications: list[~azure.mgmt.network.v2021_08_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__( + self, + *, + metric_specifications: Optional[List["MetricSpecification"]] = None, + log_specifications: Optional[List["LogSpecification"]] = None, + **kwargs + ): + """ + :keyword metric_specifications: Operation service specification. + :paramtype metric_specifications: + list[~azure.mgmt.network.v2021_08_01.models.MetricSpecification] + :keyword log_specifications: Operation log specification. + :paramtype log_specifications: list[~azure.mgmt.network.v2021_08_01.models.LogSpecification] + """ + super(OperationPropertiesFormatServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + self.log_specifications = log_specifications + + +class OrderBy(msrest.serialization.Model): + """Describes a column to sort. + + :ivar field: Describes the actual column name to sort by. + :vartype field: str + :ivar order: Describes if results should be in ascending/descending order. Possible values + include: "Ascending", "Descending". + :vartype order: str or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIDPSQuerySortOrder + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__( + self, + *, + field: Optional[str] = None, + order: Optional[Union[str, "FirewallPolicyIDPSQuerySortOrder"]] = None, + **kwargs + ): + """ + :keyword field: Describes the actual column name to sort by. + :paramtype field: str + :keyword order: Describes if results should be in ascending/descending order. Possible values + include: "Ascending", "Descending". + :paramtype order: str or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIDPSQuerySortOrder + """ + super(OrderBy, self).__init__(**kwargs) + self.field = field + self.order = order + + +class OutboundRule(SubResource): + """Outbound rule of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the set of outbound rules used by + the load balancer. This name can be used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar allocated_outbound_ports: The number of outbound ports to be used for NAT. + :vartype allocated_outbound_ports: int + :ivar frontend_ip_configurations: The Frontend IP addresses of the load balancer. + :vartype frontend_ip_configurations: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load + balanced across IPs in the backend IPs. + :vartype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar provisioning_state: The provisioning state of the outbound rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar protocol: The protocol for the outbound rule in load balancer. Possible values include: + "Tcp", "Udp", "All". + :vartype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.LoadBalancerOutboundRuleProtocol + :ivar enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :vartype enable_tcp_reset: bool + :ivar idle_timeout_in_minutes: The timeout for the TCP idle connection. + :vartype idle_timeout_in_minutes: int + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + allocated_outbound_ports: Optional[int] = None, + frontend_ip_configurations: Optional[List["SubResource"]] = None, + backend_address_pool: Optional["SubResource"] = None, + protocol: Optional[Union[str, "LoadBalancerOutboundRuleProtocol"]] = None, + enable_tcp_reset: Optional[bool] = None, + idle_timeout_in_minutes: Optional[int] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the set of outbound rules used by + the load balancer. This name can be used to access the resource. + :paramtype name: str + :keyword allocated_outbound_ports: The number of outbound ports to be used for NAT. + :paramtype allocated_outbound_ports: int + :keyword frontend_ip_configurations: The Frontend IP addresses of the load balancer. + :paramtype frontend_ip_configurations: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load + balanced across IPs in the backend IPs. + :paramtype backend_address_pool: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword protocol: The protocol for the outbound rule in load balancer. Possible values + include: "Tcp", "Udp", "All". + :paramtype protocol: str or + ~azure.mgmt.network.v2021_08_01.models.LoadBalancerOutboundRuleProtocol + :keyword enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or + unexpected connection termination. This element is only used when the protocol is set to TCP. + :paramtype enable_tcp_reset: bool + :keyword idle_timeout_in_minutes: The timeout for the TCP idle connection. + :paramtype idle_timeout_in_minutes: int + """ + super(OutboundRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.allocated_outbound_ports = allocated_outbound_ports + self.frontend_ip_configurations = frontend_ip_configurations + self.backend_address_pool = backend_address_pool + self.provisioning_state = None + self.protocol = protocol + self.enable_tcp_reset = enable_tcp_reset + self.idle_timeout_in_minutes = idle_timeout_in_minutes + + +class OwaspCrsExclusionEntry(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :ivar match_variable: Required. The variable to be excluded. Possible values include: + "RequestHeaderNames", "RequestCookieNames", "RequestArgNames", "RequestHeaderKeys", + "RequestHeaderValues", "RequestCookieKeys", "RequestCookieValues", "RequestArgKeys", + "RequestArgValues". + :vartype match_variable: str or + ~azure.mgmt.network.v2021_08_01.models.OwaspCrsExclusionEntryMatchVariable + :ivar selector_match_operator: Required. When matchVariable is a collection, operate on the + selector to specify which elements in the collection this exclusion applies to. Possible values + include: "Equals", "Contains", "StartsWith", "EndsWith", "EqualsAny". + :vartype selector_match_operator: str or + ~azure.mgmt.network.v2021_08_01.models.OwaspCrsExclusionEntrySelectorMatchOperator + :ivar selector: Required. When matchVariable is a collection, operator used to specify which + elements in the collection this exclusion applies to. + :vartype selector: str + :ivar exclusion_managed_rule_sets: The managed rule sets that are associated with the + exclusion. + :vartype exclusion_managed_rule_sets: + list[~azure.mgmt.network.v2021_08_01.models.ExclusionManagedRuleSet] + """ + + _validation = { + 'match_variable': {'required': True}, + 'selector_match_operator': {'required': True}, + 'selector': {'required': True}, + } + + _attribute_map = { + 'match_variable': {'key': 'matchVariable', 'type': 'str'}, + 'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'exclusion_managed_rule_sets': {'key': 'exclusionManagedRuleSets', 'type': '[ExclusionManagedRuleSet]'}, + } + + def __init__( + self, + *, + match_variable: Union[str, "OwaspCrsExclusionEntryMatchVariable"], + selector_match_operator: Union[str, "OwaspCrsExclusionEntrySelectorMatchOperator"], + selector: str, + exclusion_managed_rule_sets: Optional[List["ExclusionManagedRuleSet"]] = None, + **kwargs + ): + """ + :keyword match_variable: Required. The variable to be excluded. Possible values include: + "RequestHeaderNames", "RequestCookieNames", "RequestArgNames", "RequestHeaderKeys", + "RequestHeaderValues", "RequestCookieKeys", "RequestCookieValues", "RequestArgKeys", + "RequestArgValues". + :paramtype match_variable: str or + ~azure.mgmt.network.v2021_08_01.models.OwaspCrsExclusionEntryMatchVariable + :keyword selector_match_operator: Required. When matchVariable is a collection, operate on the + selector to specify which elements in the collection this exclusion applies to. Possible values + include: "Equals", "Contains", "StartsWith", "EndsWith", "EqualsAny". + :paramtype selector_match_operator: str or + ~azure.mgmt.network.v2021_08_01.models.OwaspCrsExclusionEntrySelectorMatchOperator + :keyword selector: Required. When matchVariable is a collection, operator used to specify which + elements in the collection this exclusion applies to. + :paramtype selector: str + :keyword exclusion_managed_rule_sets: The managed rule sets that are associated with the + exclusion. + :paramtype exclusion_managed_rule_sets: + list[~azure.mgmt.network.v2021_08_01.models.ExclusionManagedRuleSet] + """ + super(OwaspCrsExclusionEntry, self).__init__(**kwargs) + self.match_variable = match_variable + self.selector_match_operator = selector_match_operator + self.selector = selector + self.exclusion_managed_rule_sets = exclusion_managed_rule_sets + + +class P2SConnectionConfiguration(SubResource): + """P2SConnectionConfiguration Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar vpn_client_address_pool: The reference to the address space resource which represents + Address space for P2S VpnClient. + :vartype vpn_client_address_pool: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :ivar routing_configuration: The Routing Configuration indicating the associated and propagated + route tables on this connection. + :vartype routing_configuration: ~azure.mgmt.network.v2021_08_01.models.RoutingConfiguration + :ivar enable_internet_security: Flag indicating whether the enable internet security flag is + turned on for the P2S Connections or not. + :vartype enable_internet_security: bool + :ivar configuration_policy_group_associations: List of Configuration Policy Groups that this + P2SConnectionConfiguration is attached to. + :vartype configuration_policy_group_associations: + list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar previous_configuration_policy_group_associations: List of previous Configuration Policy + Groups that this P2SConnectionConfiguration was attached to. + :vartype previous_configuration_policy_group_associations: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup] + :ivar provisioning_state: The provisioning state of the P2SConnectionConfiguration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'configuration_policy_group_associations': {'readonly': True}, + 'previous_configuration_policy_group_associations': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'vpn_client_address_pool': {'key': 'properties.vpnClientAddressPool', 'type': 'AddressSpace'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'configuration_policy_group_associations': {'key': 'properties.configurationPolicyGroupAssociations', 'type': '[SubResource]'}, + 'previous_configuration_policy_group_associations': {'key': 'properties.previousConfigurationPolicyGroupAssociations', 'type': '[VpnServerConfigurationPolicyGroup]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + vpn_client_address_pool: Optional["AddressSpace"] = None, + routing_configuration: Optional["RoutingConfiguration"] = None, + enable_internet_security: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword vpn_client_address_pool: The reference to the address space resource which represents + Address space for P2S VpnClient. + :paramtype vpn_client_address_pool: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :keyword routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :paramtype routing_configuration: ~azure.mgmt.network.v2021_08_01.models.RoutingConfiguration + :keyword enable_internet_security: Flag indicating whether the enable internet security flag is + turned on for the P2S Connections or not. + :paramtype enable_internet_security: bool + """ + super(P2SConnectionConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.vpn_client_address_pool = vpn_client_address_pool + self.routing_configuration = routing_configuration + self.enable_internet_security = enable_internet_security + self.configuration_policy_group_associations = None + self.previous_configuration_policy_group_associations = None + self.provisioning_state = None + + +class P2SVpnConnectionHealth(msrest.serialization.Model): + """P2S Vpn connection detailed health written to sas url. + + :ivar sas_url: Returned sas url of the blob to which the p2s vpn connection detailed health + will be written. + :vartype sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + **kwargs + ): + """ + :keyword sas_url: Returned sas url of the blob to which the p2s vpn connection detailed health + will be written. + :paramtype sas_url: str + """ + super(P2SVpnConnectionHealth, self).__init__(**kwargs) + self.sas_url = sas_url + + +class P2SVpnConnectionHealthRequest(msrest.serialization.Model): + """List of P2S Vpn connection health request. + + :ivar vpn_user_names_filter: The list of p2s vpn user names whose p2s vpn connection detailed + health to retrieve for. + :vartype vpn_user_names_filter: list[str] + :ivar output_blob_sas_url: The sas-url to download the P2S Vpn connection health detail. + :vartype output_blob_sas_url: str + """ + + _attribute_map = { + 'vpn_user_names_filter': {'key': 'vpnUserNamesFilter', 'type': '[str]'}, + 'output_blob_sas_url': {'key': 'outputBlobSasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + vpn_user_names_filter: Optional[List[str]] = None, + output_blob_sas_url: Optional[str] = None, + **kwargs + ): + """ + :keyword vpn_user_names_filter: The list of p2s vpn user names whose p2s vpn connection + detailed health to retrieve for. + :paramtype vpn_user_names_filter: list[str] + :keyword output_blob_sas_url: The sas-url to download the P2S Vpn connection health detail. + :paramtype output_blob_sas_url: str + """ + super(P2SVpnConnectionHealthRequest, self).__init__(**kwargs) + self.vpn_user_names_filter = vpn_user_names_filter + self.output_blob_sas_url = output_blob_sas_url + + +class P2SVpnConnectionRequest(msrest.serialization.Model): + """List of p2s vpn connections to be disconnected. + + :ivar vpn_connection_ids: List of p2s vpn connection Ids. + :vartype vpn_connection_ids: list[str] + """ + + _attribute_map = { + 'vpn_connection_ids': {'key': 'vpnConnectionIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + vpn_connection_ids: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword vpn_connection_ids: List of p2s vpn connection Ids. + :paramtype vpn_connection_ids: list[str] + """ + super(P2SVpnConnectionRequest, self).__init__(**kwargs) + self.vpn_connection_ids = vpn_connection_ids + + +class P2SVpnGateway(Resource): + """P2SVpnGateway Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar virtual_hub: The VirtualHub to which the gateway belongs. + :vartype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar p2_s_connection_configurations: List of all p2s connection configurations of the gateway. + :vartype p2_s_connection_configurations: + list[~azure.mgmt.network.v2021_08_01.models.P2SConnectionConfiguration] + :ivar provisioning_state: The provisioning state of the P2S VPN gateway resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar vpn_gateway_scale_unit: The scale unit for this p2s vpn gateway. + :vartype vpn_gateway_scale_unit: int + :ivar vpn_server_configuration: The VpnServerConfiguration to which the p2sVpnGateway is + attached to. + :vartype vpn_server_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar vpn_client_connection_health: All P2S VPN clients' connection health status. + :vartype vpn_client_connection_health: + ~azure.mgmt.network.v2021_08_01.models.VpnClientConnectionHealth + :ivar custom_dns_servers: List of all customer specified DNS servers IP addresses. + :vartype custom_dns_servers: list[str] + :ivar is_routing_preference_internet: Enable Routing Preference property for the Public IP + Interface of the P2SVpnGateway. + :vartype is_routing_preference_internet: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'vpn_client_connection_health': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'p2_s_connection_configurations': {'key': 'properties.p2SConnectionConfigurations', 'type': '[P2SConnectionConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_gateway_scale_unit': {'key': 'properties.vpnGatewayScaleUnit', 'type': 'int'}, + 'vpn_server_configuration': {'key': 'properties.vpnServerConfiguration', 'type': 'SubResource'}, + 'vpn_client_connection_health': {'key': 'properties.vpnClientConnectionHealth', 'type': 'VpnClientConnectionHealth'}, + 'custom_dns_servers': {'key': 'properties.customDnsServers', 'type': '[str]'}, + 'is_routing_preference_internet': {'key': 'properties.isRoutingPreferenceInternet', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_hub: Optional["SubResource"] = None, + p2_s_connection_configurations: Optional[List["P2SConnectionConfiguration"]] = None, + vpn_gateway_scale_unit: Optional[int] = None, + vpn_server_configuration: Optional["SubResource"] = None, + custom_dns_servers: Optional[List[str]] = None, + is_routing_preference_internet: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword virtual_hub: The VirtualHub to which the gateway belongs. + :paramtype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword p2_s_connection_configurations: List of all p2s connection configurations of the + gateway. + :paramtype p2_s_connection_configurations: + list[~azure.mgmt.network.v2021_08_01.models.P2SConnectionConfiguration] + :keyword vpn_gateway_scale_unit: The scale unit for this p2s vpn gateway. + :paramtype vpn_gateway_scale_unit: int + :keyword vpn_server_configuration: The VpnServerConfiguration to which the p2sVpnGateway is + attached to. + :paramtype vpn_server_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword custom_dns_servers: List of all customer specified DNS servers IP addresses. + :paramtype custom_dns_servers: list[str] + :keyword is_routing_preference_internet: Enable Routing Preference property for the Public IP + Interface of the P2SVpnGateway. + :paramtype is_routing_preference_internet: bool + """ + super(P2SVpnGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.virtual_hub = virtual_hub + self.p2_s_connection_configurations = p2_s_connection_configurations + self.provisioning_state = None + self.vpn_gateway_scale_unit = vpn_gateway_scale_unit + self.vpn_server_configuration = vpn_server_configuration + self.vpn_client_connection_health = None + self.custom_dns_servers = custom_dns_servers + self.is_routing_preference_internet = is_routing_preference_internet + + +class P2SVpnProfileParameters(msrest.serialization.Model): + """Vpn Client Parameters for package generation. + + :ivar authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :vartype authentication_method: str or + ~azure.mgmt.network.v2021_08_01.models.AuthenticationMethod + """ + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, + **kwargs + ): + """ + :keyword authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :paramtype authentication_method: str or + ~azure.mgmt.network.v2021_08_01.models.AuthenticationMethod + """ + super(P2SVpnProfileParameters, self).__init__(**kwargs) + self.authentication_method = authentication_method + + +class PacketCapture(msrest.serialization.Model): + """Parameters that define the create packet capture operation. + + All required parameters must be populated in order to send to Azure. + + :ivar target: Required. The ID of the targeted resource, only VM is currently supported. + :vartype target: str + :ivar bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes are + truncated. + :vartype bytes_to_capture_per_packet: long + :ivar total_bytes_per_session: Maximum size of the capture output. + :vartype total_bytes_per_session: long + :ivar time_limit_in_seconds: Maximum duration of the capture session in seconds. + :vartype time_limit_in_seconds: int + :ivar storage_location: Required. The storage location for a packet capture session. + :vartype storage_location: ~azure.mgmt.network.v2021_08_01.models.PacketCaptureStorageLocation + :ivar filters: A list of packet capture filters. + :vartype filters: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureFilter] + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + } + + _attribute_map = { + 'target': {'key': 'properties.target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, + } + + def __init__( + self, + *, + target: str, + storage_location: "PacketCaptureStorageLocation", + bytes_to_capture_per_packet: Optional[int] = 0, + total_bytes_per_session: Optional[int] = 1073741824, + time_limit_in_seconds: Optional[int] = 18000, + filters: Optional[List["PacketCaptureFilter"]] = None, + **kwargs + ): + """ + :keyword target: Required. The ID of the targeted resource, only VM is currently supported. + :paramtype target: str + :keyword bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :paramtype bytes_to_capture_per_packet: long + :keyword total_bytes_per_session: Maximum size of the capture output. + :paramtype total_bytes_per_session: long + :keyword time_limit_in_seconds: Maximum duration of the capture session in seconds. + :paramtype time_limit_in_seconds: int + :keyword storage_location: Required. The storage location for a packet capture session. + :paramtype storage_location: + ~azure.mgmt.network.v2021_08_01.models.PacketCaptureStorageLocation + :keyword filters: A list of packet capture filters. + :paramtype filters: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureFilter] + """ + super(PacketCapture, self).__init__(**kwargs) + self.target = target + self.bytes_to_capture_per_packet = bytes_to_capture_per_packet + self.total_bytes_per_session = total_bytes_per_session + self.time_limit_in_seconds = time_limit_in_seconds + self.storage_location = storage_location + self.filters = filters + + +class PacketCaptureFilter(msrest.serialization.Model): + """Filter that is applied to packet capture request. Multiple filters can be applied. + + :ivar protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". + Default value: "Any". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.PcProtocol + :ivar local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single + address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. + Multiple ranges not currently supported. Mixing ranges with multiple entries not currently + supported. Default = null. + :vartype local_ip_address: str + :ivar remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single + address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. + Multiple ranges not currently supported. Mixing ranges with multiple entries not currently + supported. Default = null. + :vartype remote_ip_address: str + :ivar local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" + for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing + ranges with multiple entries not currently supported. Default = null. + :vartype local_port: str + :ivar remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" + for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing + ranges with multiple entries not currently supported. Default = null. + :vartype remote_port: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, + 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, + 'local_port': {'key': 'localPort', 'type': 'str'}, + 'remote_port': {'key': 'remotePort', 'type': 'str'}, + } + + def __init__( + self, + *, + protocol: Optional[Union[str, "PcProtocol"]] = "Any", + local_ip_address: Optional[str] = None, + remote_ip_address: Optional[str] = None, + local_port: Optional[str] = None, + remote_port: Optional[str] = None, + **kwargs + ): + """ + :keyword protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". + Default value: "Any". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.PcProtocol + :keyword local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single + address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. + Multiple ranges not currently supported. Mixing ranges with multiple entries not currently + supported. Default = null. + :paramtype local_ip_address: str + :keyword remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for + single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple + entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not + currently supported. Default = null. + :paramtype remote_ip_address: str + :keyword local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" + for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing + ranges with multiple entries not currently supported. Default = null. + :paramtype local_port: str + :keyword remote_port: Remote port to be filtered on. Notation: "80" for single port + entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently + supported. Mixing ranges with multiple entries not currently supported. Default = null. + :paramtype remote_port: str + """ + super(PacketCaptureFilter, self).__init__(**kwargs) + self.protocol = protocol + self.local_ip_address = local_ip_address + self.remote_ip_address = remote_ip_address + self.local_port = local_port + self.remote_port = remote_port + + +class PacketCaptureListResult(msrest.serialization.Model): + """List of packet capture sessions. + + :ivar value: Information about packet capture sessions. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, + } + + def __init__( + self, + *, + value: Optional[List["PacketCaptureResult"]] = None, + **kwargs + ): + """ + :keyword value: Information about packet capture sessions. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureResult] + """ + super(PacketCaptureListResult, self).__init__(**kwargs) + self.value = value + + +class PacketCaptureParameters(msrest.serialization.Model): + """Parameters that define the create packet capture operation. + + All required parameters must be populated in order to send to Azure. + + :ivar target: Required. The ID of the targeted resource, only VM is currently supported. + :vartype target: str + :ivar bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes are + truncated. + :vartype bytes_to_capture_per_packet: long + :ivar total_bytes_per_session: Maximum size of the capture output. + :vartype total_bytes_per_session: long + :ivar time_limit_in_seconds: Maximum duration of the capture session in seconds. + :vartype time_limit_in_seconds: int + :ivar storage_location: Required. The storage location for a packet capture session. + :vartype storage_location: ~azure.mgmt.network.v2021_08_01.models.PacketCaptureStorageLocation + :ivar filters: A list of packet capture filters. + :vartype filters: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureFilter] + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + } + + _attribute_map = { + 'target': {'key': 'target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, + } + + def __init__( + self, + *, + target: str, + storage_location: "PacketCaptureStorageLocation", + bytes_to_capture_per_packet: Optional[int] = 0, + total_bytes_per_session: Optional[int] = 1073741824, + time_limit_in_seconds: Optional[int] = 18000, + filters: Optional[List["PacketCaptureFilter"]] = None, + **kwargs + ): + """ + :keyword target: Required. The ID of the targeted resource, only VM is currently supported. + :paramtype target: str + :keyword bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :paramtype bytes_to_capture_per_packet: long + :keyword total_bytes_per_session: Maximum size of the capture output. + :paramtype total_bytes_per_session: long + :keyword time_limit_in_seconds: Maximum duration of the capture session in seconds. + :paramtype time_limit_in_seconds: int + :keyword storage_location: Required. The storage location for a packet capture session. + :paramtype storage_location: + ~azure.mgmt.network.v2021_08_01.models.PacketCaptureStorageLocation + :keyword filters: A list of packet capture filters. + :paramtype filters: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureFilter] + """ + super(PacketCaptureParameters, self).__init__(**kwargs) + self.target = target + self.bytes_to_capture_per_packet = bytes_to_capture_per_packet + self.total_bytes_per_session = total_bytes_per_session + self.time_limit_in_seconds = time_limit_in_seconds + self.storage_location = storage_location + self.filters = filters + + +class PacketCaptureQueryStatusResult(msrest.serialization.Model): + """Status of packet capture session. + + :ivar name: The name of the packet capture resource. + :vartype name: str + :ivar id: The ID of the packet capture resource. + :vartype id: str + :ivar capture_start_time: The start time of the packet capture session. + :vartype capture_start_time: ~datetime.datetime + :ivar packet_capture_status: The status of the packet capture session. Possible values include: + "NotStarted", "Running", "Stopped", "Error", "Unknown". + :vartype packet_capture_status: str or ~azure.mgmt.network.v2021_08_01.models.PcStatus + :ivar stop_reason: The reason the current packet capture session was stopped. + :vartype stop_reason: str + :ivar packet_capture_error: List of errors of packet capture session. + :vartype packet_capture_error: list[str or ~azure.mgmt.network.v2021_08_01.models.PcError] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, + 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, + 'stop_reason': {'key': 'stopReason', 'type': 'str'}, + 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + capture_start_time: Optional[datetime.datetime] = None, + packet_capture_status: Optional[Union[str, "PcStatus"]] = None, + stop_reason: Optional[str] = None, + packet_capture_error: Optional[List[Union[str, "PcError"]]] = None, + **kwargs + ): + """ + :keyword name: The name of the packet capture resource. + :paramtype name: str + :keyword id: The ID of the packet capture resource. + :paramtype id: str + :keyword capture_start_time: The start time of the packet capture session. + :paramtype capture_start_time: ~datetime.datetime + :keyword packet_capture_status: The status of the packet capture session. Possible values + include: "NotStarted", "Running", "Stopped", "Error", "Unknown". + :paramtype packet_capture_status: str or ~azure.mgmt.network.v2021_08_01.models.PcStatus + :keyword stop_reason: The reason the current packet capture session was stopped. + :paramtype stop_reason: str + :keyword packet_capture_error: List of errors of packet capture session. + :paramtype packet_capture_error: list[str or ~azure.mgmt.network.v2021_08_01.models.PcError] + """ + super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) + self.name = name + self.id = id + self.capture_start_time = capture_start_time + self.packet_capture_status = packet_capture_status + self.stop_reason = stop_reason + self.packet_capture_error = packet_capture_error + + +class PacketCaptureResult(msrest.serialization.Model): + """Information about packet capture session. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the packet capture session. + :vartype name: str + :ivar id: ID of the packet capture operation. + :vartype id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar target: The ID of the targeted resource, only VM is currently supported. + :vartype target: str + :ivar bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes are + truncated. + :vartype bytes_to_capture_per_packet: long + :ivar total_bytes_per_session: Maximum size of the capture output. + :vartype total_bytes_per_session: long + :ivar time_limit_in_seconds: Maximum duration of the capture session in seconds. + :vartype time_limit_in_seconds: int + :ivar storage_location: The storage location for a packet capture session. + :vartype storage_location: ~azure.mgmt.network.v2021_08_01.models.PacketCaptureStorageLocation + :ivar filters: A list of packet capture filters. + :vartype filters: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureFilter] + :ivar provisioning_state: The provisioning state of the packet capture session. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'etag': {'readonly': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + target: Optional[str] = None, + bytes_to_capture_per_packet: Optional[int] = 0, + total_bytes_per_session: Optional[int] = 1073741824, + time_limit_in_seconds: Optional[int] = 18000, + storage_location: Optional["PacketCaptureStorageLocation"] = None, + filters: Optional[List["PacketCaptureFilter"]] = None, + **kwargs + ): + """ + :keyword target: The ID of the targeted resource, only VM is currently supported. + :paramtype target: str + :keyword bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :paramtype bytes_to_capture_per_packet: long + :keyword total_bytes_per_session: Maximum size of the capture output. + :paramtype total_bytes_per_session: long + :keyword time_limit_in_seconds: Maximum duration of the capture session in seconds. + :paramtype time_limit_in_seconds: int + :keyword storage_location: The storage location for a packet capture session. + :paramtype storage_location: + ~azure.mgmt.network.v2021_08_01.models.PacketCaptureStorageLocation + :keyword filters: A list of packet capture filters. + :paramtype filters: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureFilter] + """ + super(PacketCaptureResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.etag = None + self.target = target + self.bytes_to_capture_per_packet = bytes_to_capture_per_packet + self.total_bytes_per_session = total_bytes_per_session + self.time_limit_in_seconds = time_limit_in_seconds + self.storage_location = storage_location + self.filters = filters + self.provisioning_state = None + + +class PacketCaptureResultProperties(PacketCaptureParameters): + """The properties of a packet capture session. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar target: Required. The ID of the targeted resource, only VM is currently supported. + :vartype target: str + :ivar bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes are + truncated. + :vartype bytes_to_capture_per_packet: long + :ivar total_bytes_per_session: Maximum size of the capture output. + :vartype total_bytes_per_session: long + :ivar time_limit_in_seconds: Maximum duration of the capture session in seconds. + :vartype time_limit_in_seconds: int + :ivar storage_location: Required. The storage location for a packet capture session. + :vartype storage_location: ~azure.mgmt.network.v2021_08_01.models.PacketCaptureStorageLocation + :ivar filters: A list of packet capture filters. + :vartype filters: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureFilter] + :ivar provisioning_state: The provisioning state of the packet capture session. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'target': {'key': 'target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + target: str, + storage_location: "PacketCaptureStorageLocation", + bytes_to_capture_per_packet: Optional[int] = 0, + total_bytes_per_session: Optional[int] = 1073741824, + time_limit_in_seconds: Optional[int] = 18000, + filters: Optional[List["PacketCaptureFilter"]] = None, + **kwargs + ): + """ + :keyword target: Required. The ID of the targeted resource, only VM is currently supported. + :paramtype target: str + :keyword bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :paramtype bytes_to_capture_per_packet: long + :keyword total_bytes_per_session: Maximum size of the capture output. + :paramtype total_bytes_per_session: long + :keyword time_limit_in_seconds: Maximum duration of the capture session in seconds. + :paramtype time_limit_in_seconds: int + :keyword storage_location: Required. The storage location for a packet capture session. + :paramtype storage_location: + ~azure.mgmt.network.v2021_08_01.models.PacketCaptureStorageLocation + :keyword filters: A list of packet capture filters. + :paramtype filters: list[~azure.mgmt.network.v2021_08_01.models.PacketCaptureFilter] + """ + super(PacketCaptureResultProperties, self).__init__(target=target, bytes_to_capture_per_packet=bytes_to_capture_per_packet, total_bytes_per_session=total_bytes_per_session, time_limit_in_seconds=time_limit_in_seconds, storage_location=storage_location, filters=filters, **kwargs) + self.provisioning_state = None + + +class PacketCaptureStorageLocation(msrest.serialization.Model): + """The storage location for a packet capture session. + + :ivar storage_id: The ID of the storage account to save the packet capture session. Required if + no local file path is provided. + :vartype storage_id: str + :ivar storage_path: The URI of the storage path to save the packet capture. Must be a + well-formed URI describing the location to save the packet capture. + :vartype storage_path: str + :ivar file_path: A valid local path on the targeting VM. Must include the name of the capture + file (*.cap). For linux virtual machine it must start with /var/captures. Required if no + storage ID is provided, otherwise optional. + :vartype file_path: str + """ + + _attribute_map = { + 'storage_id': {'key': 'storageId', 'type': 'str'}, + 'storage_path': {'key': 'storagePath', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_id: Optional[str] = None, + storage_path: Optional[str] = None, + file_path: Optional[str] = None, + **kwargs + ): + """ + :keyword storage_id: The ID of the storage account to save the packet capture session. Required + if no local file path is provided. + :paramtype storage_id: str + :keyword storage_path: The URI of the storage path to save the packet capture. Must be a + well-formed URI describing the location to save the packet capture. + :paramtype storage_path: str + :keyword file_path: A valid local path on the targeting VM. Must include the name of the + capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if + no storage ID is provided, otherwise optional. + :paramtype file_path: str + """ + super(PacketCaptureStorageLocation, self).__init__(**kwargs) + self.storage_id = storage_id + self.storage_path = storage_path + self.file_path = file_path + + +class PatchRouteFilter(SubResource): + """Route Filter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar rules: Collection of RouteFilterRules contained within a route filter. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.RouteFilterRule] + :ivar peerings: A collection of references to express route circuit peerings. + :vartype peerings: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :ivar ipv6_peerings: A collection of references to express route circuit ipv6 peerings. + :vartype ipv6_peerings: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :ivar provisioning_state: The provisioning state of the route filter resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peerings': {'readonly': True}, + 'ipv6_peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'ipv6_peerings': {'key': 'properties.ipv6Peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + rules: Optional[List["RouteFilterRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword rules: Collection of RouteFilterRules contained within a route filter. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.RouteFilterRule] + """ + super(PatchRouteFilter, self).__init__(id=id, **kwargs) + self.name = None + self.etag = None + self.type = None + self.tags = tags + self.rules = rules + self.peerings = None + self.ipv6_peerings = None + self.provisioning_state = None + + +class PatchRouteFilterRule(SubResource): + """Route Filter Rule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar access: The access type of the rule. Possible values include: "Allow", "Deny". + :vartype access: str or ~azure.mgmt.network.v2021_08_01.models.Access + :ivar route_filter_rule_type: The rule type of the rule. Possible values include: "Community". + :vartype route_filter_rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.RouteFilterRuleType + :ivar communities: The collection for bgp community values to filter on. e.g. + ['12076:5010','12076:5020']. + :vartype communities: list[str] + :ivar provisioning_state: The provisioning state of the route filter rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, + 'communities': {'key': 'properties.communities', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + access: Optional[Union[str, "Access"]] = None, + route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, + communities: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword access: The access type of the rule. Possible values include: "Allow", "Deny". + :paramtype access: str or ~azure.mgmt.network.v2021_08_01.models.Access + :keyword route_filter_rule_type: The rule type of the rule. Possible values include: + "Community". + :paramtype route_filter_rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.RouteFilterRuleType + :keyword communities: The collection for bgp community values to filter on. e.g. + ['12076:5010','12076:5020']. + :paramtype communities: list[str] + """ + super(PatchRouteFilterRule, self).__init__(id=id, **kwargs) + self.name = None + self.etag = None + self.access = access + self.route_filter_rule_type = route_filter_rule_type + self.communities = communities + self.provisioning_state = None + + +class PeerExpressRouteCircuitConnection(SubResource): + """Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the circuit. + :vartype express_route_circuit_peering: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar peer_express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the peered circuit. + :vartype peer_express_route_circuit_peering: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar address_prefix: /29 IP address space to carve out Customer addresses for tunnels. + :vartype address_prefix: str + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_08_01.models.CircuitConnectionStatus + :ivar connection_name: The name of the express route circuit connection resource. + :vartype connection_name: str + :ivar auth_resource_guid: The resource guid of the authorization used for the express route + circuit connection. + :vartype auth_resource_guid: str + :ivar provisioning_state: The provisioning state of the peer express route circuit connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'circuit_connection_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'SubResource'}, + 'peer_express_route_circuit_peering': {'key': 'properties.peerExpressRouteCircuitPeering', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, + 'connection_name': {'key': 'properties.connectionName', 'type': 'str'}, + 'auth_resource_guid': {'key': 'properties.authResourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + express_route_circuit_peering: Optional["SubResource"] = None, + peer_express_route_circuit_peering: Optional["SubResource"] = None, + address_prefix: Optional[str] = None, + connection_name: Optional[str] = None, + auth_resource_guid: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the circuit. + :paramtype express_route_circuit_peering: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword peer_express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the peered circuit. + :paramtype peer_express_route_circuit_peering: + ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword address_prefix: /29 IP address space to carve out Customer addresses for tunnels. + :paramtype address_prefix: str + :keyword connection_name: The name of the express route circuit connection resource. + :paramtype connection_name: str + :keyword auth_resource_guid: The resource guid of the authorization used for the express route + circuit connection. + :paramtype auth_resource_guid: str + """ + super(PeerExpressRouteCircuitConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.express_route_circuit_peering = express_route_circuit_peering + self.peer_express_route_circuit_peering = peer_express_route_circuit_peering + self.address_prefix = address_prefix + self.circuit_connection_status = None + self.connection_name = connection_name + self.auth_resource_guid = auth_resource_guid + self.provisioning_state = None + + +class PeerExpressRouteCircuitConnectionListResult(msrest.serialization.Model): + """Response for ListPeeredConnections API service call retrieves all global reach peer circuit connections that belongs to a Private Peering for an ExpressRouteCircuit. + + :ivar value: The global reach peer circuit connection associated with Private Peering in an + ExpressRoute Circuit. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PeerExpressRouteCircuitConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PeerExpressRouteCircuitConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PeerExpressRouteCircuitConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The global reach peer circuit connection associated with Private Peering in an + ExpressRoute Circuit. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.PeerExpressRouteCircuitConnection] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(PeerExpressRouteCircuitConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PeerRoute(msrest.serialization.Model): + """Peer routing details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The peer's local address. + :vartype local_address: str + :ivar network: The route's network prefix. + :vartype network: str + :ivar next_hop: The route's next hop. + :vartype next_hop: str + :ivar source_peer: The peer this route was learned from. + :vartype source_peer: str + :ivar origin: The source this route was learned from. + :vartype origin: str + :ivar as_path: The route's AS path sequence. + :vartype as_path: str + :ivar weight: The route's weight. + :vartype weight: int + """ + + _validation = { + 'local_address': {'readonly': True}, + 'network': {'readonly': True}, + 'next_hop': {'readonly': True}, + 'source_peer': {'readonly': True}, + 'origin': {'readonly': True}, + 'as_path': {'readonly': True}, + 'weight': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PeerRoute, self).__init__(**kwargs) + self.local_address = None + self.network = None + self.next_hop = None + self.source_peer = None + self.origin = None + self.as_path = None + self.weight = None + + +class PeerRouteList(msrest.serialization.Model): + """List of virtual router peer routes. + + :ivar value: List of peer routes. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PeerRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PeerRoute]'}, + } + + def __init__( + self, + *, + value: Optional[List["PeerRoute"]] = None, + **kwargs + ): + """ + :keyword value: List of peer routes. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.PeerRoute] + """ + super(PeerRouteList, self).__init__(**kwargs) + self.value = value + + +class PolicySettings(msrest.serialization.Model): + """Defines contents of a web application firewall global configuration. + + :ivar state: The state of the policy. Possible values include: "Disabled", "Enabled". + :vartype state: str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallEnabledState + :ivar mode: The mode of the policy. Possible values include: "Prevention", "Detection". + :vartype mode: str or ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallMode + :ivar request_body_check: Whether to allow WAF to check request Body. + :vartype request_body_check: bool + :ivar max_request_body_size_in_kb: Maximum request body size in Kb for WAF. + :vartype max_request_body_size_in_kb: int + :ivar file_upload_limit_in_mb: Maximum file upload size in Mb for WAF. + :vartype file_upload_limit_in_mb: int + """ + + _validation = { + 'max_request_body_size_in_kb': {'minimum': 8}, + 'file_upload_limit_in_mb': {'minimum': 0}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'request_body_check': {'key': 'requestBodyCheck', 'type': 'bool'}, + 'max_request_body_size_in_kb': {'key': 'maxRequestBodySizeInKb', 'type': 'int'}, + 'file_upload_limit_in_mb': {'key': 'fileUploadLimitInMb', 'type': 'int'}, + } + + def __init__( + self, + *, + state: Optional[Union[str, "WebApplicationFirewallEnabledState"]] = None, + mode: Optional[Union[str, "WebApplicationFirewallMode"]] = None, + request_body_check: Optional[bool] = None, + max_request_body_size_in_kb: Optional[int] = None, + file_upload_limit_in_mb: Optional[int] = None, + **kwargs + ): + """ + :keyword state: The state of the policy. Possible values include: "Disabled", "Enabled". + :paramtype state: str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallEnabledState + :keyword mode: The mode of the policy. Possible values include: "Prevention", "Detection". + :paramtype mode: str or ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallMode + :keyword request_body_check: Whether to allow WAF to check request Body. + :paramtype request_body_check: bool + :keyword max_request_body_size_in_kb: Maximum request body size in Kb for WAF. + :paramtype max_request_body_size_in_kb: int + :keyword file_upload_limit_in_mb: Maximum file upload size in Mb for WAF. + :paramtype file_upload_limit_in_mb: int + """ + super(PolicySettings, self).__init__(**kwargs) + self.state = state + self.mode = mode + self.request_body_check = request_body_check + self.max_request_body_size_in_kb = max_request_body_size_in_kb + self.file_upload_limit_in_mb = file_upload_limit_in_mb + + +class PrepareNetworkPoliciesRequest(msrest.serialization.Model): + """Details of PrepareNetworkPolicies for Subnet. + + :ivar service_name: The name of the service for which subnet is being prepared for. + :vartype service_name: str + :ivar network_intent_policy_configurations: A list of NetworkIntentPolicyConfiguration. + :vartype network_intent_policy_configurations: + list[~azure.mgmt.network.v2021_08_01.models.NetworkIntentPolicyConfiguration] + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'network_intent_policy_configurations': {'key': 'networkIntentPolicyConfigurations', 'type': '[NetworkIntentPolicyConfiguration]'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + network_intent_policy_configurations: Optional[List["NetworkIntentPolicyConfiguration"]] = None, + **kwargs + ): + """ + :keyword service_name: The name of the service for which subnet is being prepared for. + :paramtype service_name: str + :keyword network_intent_policy_configurations: A list of NetworkIntentPolicyConfiguration. + :paramtype network_intent_policy_configurations: + list[~azure.mgmt.network.v2021_08_01.models.NetworkIntentPolicyConfiguration] + """ + super(PrepareNetworkPoliciesRequest, self).__init__(**kwargs) + self.service_name = service_name + self.network_intent_policy_configurations = network_intent_policy_configurations + + +class PrivateDnsZoneConfig(msrest.serialization.Model): + """PrivateDnsZoneConfig resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :vartype name: str + :ivar private_dns_zone_id: The resource id of the private dns zone. + :vartype private_dns_zone_id: str + :ivar record_sets: A collection of information regarding a recordSet, holding information to + identify private resources. + :vartype record_sets: list[~azure.mgmt.network.v2021_08_01.models.RecordSet] + """ + + _validation = { + 'record_sets': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_dns_zone_id': {'key': 'properties.privateDnsZoneId', 'type': 'str'}, + 'record_sets': {'key': 'properties.recordSets', 'type': '[RecordSet]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + private_dns_zone_id: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the resource that is unique within a resource group. This name can be + used to access the resource. + :paramtype name: str + :keyword private_dns_zone_id: The resource id of the private dns zone. + :paramtype private_dns_zone_id: str + """ + super(PrivateDnsZoneConfig, self).__init__(**kwargs) + self.name = name + self.private_dns_zone_id = private_dns_zone_id + self.record_sets = None + + +class PrivateDnsZoneGroup(SubResource): + """Private dns zone group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the private dns zone group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar private_dns_zone_configs: A collection of private dns zone configurations of the private + dns zone group. + :vartype private_dns_zone_configs: + list[~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneConfig] + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_dns_zone_configs': {'key': 'properties.privateDnsZoneConfigs', 'type': '[PrivateDnsZoneConfig]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_dns_zone_configs: Optional[List["PrivateDnsZoneConfig"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the resource that is unique within a resource group. This name can be + used to access the resource. + :paramtype name: str + :keyword private_dns_zone_configs: A collection of private dns zone configurations of the + private dns zone group. + :paramtype private_dns_zone_configs: + list[~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneConfig] + """ + super(PrivateDnsZoneGroup, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.provisioning_state = None + self.private_dns_zone_configs = private_dns_zone_configs + + +class PrivateDnsZoneGroupListResult(msrest.serialization.Model): + """Response for the ListPrivateDnsZoneGroups API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of private dns zone group resources in a private endpoint. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateDnsZoneGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateDnsZoneGroup"]] = None, + **kwargs + ): + """ + :keyword value: A list of private dns zone group resources in a private endpoint. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroup] + """ + super(PrivateDnsZoneGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateEndpoint(Resource): + """Private endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of the load balancer. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar subnet: The ID of the subnet from which the private IP will be allocated. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :ivar network_interfaces: An array of references to the network interfaces created for this + private endpoint. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterface] + :ivar provisioning_state: The provisioning state of the private endpoint resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar private_link_service_connections: A grouping of information about the connection to the + remote resource. + :vartype private_link_service_connections: + list[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnection] + :ivar manual_private_link_service_connections: A grouping of information about the connection + to the remote resource. Used when the network admin does not have access to approve connections + to the remote resource. + :vartype manual_private_link_service_connections: + list[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnection] + :ivar custom_dns_configs: An array of custom dns configurations. + :vartype custom_dns_configs: + list[~azure.mgmt.network.v2021_08_01.models.CustomDnsConfigPropertiesFormat] + :ivar application_security_groups: Application security groups in which the private endpoint IP + configuration is included. + :vartype application_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :ivar ip_configurations: A list of IP configurations of the private endpoint. This will be used + to map to the First Party Service's endpoints. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointIPConfiguration] + :ivar custom_network_interface_name: The custom name of the network interface attached to the + private endpoint. + :vartype custom_network_interface_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_service_connections': {'key': 'properties.privateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'}, + 'manual_private_link_service_connections': {'key': 'properties.manualPrivateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'}, + 'custom_dns_configs': {'key': 'properties.customDnsConfigs', 'type': '[CustomDnsConfigPropertiesFormat]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[PrivateEndpointIPConfiguration]'}, + 'custom_network_interface_name': {'key': 'properties.customNetworkInterfaceName', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + subnet: Optional["Subnet"] = None, + private_link_service_connections: Optional[List["PrivateLinkServiceConnection"]] = None, + manual_private_link_service_connections: Optional[List["PrivateLinkServiceConnection"]] = None, + custom_dns_configs: Optional[List["CustomDnsConfigPropertiesFormat"]] = None, + application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, + ip_configurations: Optional[List["PrivateEndpointIPConfiguration"]] = None, + custom_network_interface_name: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of the load balancer. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword subnet: The ID of the subnet from which the private IP will be allocated. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :keyword private_link_service_connections: A grouping of information about the connection to + the remote resource. + :paramtype private_link_service_connections: + list[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnection] + :keyword manual_private_link_service_connections: A grouping of information about the + connection to the remote resource. Used when the network admin does not have access to approve + connections to the remote resource. + :paramtype manual_private_link_service_connections: + list[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnection] + :keyword custom_dns_configs: An array of custom dns configurations. + :paramtype custom_dns_configs: + list[~azure.mgmt.network.v2021_08_01.models.CustomDnsConfigPropertiesFormat] + :keyword application_security_groups: Application security groups in which the private endpoint + IP configuration is included. + :paramtype application_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :keyword ip_configurations: A list of IP configurations of the private endpoint. This will be + used to map to the First Party Service's endpoints. + :paramtype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointIPConfiguration] + :keyword custom_network_interface_name: The custom name of the network interface attached to + the private endpoint. + :paramtype custom_network_interface_name: str + """ + super(PrivateEndpoint, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.subnet = subnet + self.network_interfaces = None + self.provisioning_state = None + self.private_link_service_connections = private_link_service_connections + self.manual_private_link_service_connections = manual_private_link_service_connections + self.custom_dns_configs = custom_dns_configs + self.application_security_groups = application_security_groups + self.ip_configurations = ip_configurations + self.custom_network_interface_name = custom_network_interface_name + + +class PrivateEndpointConnection(SubResource): + """PrivateEndpointConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint + :ivar private_link_service_connection_state: A collection of information about the state of the + connection between service consumer and provider. + :vartype private_link_service_connection_state: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar link_identifier: The consumer link id. + :vartype link_identifier: str + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'link_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'link_identifier': {'key': 'properties.linkIdentifier', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :paramtype private_link_service_connection_state: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnectionState + """ + super(PrivateEndpointConnection, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.private_endpoint = None + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + self.link_identifier = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """Response for the ListPrivateEndpointConnection API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of PrivateEndpointConnection resources for a specific private link service. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + """ + :keyword value: A list of PrivateEndpointConnection resources for a specific private link + service. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection] + """ + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateEndpointIPConfiguration(msrest.serialization.Model): + """An IP Configuration of the private endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the resource that is unique within a resource group. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar group_id: The ID of a group obtained from the remote resource that this private endpoint + should connect to. + :vartype group_id: str + :ivar member_name: The member name of a group obtained from the remote resource that this + private endpoint should connect to. + :vartype member_name: str + :ivar private_ip_address: A private ip address obtained from the private endpoint's subnet. + :vartype private_ip_address: str + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'member_name': {'key': 'properties.memberName', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + group_id: Optional[str] = None, + member_name: Optional[str] = None, + private_ip_address: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the resource that is unique within a resource group. + :paramtype name: str + :keyword group_id: The ID of a group obtained from the remote resource that this private + endpoint should connect to. + :paramtype group_id: str + :keyword member_name: The member name of a group obtained from the remote resource that this + private endpoint should connect to. + :paramtype member_name: str + :keyword private_ip_address: A private ip address obtained from the private endpoint's subnet. + :paramtype private_ip_address: str + """ + super(PrivateEndpointIPConfiguration, self).__init__(**kwargs) + self.name = name + self.type = None + self.etag = None + self.group_id = group_id + self.member_name = member_name + self.private_ip_address = private_ip_address + + +class PrivateEndpointListResult(msrest.serialization.Model): + """Response for the ListPrivateEndpoints API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of private endpoint resources in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpoint"]] = None, + **kwargs + ): + """ + :keyword value: A list of private endpoint resources in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint] + """ + super(PrivateEndpointListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateLinkService(Resource): + """Private link service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of the load balancer. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar load_balancer_frontend_ip_configurations: An array of references to the load balancer IP + configurations. + :vartype load_balancer_frontend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration] + :ivar ip_configurations: An array of private link service IP configurations. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceIpConfiguration] + :ivar network_interfaces: An array of references to the network interfaces created for this + private link service. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_08_01.models.NetworkInterface] + :ivar provisioning_state: The provisioning state of the private link service resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar private_endpoint_connections: An array of list about connections to the private endpoint. + :vartype private_endpoint_connections: + list[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection] + :ivar visibility: The visibility list of the private link service. + :vartype visibility: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServicePropertiesVisibility + :ivar auto_approval: The auto-approval list of the private link service. + :vartype auto_approval: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServicePropertiesAutoApproval + :ivar fqdns: The list of Fqdn. + :vartype fqdns: list[str] + :ivar alias: The alias of the private link service. + :vartype alias: str + :ivar enable_proxy_protocol: Whether the private link service is enabled for proxy protocol or + not. + :vartype enable_proxy_protocol: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'alias': {'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}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'load_balancer_frontend_ip_configurations': {'key': 'properties.loadBalancerFrontendIpConfigurations', 'type': '[FrontendIPConfiguration]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[PrivateLinkServiceIpConfiguration]'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'visibility': {'key': 'properties.visibility', 'type': 'PrivateLinkServicePropertiesVisibility'}, + 'auto_approval': {'key': 'properties.autoApproval', 'type': 'PrivateLinkServicePropertiesAutoApproval'}, + 'fqdns': {'key': 'properties.fqdns', 'type': '[str]'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'enable_proxy_protocol': {'key': 'properties.enableProxyProtocol', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + load_balancer_frontend_ip_configurations: Optional[List["FrontendIPConfiguration"]] = None, + ip_configurations: Optional[List["PrivateLinkServiceIpConfiguration"]] = None, + visibility: Optional["PrivateLinkServicePropertiesVisibility"] = None, + auto_approval: Optional["PrivateLinkServicePropertiesAutoApproval"] = None, + fqdns: Optional[List[str]] = None, + enable_proxy_protocol: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of the load balancer. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword load_balancer_frontend_ip_configurations: An array of references to the load balancer + IP configurations. + :paramtype load_balancer_frontend_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration] + :keyword ip_configurations: An array of private link service IP configurations. + :paramtype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceIpConfiguration] + :keyword visibility: The visibility list of the private link service. + :paramtype visibility: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServicePropertiesVisibility + :keyword auto_approval: The auto-approval list of the private link service. + :paramtype auto_approval: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServicePropertiesAutoApproval + :keyword fqdns: The list of Fqdn. + :paramtype fqdns: list[str] + :keyword enable_proxy_protocol: Whether the private link service is enabled for proxy protocol + or not. + :paramtype enable_proxy_protocol: bool + """ + super(PrivateLinkService, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.load_balancer_frontend_ip_configurations = load_balancer_frontend_ip_configurations + self.ip_configurations = ip_configurations + self.network_interfaces = None + self.provisioning_state = None + self.private_endpoint_connections = None + self.visibility = visibility + self.auto_approval = auto_approval + self.fqdns = fqdns + self.alias = None + self.enable_proxy_protocol = enable_proxy_protocol + + +class PrivateLinkServiceConnection(SubResource): + """PrivateLinkServiceConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the private link service connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar private_link_service_id: The resource id of private link service. + :vartype private_link_service_id: str + :ivar group_ids: The ID(s) of the group(s) obtained from the remote resource that this private + endpoint should connect to. + :vartype group_ids: list[str] + :ivar request_message: A message passed to the owner of the remote resource with this + connection request. Restricted to 140 chars. + :vartype request_message: str + :ivar private_link_service_connection_state: A collection of read-only information about the + state of the connection to the remote resource. + :vartype private_link_service_connection_state: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_service_id': {'key': 'properties.privateLinkServiceId', 'type': 'str'}, + 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_link_service_id: Optional[str] = None, + group_ids: Optional[List[str]] = None, + request_message: Optional[str] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword private_link_service_id: The resource id of private link service. + :paramtype private_link_service_id: str + :keyword group_ids: The ID(s) of the group(s) obtained from the remote resource that this + private endpoint should connect to. + :paramtype group_ids: list[str] + :keyword request_message: A message passed to the owner of the remote resource with this + connection request. Restricted to 140 chars. + :paramtype request_message: str + :keyword private_link_service_connection_state: A collection of read-only information about the + state of the connection to the remote resource. + :paramtype private_link_service_connection_state: + ~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceConnectionState + """ + super(PrivateLinkServiceConnection, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.provisioning_state = None + self.private_link_service_id = private_link_service_id + self.group_ids = group_ids + self.request_message = request_message + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. + :vartype status: str + :ivar description: The reason for approval/rejection of the connection. + :vartype description: str + :ivar actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :vartype actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + **kwargs + ): + """ + :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the + owner of the service. + :paramtype status: str + :keyword description: The reason for approval/rejection of the connection. + :paramtype description: str + :keyword actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :paramtype actions_required: str + """ + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkServiceIpConfiguration(SubResource): + """The private link service ip configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of private link service ip configuration. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + :ivar private_ip_address: The private IP address of the IP configuration. + :vartype private_ip_address: str + :ivar private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar subnet: The reference to the subnet resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :ivar primary: Whether the ip configuration is primary or not. + :vartype primary: bool + :ivar provisioning_state: The provisioning state of the private link service IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. + Default is IPv4. Possible values include: "IPv4", "IPv6". + :vartype private_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["Subnet"] = None, + primary: Optional[bool] = None, + private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of private link service ip configuration. + :paramtype name: str + :keyword private_ip_address: The private IP address of the IP configuration. + :paramtype private_ip_address: str + :keyword private_ip_allocation_method: The private IP address allocation method. Possible + values include: "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword subnet: The reference to the subnet resource. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.Subnet + :keyword primary: Whether the ip configuration is primary or not. + :paramtype primary: bool + :keyword private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. + Default is IPv4. Possible values include: "IPv4", "IPv6". + :paramtype private_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + """ + super(PrivateLinkServiceIpConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.primary = primary + self.provisioning_state = None + self.private_ip_address_version = private_ip_address_version + + +class PrivateLinkServiceListResult(msrest.serialization.Model): + """Response for the ListPrivateLinkService API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of PrivateLinkService resources in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PrivateLinkService] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkService"]] = None, + **kwargs + ): + """ + :keyword value: A list of PrivateLinkService resources in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.PrivateLinkService] + """ + super(PrivateLinkServiceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ResourceSet(msrest.serialization.Model): + """The base resource set for visibility and auto-approval. + + :ivar subscriptions: The list of subscriptions. + :vartype subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + *, + subscriptions: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword subscriptions: The list of subscriptions. + :paramtype subscriptions: list[str] + """ + super(ResourceSet, self).__init__(**kwargs) + self.subscriptions = subscriptions + + +class PrivateLinkServicePropertiesAutoApproval(ResourceSet): + """The auto-approval list of the private link service. + + :ivar subscriptions: The list of subscriptions. + :vartype subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + *, + subscriptions: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword subscriptions: The list of subscriptions. + :paramtype subscriptions: list[str] + """ + super(PrivateLinkServicePropertiesAutoApproval, self).__init__(subscriptions=subscriptions, **kwargs) + + +class PrivateLinkServicePropertiesVisibility(ResourceSet): + """The visibility list of the private link service. + + :ivar subscriptions: The list of subscriptions. + :vartype subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + *, + subscriptions: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword subscriptions: The list of subscriptions. + :paramtype subscriptions: list[str] + """ + super(PrivateLinkServicePropertiesVisibility, self).__init__(subscriptions=subscriptions, **kwargs) + + +class PrivateLinkServiceVisibility(msrest.serialization.Model): + """Response for the CheckPrivateLinkServiceVisibility API service call. + + :ivar visible: Private Link Service Visibility (True/False). + :vartype visible: bool + """ + + _attribute_map = { + 'visible': {'key': 'visible', 'type': 'bool'}, + } + + def __init__( + self, + *, + visible: Optional[bool] = None, + **kwargs + ): + """ + :keyword visible: Private Link Service Visibility (True/False). + :paramtype visible: bool + """ + super(PrivateLinkServiceVisibility, self).__init__(**kwargs) + self.visible = visible + + +class Probe(SubResource): + """A load balancer probe. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within the set of probes used by the load + balancer. This name can be used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar load_balancing_rules: The load balancer rules that use this probe. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar protocol: The protocol of the end point. If 'Tcp' is specified, a received ACK is + required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response + from the specifies URI is required for the probe to be successful. Possible values include: + "Http", "Tcp", "Https". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ProbeProtocol + :ivar port: The port for communicating the probe. Possible values range from 1 to 65535, + inclusive. + :vartype port: int + :ivar interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint + for health status. Typically, the interval is slightly less than half the allocated timeout + period (in seconds) which allows two full probes before taking the instance out of rotation. + The default value is 15, the minimum value is 5. + :vartype interval_in_seconds: int + :ivar number_of_probes: The number of probes where if no response, will result in stopping + further traffic from being delivered to the endpoint. This values allows endpoints to be taken + out of rotation faster or slower than the typical times used in Azure. + :vartype number_of_probes: int + :ivar request_path: The URI used for requesting health status from the VM. Path is required if + a protocol is set to http. Otherwise, it is not allowed. There is no default value. + :vartype request_path: str + :ivar provisioning_state: The provisioning state of the probe resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, + 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, + 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + protocol: Optional[Union[str, "ProbeProtocol"]] = None, + port: Optional[int] = None, + interval_in_seconds: Optional[int] = None, + number_of_probes: Optional[int] = None, + request_path: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within the set of probes used by the + load balancer. This name can be used to access the resource. + :paramtype name: str + :keyword protocol: The protocol of the end point. If 'Tcp' is specified, a received ACK is + required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response + from the specifies URI is required for the probe to be successful. Possible values include: + "Http", "Tcp", "Https". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ProbeProtocol + :keyword port: The port for communicating the probe. Possible values range from 1 to 65535, + inclusive. + :paramtype port: int + :keyword interval_in_seconds: The interval, in seconds, for how frequently to probe the + endpoint for health status. Typically, the interval is slightly less than half the allocated + timeout period (in seconds) which allows two full probes before taking the instance out of + rotation. The default value is 15, the minimum value is 5. + :paramtype interval_in_seconds: int + :keyword number_of_probes: The number of probes where if no response, will result in stopping + further traffic from being delivered to the endpoint. This values allows endpoints to be taken + out of rotation faster or slower than the typical times used in Azure. + :paramtype number_of_probes: int + :keyword request_path: The URI used for requesting health status from the VM. Path is required + if a protocol is set to http. Otherwise, it is not allowed. There is no default value. + :paramtype request_path: str + """ + super(Probe, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.load_balancing_rules = None + self.protocol = protocol + self.port = port + self.interval_in_seconds = interval_in_seconds + self.number_of_probes = number_of_probes + self.request_path = request_path + self.provisioning_state = None + + +class PropagatedRouteTable(msrest.serialization.Model): + """The list of RouteTables to advertise the routes to. + + :ivar labels: The list of labels. + :vartype labels: list[str] + :ivar ids: The list of resource ids of all the RouteTables. + :vartype ids: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _attribute_map = { + 'labels': {'key': 'labels', 'type': '[str]'}, + 'ids': {'key': 'ids', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + labels: Optional[List[str]] = None, + ids: Optional[List["SubResource"]] = None, + **kwargs + ): + """ + :keyword labels: The list of labels. + :paramtype labels: list[str] + :keyword ids: The list of resource ids of all the RouteTables. + :paramtype ids: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + super(PropagatedRouteTable, self).__init__(**kwargs) + self.labels = labels + self.ids = ids + + +class ProtocolConfiguration(msrest.serialization.Model): + """Configuration of the protocol. + + :ivar http_configuration: HTTP configuration of the connectivity check. + :vartype http_configuration: ~azure.mgmt.network.v2021_08_01.models.HTTPConfiguration + """ + + _attribute_map = { + 'http_configuration': {'key': 'HTTPConfiguration', 'type': 'HTTPConfiguration'}, + } + + def __init__( + self, + *, + http_configuration: Optional["HTTPConfiguration"] = None, + **kwargs + ): + """ + :keyword http_configuration: HTTP configuration of the connectivity check. + :paramtype http_configuration: ~azure.mgmt.network.v2021_08_01.models.HTTPConfiguration + """ + super(ProtocolConfiguration, self).__init__(**kwargs) + self.http_configuration = http_configuration + + +class ProtocolCustomSettingsFormat(msrest.serialization.Model): + """DDoS custom policy properties. + + :ivar protocol: The protocol for which the DDoS protection policy is being customized. Possible + values include: "Tcp", "Udp", "Syn". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicyProtocol + :ivar trigger_rate_override: The customized DDoS protection trigger rate. + :vartype trigger_rate_override: str + :ivar source_rate_override: The customized DDoS protection source rate. + :vartype source_rate_override: str + :ivar trigger_sensitivity_override: The customized DDoS protection trigger rate sensitivity + degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger + rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less + sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. + normal traffic. Possible values include: "Relaxed", "Low", "Default", "High". + :vartype trigger_sensitivity_override: str or + ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicyTriggerSensitivityOverride + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'trigger_rate_override': {'key': 'triggerRateOverride', 'type': 'str'}, + 'source_rate_override': {'key': 'sourceRateOverride', 'type': 'str'}, + 'trigger_sensitivity_override': {'key': 'triggerSensitivityOverride', 'type': 'str'}, + } + + def __init__( + self, + *, + protocol: Optional[Union[str, "DdosCustomPolicyProtocol"]] = None, + trigger_rate_override: Optional[str] = None, + source_rate_override: Optional[str] = None, + trigger_sensitivity_override: Optional[Union[str, "DdosCustomPolicyTriggerSensitivityOverride"]] = None, + **kwargs + ): + """ + :keyword protocol: The protocol for which the DDoS protection policy is being customized. + Possible values include: "Tcp", "Udp", "Syn". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicyProtocol + :keyword trigger_rate_override: The customized DDoS protection trigger rate. + :paramtype trigger_rate_override: str + :keyword source_rate_override: The customized DDoS protection source rate. + :paramtype source_rate_override: str + :keyword trigger_sensitivity_override: The customized DDoS protection trigger rate sensitivity + degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger + rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less + sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. + normal traffic. Possible values include: "Relaxed", "Low", "Default", "High". + :paramtype trigger_sensitivity_override: str or + ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicyTriggerSensitivityOverride + """ + super(ProtocolCustomSettingsFormat, self).__init__(**kwargs) + self.protocol = protocol + self.trigger_rate_override = trigger_rate_override + self.source_rate_override = source_rate_override + self.trigger_sensitivity_override = trigger_sensitivity_override + + +class PublicIPAddress(Resource): + """Public IP address resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of the public ip address. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar sku: The public IP address SKU. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :vartype zones: list[str] + :ivar public_ip_allocation_method: The public IP address allocation method. Possible values + include: "Static", "Dynamic". + :vartype public_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar public_ip_address_version: The public IP address version. Possible values include: + "IPv4", "IPv6". + :vartype public_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :ivar ip_configuration: The IP configuration associated with the public IP address. + :vartype ip_configuration: ~azure.mgmt.network.v2021_08_01.models.IPConfiguration + :ivar dns_settings: The FQDN of the DNS record associated with the public IP address. + :vartype dns_settings: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressDnsSettings + :ivar ddos_settings: The DDoS protection custom policy associated with the public IP address. + :vartype ddos_settings: ~azure.mgmt.network.v2021_08_01.models.DdosSettings + :ivar ip_tags: The list of tags associated with the public IP address. + :vartype ip_tags: list[~azure.mgmt.network.v2021_08_01.models.IpTag] + :ivar ip_address: The IP address associated with the public IP address resource. + :vartype ip_address: str + :ivar public_ip_prefix: The Public IP Prefix this Public IP Address should be allocated from. + :vartype public_ip_prefix: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar idle_timeout_in_minutes: The idle timeout of the public IP address. + :vartype idle_timeout_in_minutes: int + :ivar resource_guid: The resource GUID property of the public IP address resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the public IP address resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar service_public_ip_address: The service public IP address of the public IP address + resource. + :vartype service_public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :ivar nat_gateway: The NatGateway for the Public IP address. + :vartype nat_gateway: ~azure.mgmt.network.v2021_08_01.models.NatGateway + :ivar migration_phase: Migration phase of Public IP Address. Possible values include: "None", + "Prepare", "Commit", "Abort", "Committed". + :vartype migration_phase: str or + ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressMigrationPhase + :ivar linked_public_ip_address: The linked public IP address of the public IP address resource. + :vartype linked_public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :ivar delete_option: Specify what happens to the public IP address when the VM using it is + deleted. Possible values include: "Delete", "Detach". + :vartype delete_option: str or ~azure.mgmt.network.v2021_08_01.models.DeleteOptions + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'ip_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, + 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, + 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, + 'ddos_settings': {'key': 'properties.ddosSettings', 'type': 'DdosSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'service_public_ip_address': {'key': 'properties.servicePublicIPAddress', 'type': 'PublicIPAddress'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'NatGateway'}, + 'migration_phase': {'key': 'properties.migrationPhase', 'type': 'str'}, + 'linked_public_ip_address': {'key': 'properties.linkedPublicIPAddress', 'type': 'PublicIPAddress'}, + 'delete_option': {'key': 'properties.deleteOption', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + sku: Optional["PublicIPAddressSku"] = None, + zones: Optional[List[str]] = None, + public_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + public_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + dns_settings: Optional["PublicIPAddressDnsSettings"] = None, + ddos_settings: Optional["DdosSettings"] = None, + ip_tags: Optional[List["IpTag"]] = None, + ip_address: Optional[str] = None, + public_ip_prefix: Optional["SubResource"] = None, + idle_timeout_in_minutes: Optional[int] = None, + service_public_ip_address: Optional["PublicIPAddress"] = None, + nat_gateway: Optional["NatGateway"] = None, + migration_phase: Optional[Union[str, "PublicIPAddressMigrationPhase"]] = None, + linked_public_ip_address: Optional["PublicIPAddress"] = None, + delete_option: Optional[Union[str, "DeleteOptions"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of the public ip address. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword sku: The public IP address SKU. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressSku + :keyword zones: A list of availability zones denoting the IP allocated for the resource needs + to come from. + :paramtype zones: list[str] + :keyword public_ip_allocation_method: The public IP address allocation method. Possible values + include: "Static", "Dynamic". + :paramtype public_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword public_ip_address_version: The public IP address version. Possible values include: + "IPv4", "IPv6". + :paramtype public_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :keyword dns_settings: The FQDN of the DNS record associated with the public IP address. + :paramtype dns_settings: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressDnsSettings + :keyword ddos_settings: The DDoS protection custom policy associated with the public IP + address. + :paramtype ddos_settings: ~azure.mgmt.network.v2021_08_01.models.DdosSettings + :keyword ip_tags: The list of tags associated with the public IP address. + :paramtype ip_tags: list[~azure.mgmt.network.v2021_08_01.models.IpTag] + :keyword ip_address: The IP address associated with the public IP address resource. + :paramtype ip_address: str + :keyword public_ip_prefix: The Public IP Prefix this Public IP Address should be allocated + from. + :paramtype public_ip_prefix: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword idle_timeout_in_minutes: The idle timeout of the public IP address. + :paramtype idle_timeout_in_minutes: int + :keyword service_public_ip_address: The service public IP address of the public IP address + resource. + :paramtype service_public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :keyword nat_gateway: The NatGateway for the Public IP address. + :paramtype nat_gateway: ~azure.mgmt.network.v2021_08_01.models.NatGateway + :keyword migration_phase: Migration phase of Public IP Address. Possible values include: + "None", "Prepare", "Commit", "Abort", "Committed". + :paramtype migration_phase: str or + ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressMigrationPhase + :keyword linked_public_ip_address: The linked public IP address of the public IP address + resource. + :paramtype linked_public_ip_address: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :keyword delete_option: Specify what happens to the public IP address when the VM using it is + deleted. Possible values include: "Delete", "Detach". + :paramtype delete_option: str or ~azure.mgmt.network.v2021_08_01.models.DeleteOptions + """ + super(PublicIPAddress, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.sku = sku + self.etag = None + self.zones = zones + self.public_ip_allocation_method = public_ip_allocation_method + self.public_ip_address_version = public_ip_address_version + self.ip_configuration = None + self.dns_settings = dns_settings + self.ddos_settings = ddos_settings + self.ip_tags = ip_tags + self.ip_address = ip_address + self.public_ip_prefix = public_ip_prefix + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.resource_guid = None + self.provisioning_state = None + self.service_public_ip_address = service_public_ip_address + self.nat_gateway = nat_gateway + self.migration_phase = migration_phase + self.linked_public_ip_address = linked_public_ip_address + self.delete_option = delete_option + + +class PublicIPAddressDnsSettings(msrest.serialization.Model): + """Contains FQDN of the DNS record associated with the public IP address. + + :ivar domain_name_label: The domain name label. The concatenation of the domain name label and + the regionalized DNS zone make up the fully qualified domain name associated with the public IP + address. If a domain name label is specified, an A DNS record is created for the public IP in + the Microsoft Azure DNS system. + :vartype domain_name_label: str + :ivar fqdn: The Fully Qualified Domain Name of the A DNS record associated with the public IP. + This is the concatenation of the domainNameLabel and the regionalized DNS zone. + :vartype fqdn: str + :ivar reverse_fqdn: The reverse FQDN. A user-visible, fully qualified domain name that resolves + to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created + pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + :vartype reverse_fqdn: str + """ + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + domain_name_label: Optional[str] = None, + fqdn: Optional[str] = None, + reverse_fqdn: Optional[str] = None, + **kwargs + ): + """ + :keyword domain_name_label: The domain name label. The concatenation of the domain name label + and the regionalized DNS zone make up the fully qualified domain name associated with the + public IP address. If a domain name label is specified, an A DNS record is created for the + public IP in the Microsoft Azure DNS system. + :paramtype domain_name_label: str + :keyword fqdn: The Fully Qualified Domain Name of the A DNS record associated with the public + IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. + :paramtype fqdn: str + :keyword reverse_fqdn: The reverse FQDN. A user-visible, fully qualified domain name that + resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is + created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + :paramtype reverse_fqdn: str + """ + super(PublicIPAddressDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label + self.fqdn = fqdn + self.reverse_fqdn = reverse_fqdn + + +class PublicIPAddressListResult(msrest.serialization.Model): + """Response for ListPublicIpAddresses API service call. + + :ivar value: A list of public IP addresses that exists in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PublicIPAddress] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PublicIPAddress"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of public IP addresses that exists in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.PublicIPAddress] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(PublicIPAddressListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PublicIPAddressSku(msrest.serialization.Model): + """SKU of a public IP address. + + :ivar name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". + :vartype name: str or ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressSkuName + :ivar tier: Tier of a public IP address SKU. Possible values include: "Regional", "Global". + :vartype tier: str or ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "PublicIPAddressSkuName"]] = None, + tier: Optional[Union[str, "PublicIPAddressSkuTier"]] = None, + **kwargs + ): + """ + :keyword name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". + :paramtype name: str or ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressSkuName + :keyword tier: Tier of a public IP address SKU. Possible values include: "Regional", "Global". + :paramtype tier: str or ~azure.mgmt.network.v2021_08_01.models.PublicIPAddressSkuTier + """ + super(PublicIPAddressSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class PublicIPPrefix(Resource): + """Public IP prefix resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of the public ip address. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar sku: The public IP prefix SKU. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :vartype zones: list[str] + :ivar public_ip_address_version: The public IP address version. Possible values include: + "IPv4", "IPv6". + :vartype public_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :ivar ip_tags: The list of tags associated with the public IP prefix. + :vartype ip_tags: list[~azure.mgmt.network.v2021_08_01.models.IpTag] + :ivar prefix_length: The Length of the Public IP Prefix. + :vartype prefix_length: int + :ivar ip_prefix: The allocated Prefix. + :vartype ip_prefix: str + :ivar public_ip_addresses: The list of all referenced PublicIPAddresses. + :vartype public_ip_addresses: + list[~azure.mgmt.network.v2021_08_01.models.ReferencedPublicIpAddress] + :ivar load_balancer_frontend_ip_configuration: The reference to load balancer frontend IP + configuration associated with the public IP prefix. + :vartype load_balancer_frontend_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar custom_ip_prefix: The customIpPrefix that this prefix is associated with. + :vartype custom_ip_prefix: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar resource_guid: The resource GUID property of the public IP prefix resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the public IP prefix resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar nat_gateway: NatGateway of Public IP Prefix. + :vartype nat_gateway: ~azure.mgmt.network.v2021_08_01.models.NatGateway + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'ip_prefix': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'load_balancer_frontend_ip_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'PublicIPPrefixSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, + 'prefix_length': {'key': 'properties.prefixLength', 'type': 'int'}, + 'ip_prefix': {'key': 'properties.ipPrefix', 'type': 'str'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[ReferencedPublicIpAddress]'}, + 'load_balancer_frontend_ip_configuration': {'key': 'properties.loadBalancerFrontendIpConfiguration', 'type': 'SubResource'}, + 'custom_ip_prefix': {'key': 'properties.customIPPrefix', 'type': 'SubResource'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'NatGateway'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + sku: Optional["PublicIPPrefixSku"] = None, + zones: Optional[List[str]] = None, + public_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + ip_tags: Optional[List["IpTag"]] = None, + prefix_length: Optional[int] = None, + custom_ip_prefix: Optional["SubResource"] = None, + nat_gateway: Optional["NatGateway"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of the public ip address. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword sku: The public IP prefix SKU. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixSku + :keyword zones: A list of availability zones denoting the IP allocated for the resource needs + to come from. + :paramtype zones: list[str] + :keyword public_ip_address_version: The public IP address version. Possible values include: + "IPv4", "IPv6". + :paramtype public_ip_address_version: str or ~azure.mgmt.network.v2021_08_01.models.IPVersion + :keyword ip_tags: The list of tags associated with the public IP prefix. + :paramtype ip_tags: list[~azure.mgmt.network.v2021_08_01.models.IpTag] + :keyword prefix_length: The Length of the Public IP Prefix. + :paramtype prefix_length: int + :keyword custom_ip_prefix: The customIpPrefix that this prefix is associated with. + :paramtype custom_ip_prefix: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword nat_gateway: NatGateway of Public IP Prefix. + :paramtype nat_gateway: ~azure.mgmt.network.v2021_08_01.models.NatGateway + """ + super(PublicIPPrefix, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.sku = sku + self.etag = None + self.zones = zones + self.public_ip_address_version = public_ip_address_version + self.ip_tags = ip_tags + self.prefix_length = prefix_length + self.ip_prefix = None + self.public_ip_addresses = None + self.load_balancer_frontend_ip_configuration = None + self.custom_ip_prefix = custom_ip_prefix + self.resource_guid = None + self.provisioning_state = None + self.nat_gateway = nat_gateway + + +class PublicIPPrefixListResult(msrest.serialization.Model): + """Response for ListPublicIpPrefixes API service call. + + :ivar value: A list of public IP prefixes that exists in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PublicIPPrefix]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PublicIPPrefix"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of public IP prefixes that exists in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(PublicIPPrefixListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PublicIPPrefixSku(msrest.serialization.Model): + """SKU of a public IP prefix. + + :ivar name: Name of a public IP prefix SKU. Possible values include: "Standard". + :vartype name: str or ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixSkuName + :ivar tier: Tier of a public IP prefix SKU. Possible values include: "Regional", "Global". + :vartype tier: str or ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "PublicIPPrefixSkuName"]] = None, + tier: Optional[Union[str, "PublicIPPrefixSkuTier"]] = None, + **kwargs + ): + """ + :keyword name: Name of a public IP prefix SKU. Possible values include: "Standard". + :paramtype name: str or ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixSkuName + :keyword tier: Tier of a public IP prefix SKU. Possible values include: "Regional", "Global". + :paramtype tier: str or ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixSkuTier + """ + super(PublicIPPrefixSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class QosDefinition(msrest.serialization.Model): + """Quality of Service defines the traffic configuration between endpoints. Mandatory to have one marking. + + :ivar markings: List of markings to be used in the configuration. + :vartype markings: list[int] + :ivar source_ip_ranges: Source IP ranges. + :vartype source_ip_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosIpRange] + :ivar destination_ip_ranges: Destination IP ranges. + :vartype destination_ip_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosIpRange] + :ivar source_port_ranges: Sources port ranges. + :vartype source_port_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosPortRange] + :ivar destination_port_ranges: Destination port ranges. + :vartype destination_port_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosPortRange] + :ivar protocol: RNM supported protocol types. Possible values include: "DoNotUse", "Icmp", + "Tcp", "Udp", "Gre", "Esp", "Ah", "Vxlan", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ProtocolType + """ + + _attribute_map = { + 'markings': {'key': 'markings', 'type': '[int]'}, + 'source_ip_ranges': {'key': 'sourceIpRanges', 'type': '[QosIpRange]'}, + 'destination_ip_ranges': {'key': 'destinationIpRanges', 'type': '[QosIpRange]'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[QosPortRange]'}, + 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[QosPortRange]'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + } + + def __init__( + self, + *, + markings: Optional[List[int]] = None, + source_ip_ranges: Optional[List["QosIpRange"]] = None, + destination_ip_ranges: Optional[List["QosIpRange"]] = None, + source_port_ranges: Optional[List["QosPortRange"]] = None, + destination_port_ranges: Optional[List["QosPortRange"]] = None, + protocol: Optional[Union[str, "ProtocolType"]] = None, + **kwargs + ): + """ + :keyword markings: List of markings to be used in the configuration. + :paramtype markings: list[int] + :keyword source_ip_ranges: Source IP ranges. + :paramtype source_ip_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosIpRange] + :keyword destination_ip_ranges: Destination IP ranges. + :paramtype destination_ip_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosIpRange] + :keyword source_port_ranges: Sources port ranges. + :paramtype source_port_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosPortRange] + :keyword destination_port_ranges: Destination port ranges. + :paramtype destination_port_ranges: list[~azure.mgmt.network.v2021_08_01.models.QosPortRange] + :keyword protocol: RNM supported protocol types. Possible values include: "DoNotUse", "Icmp", + "Tcp", "Udp", "Gre", "Esp", "Ah", "Vxlan", "All". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.ProtocolType + """ + super(QosDefinition, self).__init__(**kwargs) + self.markings = markings + self.source_ip_ranges = source_ip_ranges + self.destination_ip_ranges = destination_ip_ranges + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.protocol = protocol + + +class QosIpRange(msrest.serialization.Model): + """Qos Traffic Profiler IP Range properties. + + :ivar start_ip: Start IP Address. + :vartype start_ip: str + :ivar end_ip: End IP Address. + :vartype end_ip: str + """ + + _attribute_map = { + 'start_ip': {'key': 'startIP', 'type': 'str'}, + 'end_ip': {'key': 'endIP', 'type': 'str'}, + } + + def __init__( + self, + *, + start_ip: Optional[str] = None, + end_ip: Optional[str] = None, + **kwargs + ): + """ + :keyword start_ip: Start IP Address. + :paramtype start_ip: str + :keyword end_ip: End IP Address. + :paramtype end_ip: str + """ + super(QosIpRange, self).__init__(**kwargs) + self.start_ip = start_ip + self.end_ip = end_ip + + +class QosPortRange(msrest.serialization.Model): + """Qos Traffic Profiler Port range properties. + + :ivar start: Qos Port Range start. + :vartype start: int + :ivar end: Qos Port Range end. + :vartype end: int + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'int'}, + 'end': {'key': 'end', 'type': 'int'}, + } + + def __init__( + self, + *, + start: Optional[int] = None, + end: Optional[int] = None, + **kwargs + ): + """ + :keyword start: Qos Port Range start. + :paramtype start: int + :keyword end: Qos Port Range end. + :paramtype end: int + """ + super(QosPortRange, self).__init__(**kwargs) + self.start = start + self.end = end + + +class QueryInboundNatRulePortMappingRequest(msrest.serialization.Model): + """The request for a QueryInboundNatRulePortMapping API. Either IpConfiguration or IpAddress should be set. + + :ivar ip_configuration: NetworkInterfaceIPConfiguration set in load balancer backend address. + :vartype ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar ip_address: IP address set in load balancer backend address. + :vartype ip_address: str + """ + + _attribute_map = { + 'ip_configuration': {'key': 'ipConfiguration', 'type': 'SubResource'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_configuration: Optional["SubResource"] = None, + ip_address: Optional[str] = None, + **kwargs + ): + """ + :keyword ip_configuration: NetworkInterfaceIPConfiguration set in load balancer backend + address. + :paramtype ip_configuration: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword ip_address: IP address set in load balancer backend address. + :paramtype ip_address: str + """ + super(QueryInboundNatRulePortMappingRequest, self).__init__(**kwargs) + self.ip_configuration = ip_configuration + self.ip_address = ip_address + + +class QueryResults(msrest.serialization.Model): + """Query result. + + :ivar matching_records_count: Number of total records matching the query. + :vartype matching_records_count: long + :ivar signatures: Array containing the results of the query. + :vartype signatures: list[~azure.mgmt.network.v2021_08_01.models.SingleQueryResult] + """ + + _attribute_map = { + 'matching_records_count': {'key': 'matchingRecordsCount', 'type': 'long'}, + 'signatures': {'key': 'signatures', 'type': '[SingleQueryResult]'}, + } + + def __init__( + self, + *, + matching_records_count: Optional[int] = None, + signatures: Optional[List["SingleQueryResult"]] = None, + **kwargs + ): + """ + :keyword matching_records_count: Number of total records matching the query. + :paramtype matching_records_count: long + :keyword signatures: Array containing the results of the query. + :paramtype signatures: list[~azure.mgmt.network.v2021_08_01.models.SingleQueryResult] + """ + super(QueryResults, self).__init__(**kwargs) + self.matching_records_count = matching_records_count + self.signatures = signatures + + +class QueryTroubleshootingParameters(msrest.serialization.Model): + """Parameters that define the resource to query the troubleshooting result. + + All required parameters must be populated in order to send to Azure. + + :ivar target_resource_id: Required. The target resource ID to query the troubleshooting result. + :vartype target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + **kwargs + ): + """ + :keyword target_resource_id: Required. The target resource ID to query the troubleshooting + result. + :paramtype target_resource_id: str + """ + super(QueryTroubleshootingParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + + +class RadiusServer(msrest.serialization.Model): + """Radius Server Settings. + + All required parameters must be populated in order to send to Azure. + + :ivar radius_server_address: Required. The address of this radius server. + :vartype radius_server_address: str + :ivar radius_server_score: The initial score assigned to this radius server. + :vartype radius_server_score: long + :ivar radius_server_secret: The secret used for this radius server. + :vartype radius_server_secret: str + """ + + _validation = { + 'radius_server_address': {'required': True}, + } + + _attribute_map = { + 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, + 'radius_server_score': {'key': 'radiusServerScore', 'type': 'long'}, + 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, + } + + def __init__( + self, + *, + radius_server_address: str, + radius_server_score: Optional[int] = None, + radius_server_secret: Optional[str] = None, + **kwargs + ): + """ + :keyword radius_server_address: Required. The address of this radius server. + :paramtype radius_server_address: str + :keyword radius_server_score: The initial score assigned to this radius server. + :paramtype radius_server_score: long + :keyword radius_server_secret: The secret used for this radius server. + :paramtype radius_server_secret: str + """ + super(RadiusServer, self).__init__(**kwargs) + self.radius_server_address = radius_server_address + self.radius_server_score = radius_server_score + self.radius_server_secret = radius_server_secret + + +class RecordSet(msrest.serialization.Model): + """A collective group of information about the record set information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar record_type: Resource record type. + :vartype record_type: str + :ivar record_set_name: Recordset name. + :vartype record_set_name: str + :ivar fqdn: Fqdn that resolves to private endpoint ip address. + :vartype fqdn: str + :ivar provisioning_state: The provisioning state of the recordset. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar ttl: Recordset time to live. + :vartype ttl: int + :ivar ip_addresses: The private ip address of the private endpoint. + :vartype ip_addresses: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'record_type': {'key': 'recordType', 'type': 'str'}, + 'record_set_name': {'key': 'recordSetName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'ttl': {'key': 'ttl', 'type': 'int'}, + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + record_type: Optional[str] = None, + record_set_name: Optional[str] = None, + fqdn: Optional[str] = None, + ttl: Optional[int] = None, + ip_addresses: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword record_type: Resource record type. + :paramtype record_type: str + :keyword record_set_name: Recordset name. + :paramtype record_set_name: str + :keyword fqdn: Fqdn that resolves to private endpoint ip address. + :paramtype fqdn: str + :keyword ttl: Recordset time to live. + :paramtype ttl: int + :keyword ip_addresses: The private ip address of the private endpoint. + :paramtype ip_addresses: list[str] + """ + super(RecordSet, self).__init__(**kwargs) + self.record_type = record_type + self.record_set_name = record_set_name + self.fqdn = fqdn + self.provisioning_state = None + self.ttl = ttl + self.ip_addresses = ip_addresses + + +class ReferencedPublicIpAddress(msrest.serialization.Model): + """Reference to a public IP address. + + :ivar id: The PublicIPAddress Reference. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: The PublicIPAddress Reference. + :paramtype id: str + """ + super(ReferencedPublicIpAddress, self).__init__(**kwargs) + self.id = id + + +class ResourceNavigationLink(SubResource): + """ResourceNavigationLink resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar linked_resource_type: Resource type of the linked resource. + :vartype linked_resource_type: str + :ivar link: Link to the external resource. + :vartype link: str + :ivar provisioning_state: The provisioning state of the resource navigation link resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, + 'link': {'key': 'properties.link', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + linked_resource_type: Optional[str] = None, + link: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the resource that is unique within a resource group. This name can be + used to access the resource. + :paramtype name: str + :keyword linked_resource_type: Resource type of the linked resource. + :paramtype linked_resource_type: str + :keyword link: Link to the external resource. + :paramtype link: str + """ + super(ResourceNavigationLink, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.linked_resource_type = linked_resource_type + self.link = link + self.provisioning_state = None + + +class ResourceNavigationLinksListResult(msrest.serialization.Model): + """Response for ResourceNavigationLinks_List operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The resource navigation links in a subnet. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ResourceNavigationLink] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceNavigationLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ResourceNavigationLink"]] = None, + **kwargs + ): + """ + :keyword value: The resource navigation links in a subnet. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ResourceNavigationLink] + """ + super(ResourceNavigationLinksListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class RetentionPolicyParameters(msrest.serialization.Model): + """Parameters that define the retention policy for flow log. + + :ivar days: Number of days to retain flow log records. + :vartype days: int + :ivar enabled: Flag to enable/disable retention. + :vartype enabled: bool + """ + + _attribute_map = { + 'days': {'key': 'days', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + days: Optional[int] = 0, + enabled: Optional[bool] = False, + **kwargs + ): + """ + :keyword days: Number of days to retain flow log records. + :paramtype days: int + :keyword enabled: Flag to enable/disable retention. + :paramtype enabled: bool + """ + super(RetentionPolicyParameters, self).__init__(**kwargs) + self.days = days + self.enabled = enabled + + +class Route(SubResource): + """Route resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The type of the resource. + :vartype type: str + :ivar address_prefix: The destination CIDR to which the route applies. + :vartype address_prefix: str + :ivar next_hop_type: The type of Azure hop the packet should be sent to. Possible values + include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". + :vartype next_hop_type: str or ~azure.mgmt.network.v2021_08_01.models.RouteNextHopType + :ivar next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are + only allowed in routes where the next hop type is VirtualAppliance. + :vartype next_hop_ip_address: str + :ivar provisioning_state: The provisioning state of the route resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar has_bgp_override: A value indicating whether this route overrides overlapping BGP routes + regardless of LPM. + :vartype has_bgp_override: bool + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, + 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'has_bgp_override': {'key': 'properties.hasBgpOverride', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + address_prefix: Optional[str] = None, + next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, + next_hop_ip_address: Optional[str] = None, + has_bgp_override: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword type: The type of the resource. + :paramtype type: str + :keyword address_prefix: The destination CIDR to which the route applies. + :paramtype address_prefix: str + :keyword next_hop_type: The type of Azure hop the packet should be sent to. Possible values + include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". + :paramtype next_hop_type: str or ~azure.mgmt.network.v2021_08_01.models.RouteNextHopType + :keyword next_hop_ip_address: The IP address packets should be forwarded to. Next hop values + are only allowed in routes where the next hop type is VirtualAppliance. + :paramtype next_hop_ip_address: str + :keyword has_bgp_override: A value indicating whether this route overrides overlapping BGP + routes regardless of LPM. + :paramtype has_bgp_override: bool + """ + super(Route, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.address_prefix = address_prefix + self.next_hop_type = next_hop_type + self.next_hop_ip_address = next_hop_ip_address + self.provisioning_state = None + self.has_bgp_override = has_bgp_override + + +class RouteFilter(Resource): + """Route Filter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar rules: Collection of RouteFilterRules contained within a route filter. + :vartype rules: list[~azure.mgmt.network.v2021_08_01.models.RouteFilterRule] + :ivar peerings: A collection of references to express route circuit peerings. + :vartype peerings: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :ivar ipv6_peerings: A collection of references to express route circuit ipv6 peerings. + :vartype ipv6_peerings: list[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :ivar provisioning_state: The provisioning state of the route filter resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'peerings': {'readonly': True}, + 'ipv6_peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'ipv6_peerings': {'key': 'properties.ipv6Peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + rules: Optional[List["RouteFilterRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword rules: Collection of RouteFilterRules contained within a route filter. + :paramtype rules: list[~azure.mgmt.network.v2021_08_01.models.RouteFilterRule] + """ + super(RouteFilter, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.rules = rules + self.peerings = None + self.ipv6_peerings = None + self.provisioning_state = None + + +class RouteFilterListResult(msrest.serialization.Model): + """Response for the ListRouteFilters API service call. + + :ivar value: A list of route filters in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.RouteFilter] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteFilter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RouteFilter"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of route filters in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.RouteFilter] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(RouteFilterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RouteFilterRule(SubResource): + """Route Filter Rule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar access: The access type of the rule. Possible values include: "Allow", "Deny". + :vartype access: str or ~azure.mgmt.network.v2021_08_01.models.Access + :ivar route_filter_rule_type: The rule type of the rule. Possible values include: "Community". + :vartype route_filter_rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.RouteFilterRuleType + :ivar communities: The collection for bgp community values to filter on. e.g. + ['12076:5010','12076:5020']. + :vartype communities: list[str] + :ivar provisioning_state: The provisioning state of the route filter rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, + 'communities': {'key': 'properties.communities', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + location: Optional[str] = None, + access: Optional[Union[str, "Access"]] = None, + route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, + communities: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword location: Resource location. + :paramtype location: str + :keyword access: The access type of the rule. Possible values include: "Allow", "Deny". + :paramtype access: str or ~azure.mgmt.network.v2021_08_01.models.Access + :keyword route_filter_rule_type: The rule type of the rule. Possible values include: + "Community". + :paramtype route_filter_rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.RouteFilterRuleType + :keyword communities: The collection for bgp community values to filter on. e.g. + ['12076:5010','12076:5020']. + :paramtype communities: list[str] + """ + super(RouteFilterRule, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.etag = None + self.access = access + self.route_filter_rule_type = route_filter_rule_type + self.communities = communities + self.provisioning_state = None + + +class RouteFilterRuleListResult(msrest.serialization.Model): + """Response for the ListRouteFilterRules API service call. + + :ivar value: A list of RouteFilterRules in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.RouteFilterRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RouteFilterRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of RouteFilterRules in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.RouteFilterRule] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(RouteFilterRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RouteListResult(msrest.serialization.Model): + """Response for the ListRoute API service call. + + :ivar value: A list of routes in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.Route] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Route]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Route"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of routes in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.Route] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(RouteListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RouteTable(Resource): + """Route table resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar routes: Collection of routes contained within a route table. + :vartype routes: list[~azure.mgmt.network.v2021_08_01.models.Route] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_08_01.models.Subnet] + :ivar disable_bgp_route_propagation: Whether to disable the routes learned by BGP on that route + table. True means disable. + :vartype disable_bgp_route_propagation: bool + :ivar provisioning_state: The provisioning state of the route table resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar resource_guid: The resource GUID property of the route table. + :vartype resource_guid: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnets': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[Route]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'disable_bgp_route_propagation': {'key': 'properties.disableBgpRoutePropagation', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + routes: Optional[List["Route"]] = None, + disable_bgp_route_propagation: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword routes: Collection of routes contained within a route table. + :paramtype routes: list[~azure.mgmt.network.v2021_08_01.models.Route] + :keyword disable_bgp_route_propagation: Whether to disable the routes learned by BGP on that + route table. True means disable. + :paramtype disable_bgp_route_propagation: bool + """ + super(RouteTable, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.routes = routes + self.subnets = None + self.disable_bgp_route_propagation = disable_bgp_route_propagation + self.provisioning_state = None + self.resource_guid = None + + +class RouteTableListResult(msrest.serialization.Model): + """Response for the ListRouteTable API service call. + + :ivar value: A list of route tables in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.RouteTable] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RouteTable"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of route tables in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.RouteTable] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(RouteTableListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RoutingConfiguration(msrest.serialization.Model): + """Routing Configuration indicating the associated and propagated route tables for this connection. + + :ivar associated_route_table: The resource id RouteTable associated with this + RoutingConfiguration. + :vartype associated_route_table: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar propagated_route_tables: The list of RouteTables to advertise the routes to. + :vartype propagated_route_tables: ~azure.mgmt.network.v2021_08_01.models.PropagatedRouteTable + :ivar vnet_routes: List of routes that control routing from VirtualHub into a virtual network + connection. + :vartype vnet_routes: ~azure.mgmt.network.v2021_08_01.models.VnetRoute + """ + + _attribute_map = { + 'associated_route_table': {'key': 'associatedRouteTable', 'type': 'SubResource'}, + 'propagated_route_tables': {'key': 'propagatedRouteTables', 'type': 'PropagatedRouteTable'}, + 'vnet_routes': {'key': 'vnetRoutes', 'type': 'VnetRoute'}, + } + + def __init__( + self, + *, + associated_route_table: Optional["SubResource"] = None, + propagated_route_tables: Optional["PropagatedRouteTable"] = None, + vnet_routes: Optional["VnetRoute"] = None, + **kwargs + ): + """ + :keyword associated_route_table: The resource id RouteTable associated with this + RoutingConfiguration. + :paramtype associated_route_table: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword propagated_route_tables: The list of RouteTables to advertise the routes to. + :paramtype propagated_route_tables: ~azure.mgmt.network.v2021_08_01.models.PropagatedRouteTable + :keyword vnet_routes: List of routes that control routing from VirtualHub into a virtual + network connection. + :paramtype vnet_routes: ~azure.mgmt.network.v2021_08_01.models.VnetRoute + """ + super(RoutingConfiguration, self).__init__(**kwargs) + self.associated_route_table = associated_route_table + self.propagated_route_tables = propagated_route_tables + self.vnet_routes = vnet_routes + + +class RoutingIntent(SubResource): + """The routing intent child resource of a Virtual hub. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar routing_policies: List of routing policies. + :vartype routing_policies: list[~azure.mgmt.network.v2021_08_01.models.RoutingPolicy] + :ivar provisioning_state: The provisioning state of the RoutingIntent resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'routing_policies': {'key': 'properties.routingPolicies', 'type': '[RoutingPolicy]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + routing_policies: Optional[List["RoutingPolicy"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword routing_policies: List of routing policies. + :paramtype routing_policies: list[~azure.mgmt.network.v2021_08_01.models.RoutingPolicy] + """ + super(RoutingIntent, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.routing_policies = routing_policies + self.provisioning_state = None + + +class RoutingPolicy(msrest.serialization.Model): + """The routing policy object used in a RoutingIntent resource. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The unique name for the routing policy. + :vartype name: str + :ivar destinations: Required. List of all destinations which this routing policy is applicable + to (for example: Internet, PrivateTraffic). + :vartype destinations: list[str] + :ivar next_hop: Required. The next hop resource id on which this routing policy is applicable + to. + :vartype next_hop: str + """ + + _validation = { + 'name': {'required': True}, + 'destinations': {'required': True}, + 'next_hop': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + destinations: List[str], + next_hop: str, + **kwargs + ): + """ + :keyword name: Required. The unique name for the routing policy. + :paramtype name: str + :keyword destinations: Required. List of all destinations which this routing policy is + applicable to (for example: Internet, PrivateTraffic). + :paramtype destinations: list[str] + :keyword next_hop: Required. The next hop resource id on which this routing policy is + applicable to. + :paramtype next_hop: str + """ + super(RoutingPolicy, self).__init__(**kwargs) + self.name = name + self.destinations = destinations + self.next_hop = next_hop + + +class SecurityGroupNetworkInterface(msrest.serialization.Model): + """Network interface and all its associated security rules. + + :ivar id: ID of the network interface. + :vartype id: str + :ivar security_rule_associations: All security rules associated with the network interface. + :vartype security_rule_associations: + ~azure.mgmt.network.v2021_08_01.models.SecurityRuleAssociations + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + security_rule_associations: Optional["SecurityRuleAssociations"] = None, + **kwargs + ): + """ + :keyword id: ID of the network interface. + :paramtype id: str + :keyword security_rule_associations: All security rules associated with the network interface. + :paramtype security_rule_associations: + ~azure.mgmt.network.v2021_08_01.models.SecurityRuleAssociations + """ + super(SecurityGroupNetworkInterface, self).__init__(**kwargs) + self.id = id + self.security_rule_associations = security_rule_associations + + +class SecurityGroupViewParameters(msrest.serialization.Model): + """Parameters that define the VM to check security groups for. + + All required parameters must be populated in order to send to Azure. + + :ivar target_resource_id: Required. ID of the target VM. + :vartype target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + **kwargs + ): + """ + :keyword target_resource_id: Required. ID of the target VM. + :paramtype target_resource_id: str + """ + super(SecurityGroupViewParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + + +class SecurityGroupViewResult(msrest.serialization.Model): + """The information about security rules applied to the specified VM. + + :ivar network_interfaces: List of network interfaces on the specified VM. + :vartype network_interfaces: + list[~azure.mgmt.network.v2021_08_01.models.SecurityGroupNetworkInterface] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, + } + + def __init__( + self, + *, + network_interfaces: Optional[List["SecurityGroupNetworkInterface"]] = None, + **kwargs + ): + """ + :keyword network_interfaces: List of network interfaces on the specified VM. + :paramtype network_interfaces: + list[~azure.mgmt.network.v2021_08_01.models.SecurityGroupNetworkInterface] + """ + super(SecurityGroupViewResult, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class SecurityPartnerProvider(Resource): + """Security Partner Provider resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the Security Partner Provider resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar security_provider_name: The security provider name. Possible values include: "ZScaler", + "IBoss", "Checkpoint". + :vartype security_provider_name: str or + ~azure.mgmt.network.v2021_08_01.models.SecurityProviderName + :ivar connection_status: The connection status with the Security Partner Provider. Possible + values include: "Unknown", "PartiallyConnected", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProviderConnectionStatus + :ivar virtual_hub: The virtualHub to which the Security Partner Provider belongs. + :vartype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'connection_status': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'security_provider_name': {'key': 'properties.securityProviderName', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + security_provider_name: Optional[Union[str, "SecurityProviderName"]] = None, + virtual_hub: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword security_provider_name: The security provider name. Possible values include: + "ZScaler", "IBoss", "Checkpoint". + :paramtype security_provider_name: str or + ~azure.mgmt.network.v2021_08_01.models.SecurityProviderName + :keyword virtual_hub: The virtualHub to which the Security Partner Provider belongs. + :paramtype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(SecurityPartnerProvider, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.provisioning_state = None + self.security_provider_name = security_provider_name + self.connection_status = None + self.virtual_hub = virtual_hub + + +class SecurityPartnerProviderListResult(msrest.serialization.Model): + """Response for ListSecurityPartnerProviders API service call. + + :ivar value: List of Security Partner Providers in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityPartnerProvider]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["SecurityPartnerProvider"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Security Partner Providers in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(SecurityPartnerProviderListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SecurityRule(SubResource): + """Network security rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The type of the resource. + :vartype type: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "*", "Ah". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleProtocol + :ivar source_port_range: The source port or range. Integer or range between 0 and 65535. + Asterisk '*' can also be used to match all ports. + :vartype source_port_range: str + :ivar destination_port_range: The destination port or range. Integer or range between 0 and + 65535. Asterisk '*' can also be used to match all ports. + :vartype destination_port_range: str + :ivar source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to + match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' + can also be used. If this is an ingress rule, specifies where network traffic originates from. + :vartype source_address_prefix: str + :ivar source_address_prefixes: The CIDR or source IP ranges. + :vartype source_address_prefixes: list[str] + :ivar source_application_security_groups: The application security group specified as source. + :vartype source_application_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :ivar destination_address_prefix: The destination address prefix. CIDR or destination IP range. + Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', + 'AzureLoadBalancer' and 'Internet' can also be used. + :vartype destination_address_prefix: str + :ivar destination_address_prefixes: The destination address prefixes. CIDR or destination IP + ranges. + :vartype destination_address_prefixes: list[str] + :ivar destination_application_security_groups: The application security group specified as + destination. + :vartype destination_application_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: The network traffic is allowed or denied. Possible values include: "Allow", + "Deny". + :vartype access: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleAccess + :ivar priority: The priority of the rule. The value can be between 100 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: The direction of the rule. The direction specifies if rule will be evaluated + on incoming or outgoing traffic. Possible values include: "Inbound", "Outbound". + :vartype direction: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleDirection + :ivar provisioning_state: The provisioning state of the security rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, + 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, + 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, + 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, + 'source_application_security_groups': {'key': 'properties.sourceApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, + 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, + 'destination_application_security_groups': {'key': 'properties.destinationApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityRuleProtocol"]] = None, + source_port_range: Optional[str] = None, + destination_port_range: Optional[str] = None, + source_address_prefix: Optional[str] = None, + source_address_prefixes: Optional[List[str]] = None, + source_application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, + destination_address_prefix: Optional[str] = None, + destination_address_prefixes: Optional[List[str]] = None, + destination_application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityRuleDirection"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword type: The type of the resource. + :paramtype type: str + :keyword description: A description for this rule. Restricted to 140 chars. + :paramtype description: str + :keyword protocol: Network protocol this rule applies to. Possible values include: "Tcp", + "Udp", "Icmp", "Esp", "*", "Ah". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleProtocol + :keyword source_port_range: The source port or range. Integer or range between 0 and 65535. + Asterisk '*' can also be used to match all ports. + :paramtype source_port_range: str + :keyword destination_port_range: The destination port or range. Integer or range between 0 and + 65535. Asterisk '*' can also be used to match all ports. + :paramtype destination_port_range: str + :keyword source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to + match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' + can also be used. If this is an ingress rule, specifies where network traffic originates from. + :paramtype source_address_prefix: str + :keyword source_address_prefixes: The CIDR or source IP ranges. + :paramtype source_address_prefixes: list[str] + :keyword source_application_security_groups: The application security group specified as + source. + :paramtype source_application_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :keyword destination_address_prefix: The destination address prefix. CIDR or destination IP + range. Asterisk '*' can also be used to match all source IPs. Default tags such as + 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + :paramtype destination_address_prefix: str + :keyword destination_address_prefixes: The destination address prefixes. CIDR or destination IP + ranges. + :paramtype destination_address_prefixes: list[str] + :keyword destination_application_security_groups: The application security group specified as + destination. + :paramtype destination_application_security_groups: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :keyword source_port_ranges: The source port ranges. + :paramtype source_port_ranges: list[str] + :keyword destination_port_ranges: The destination port ranges. + :paramtype destination_port_ranges: list[str] + :keyword access: The network traffic is allowed or denied. Possible values include: "Allow", + "Deny". + :paramtype access: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleAccess + :keyword priority: The priority of the rule. The value can be between 100 and 4096. The + priority number must be unique for each rule in the collection. The lower the priority number, + the higher the priority of the rule. + :paramtype priority: int + :keyword direction: The direction of the rule. The direction specifies if rule will be + evaluated on incoming or outgoing traffic. Possible values include: "Inbound", "Outbound". + :paramtype direction: str or ~azure.mgmt.network.v2021_08_01.models.SecurityRuleDirection + """ + super(SecurityRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.description = description + self.protocol = protocol + self.source_port_range = source_port_range + self.destination_port_range = destination_port_range + self.source_address_prefix = source_address_prefix + self.source_address_prefixes = source_address_prefixes + self.source_application_security_groups = source_application_security_groups + self.destination_address_prefix = destination_address_prefix + self.destination_address_prefixes = destination_address_prefixes + self.destination_application_security_groups = destination_application_security_groups + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.access = access + self.priority = priority + self.direction = direction + self.provisioning_state = None + + +class SecurityRuleAssociations(msrest.serialization.Model): + """All security rules associated with the network interface. + + :ivar network_interface_association: Network interface and it's custom security rules. + :vartype network_interface_association: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceAssociation + :ivar subnet_association: Subnet and it's custom security rules. + :vartype subnet_association: ~azure.mgmt.network.v2021_08_01.models.SubnetAssociation + :ivar default_security_rules: Collection of default security rules of the network security + group. + :vartype default_security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + :ivar effective_security_rules: Collection of effective security rules. + :vartype effective_security_rules: + list[~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityRule] + """ + + _attribute_map = { + 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, + 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, + 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, + 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, + } + + def __init__( + self, + *, + network_interface_association: Optional["NetworkInterfaceAssociation"] = None, + subnet_association: Optional["SubnetAssociation"] = None, + default_security_rules: Optional[List["SecurityRule"]] = None, + effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, + **kwargs + ): + """ + :keyword network_interface_association: Network interface and it's custom security rules. + :paramtype network_interface_association: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceAssociation + :keyword subnet_association: Subnet and it's custom security rules. + :paramtype subnet_association: ~azure.mgmt.network.v2021_08_01.models.SubnetAssociation + :keyword default_security_rules: Collection of default security rules of the network security + group. + :paramtype default_security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + :keyword effective_security_rules: Collection of effective security rules. + :paramtype effective_security_rules: + list[~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityRule] + """ + super(SecurityRuleAssociations, self).__init__(**kwargs) + self.network_interface_association = network_interface_association + self.subnet_association = subnet_association + self.default_security_rules = default_security_rules + self.effective_security_rules = effective_security_rules + + +class SecurityRuleListResult(msrest.serialization.Model): + """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. + + :ivar value: The security rules in a network security group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["SecurityRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The security rules in a network security group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(SecurityRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ServiceAssociationLink(SubResource): + """ServiceAssociationLink resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar linked_resource_type: Resource type of the linked resource. + :vartype linked_resource_type: str + :ivar link: Link to the external resource. + :vartype link: str + :ivar provisioning_state: The provisioning state of the service association link resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar allow_delete: If true, the resource can be deleted. + :vartype allow_delete: bool + :ivar locations: A list of locations. + :vartype locations: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, + 'link': {'key': 'properties.link', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'allow_delete': {'key': 'properties.allowDelete', 'type': 'bool'}, + 'locations': {'key': 'properties.locations', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + linked_resource_type: Optional[str] = None, + link: Optional[str] = None, + allow_delete: Optional[bool] = None, + locations: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the resource that is unique within a resource group. This name can be + used to access the resource. + :paramtype name: str + :keyword linked_resource_type: Resource type of the linked resource. + :paramtype linked_resource_type: str + :keyword link: Link to the external resource. + :paramtype link: str + :keyword allow_delete: If true, the resource can be deleted. + :paramtype allow_delete: bool + :keyword locations: A list of locations. + :paramtype locations: list[str] + """ + super(ServiceAssociationLink, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.linked_resource_type = linked_resource_type + self.link = link + self.provisioning_state = None + self.allow_delete = allow_delete + self.locations = locations + + +class ServiceAssociationLinksListResult(msrest.serialization.Model): + """Response for ServiceAssociationLinks_List operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The service association links in a subnet. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ServiceAssociationLink] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceAssociationLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceAssociationLink"]] = None, + **kwargs + ): + """ + :keyword value: The service association links in a subnet. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ServiceAssociationLink] + """ + super(ServiceAssociationLinksListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ServiceEndpointPolicy(Resource): + """Service End point policy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar kind: Kind of service endpoint policy. This is metadata used for the Azure portal + experience. + :vartype kind: str + :ivar service_endpoint_policy_definitions: A collection of service endpoint policy definitions + of the service endpoint policy. + :vartype service_endpoint_policy_definitions: + list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_08_01.models.Subnet] + :ivar resource_guid: The resource GUID property of the service endpoint policy resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the service endpoint policy resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar service_alias: The alias indicating if the policy belongs to a service. + :vartype service_alias: str + :ivar contextual_service_endpoint_policies: A collection of contextual service endpoint policy. + :vartype contextual_service_endpoint_policies: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'readonly': True}, + 'subnets': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'service_endpoint_policy_definitions': {'key': 'properties.serviceEndpointPolicyDefinitions', 'type': '[ServiceEndpointPolicyDefinition]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'service_alias': {'key': 'properties.serviceAlias', 'type': 'str'}, + 'contextual_service_endpoint_policies': {'key': 'properties.contextualServiceEndpointPolicies', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + service_endpoint_policy_definitions: Optional[List["ServiceEndpointPolicyDefinition"]] = None, + service_alias: Optional[str] = None, + contextual_service_endpoint_policies: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword service_endpoint_policy_definitions: A collection of service endpoint policy + definitions of the service endpoint policy. + :paramtype service_endpoint_policy_definitions: + list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition] + :keyword service_alias: The alias indicating if the policy belongs to a service. + :paramtype service_alias: str + :keyword contextual_service_endpoint_policies: A collection of contextual service endpoint + policy. + :paramtype contextual_service_endpoint_policies: list[str] + """ + super(ServiceEndpointPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.kind = None + self.service_endpoint_policy_definitions = service_endpoint_policy_definitions + self.subnets = None + self.resource_guid = None + self.provisioning_state = None + self.service_alias = service_alias + self.contextual_service_endpoint_policies = contextual_service_endpoint_policies + + +class ServiceEndpointPolicyDefinition(SubResource): + """Service Endpoint policy definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The type of the resource. + :vartype type: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :ivar service: Service endpoint name. + :vartype service: str + :ivar service_resources: A list of service resources. + :vartype service_resources: list[str] + :ivar provisioning_state: The provisioning state of the service endpoint policy definition + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'service': {'key': 'properties.service', 'type': 'str'}, + 'service_resources': {'key': 'properties.serviceResources', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + description: Optional[str] = None, + service: Optional[str] = None, + service_resources: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword type: The type of the resource. + :paramtype type: str + :keyword description: A description for this rule. Restricted to 140 chars. + :paramtype description: str + :keyword service: Service endpoint name. + :paramtype service: str + :keyword service_resources: A list of service resources. + :paramtype service_resources: list[str] + """ + super(ServiceEndpointPolicyDefinition, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.description = description + self.service = service + self.service_resources = service_resources + self.provisioning_state = None + + +class ServiceEndpointPolicyDefinitionListResult(msrest.serialization.Model): + """Response for ListServiceEndpointPolicyDefinition API service call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy. + + :ivar value: The service endpoint policy definition in a service endpoint policy. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceEndpointPolicyDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceEndpointPolicyDefinition"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The service endpoint policy definition in a service endpoint policy. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(ServiceEndpointPolicyDefinitionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ServiceEndpointPolicyListResult(msrest.serialization.Model): + """Response for ListServiceEndpointPolicies API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of ServiceEndpointPolicy resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceEndpointPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceEndpointPolicy"]] = None, + **kwargs + ): + """ + :keyword value: A list of ServiceEndpointPolicy resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy] + """ + super(ServiceEndpointPolicyListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ServiceEndpointPropertiesFormat(msrest.serialization.Model): + """The service endpoint properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar service: The type of the endpoint service. + :vartype service: str + :ivar locations: A list of locations. + :vartype locations: list[str] + :ivar provisioning_state: The provisioning state of the service endpoint resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'service': {'key': 'service', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + service: Optional[str] = None, + locations: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword service: The type of the endpoint service. + :paramtype service: str + :keyword locations: A list of locations. + :paramtype locations: list[str] + """ + super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) + self.service = service + self.locations = locations + self.provisioning_state = None + + +class ServiceTagInformation(msrest.serialization.Model): + """The service tag information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar properties: Properties of the service tag information. + :vartype properties: + ~azure.mgmt.network.v2021_08_01.models.ServiceTagInformationPropertiesFormat + :ivar name: The name of service tag. + :vartype name: str + :ivar id: The ID of service tag. + :vartype id: str + :ivar service_tag_change_number: The iteration number of service tag object for region. + :vartype service_tag_change_number: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'service_tag_change_number': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ServiceTagInformationPropertiesFormat'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'service_tag_change_number': {'key': 'serviceTagChangeNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ServiceTagInformation, self).__init__(**kwargs) + self.properties = None + self.name = None + self.id = None + self.service_tag_change_number = None + + +class ServiceTagInformationListResult(msrest.serialization.Model): + """Response for Get ServiceTagInformation API service call. Retrieves the list of service tag information resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of service tag information resources. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.ServiceTagInformation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceTagInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceTagInformation"]] = None, + **kwargs + ): + """ + :keyword value: The list of service tag information resources. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.ServiceTagInformation] + """ + super(ServiceTagInformationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ServiceTagInformationPropertiesFormat(msrest.serialization.Model): + """Properties of the service tag information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar change_number: The iteration number of service tag. + :vartype change_number: str + :ivar region: The region of service tag. + :vartype region: str + :ivar system_service: The name of system service. + :vartype system_service: str + :ivar address_prefixes: The list of IP address prefixes. + :vartype address_prefixes: list[str] + :ivar state: The state of the service tag. + :vartype state: str + """ + + _validation = { + 'change_number': {'readonly': True}, + 'region': {'readonly': True}, + 'system_service': {'readonly': True}, + 'address_prefixes': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'system_service': {'key': 'systemService', 'type': 'str'}, + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ServiceTagInformationPropertiesFormat, self).__init__(**kwargs) + self.change_number = None + self.region = None + self.system_service = None + self.address_prefixes = None + self.state = None + + +class ServiceTagsListResult(msrest.serialization.Model): + """Response for the ListServiceTags API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the cloud. + :vartype name: str + :ivar id: The ID of the cloud. + :vartype id: str + :ivar type: The azure resource type. + :vartype type: str + :ivar change_number: The iteration number. + :vartype change_number: str + :ivar cloud: The name of the cloud. + :vartype cloud: str + :ivar values: The list of service tag information resources. + :vartype values: list[~azure.mgmt.network.v2021_08_01.models.ServiceTagInformation] + :ivar next_link: The URL to get next page of service tag information resources. + :vartype next_link: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'change_number': {'readonly': True}, + 'cloud': {'readonly': True}, + 'values': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + 'cloud': {'key': 'cloud', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[ServiceTagInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ServiceTagsListResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + self.change_number = None + self.cloud = None + self.values = None + self.next_link = None + + +class SessionIds(msrest.serialization.Model): + """List of session IDs. + + :ivar session_ids: List of session IDs. + :vartype session_ids: list[str] + """ + + _attribute_map = { + 'session_ids': {'key': 'sessionIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + session_ids: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword session_ids: List of session IDs. + :paramtype session_ids: list[str] + """ + super(SessionIds, self).__init__(**kwargs) + self.session_ids = session_ids + + +class SignatureOverridesFilterValuesQuery(msrest.serialization.Model): + """Describes the filter values possibles for a given column. + + :ivar filter_name: Describes the name of the column which values will be returned. + :vartype filter_name: str + """ + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_name: Optional[str] = None, + **kwargs + ): + """ + :keyword filter_name: Describes the name of the column which values will be returned. + :paramtype filter_name: str + """ + super(SignatureOverridesFilterValuesQuery, self).__init__(**kwargs) + self.filter_name = filter_name + + +class SignatureOverridesFilterValuesResponse(msrest.serialization.Model): + """Describes the list of all possible values for a specific filter value. + + :ivar filter_values: Describes the possible values. + :vartype filter_values: list[str] + """ + + _attribute_map = { + 'filter_values': {'key': 'filterValues', 'type': '[str]'}, + } + + def __init__( + self, + *, + filter_values: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword filter_values: Describes the possible values. + :paramtype filter_values: list[str] + """ + super(SignatureOverridesFilterValuesResponse, self).__init__(**kwargs) + self.filter_values = filter_values + + +class SignaturesOverrides(msrest.serialization.Model): + """Contains all specific policy signatures overrides for the IDPS. + + :ivar name: Contains the name of the resource (default). + :vartype name: str + :ivar id: Will contain the resource id of the signature override resource. + :vartype id: str + :ivar type: Will contain the type of the resource: + Microsoft.Network/firewallPolicies/intrusionDetectionSignaturesOverrides. + :vartype type: str + :ivar properties: Will contain the properties of the resource (the actual signature overrides). + :vartype properties: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverridesProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SignaturesOverridesProperties'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None, + properties: Optional["SignaturesOverridesProperties"] = None, + **kwargs + ): + """ + :keyword name: Contains the name of the resource (default). + :paramtype name: str + :keyword id: Will contain the resource id of the signature override resource. + :paramtype id: str + :keyword type: Will contain the type of the resource: + Microsoft.Network/firewallPolicies/intrusionDetectionSignaturesOverrides. + :paramtype type: str + :keyword properties: Will contain the properties of the resource (the actual signature + overrides). + :paramtype properties: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverridesProperties + """ + super(SignaturesOverrides, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.properties = properties + + +class SignaturesOverridesList(msrest.serialization.Model): + """Describes an object containing an array with a single item. + + :ivar value: Describes a list consisting exactly one item describing the policy's signature + override status. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SignaturesOverrides]'}, + } + + def __init__( + self, + *, + value: Optional[List["SignaturesOverrides"]] = None, + **kwargs + ): + """ + :keyword value: Describes a list consisting exactly one item describing the policy's signature + override status. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides] + """ + super(SignaturesOverridesList, self).__init__(**kwargs) + self.value = value + + +class SignaturesOverridesProperties(msrest.serialization.Model): + """Will contain the properties of the resource (the actual signature overrides). + + :ivar signatures: Dictionary of :code:``. + :vartype signatures: dict[str, str] + """ + + _attribute_map = { + 'signatures': {'key': 'signatures', 'type': '{str}'}, + } + + def __init__( + self, + *, + signatures: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword signatures: Dictionary of :code:``. + :paramtype signatures: dict[str, str] + """ + super(SignaturesOverridesProperties, self).__init__(**kwargs) + self.signatures = signatures + + +class SingleQueryResult(msrest.serialization.Model): + """SingleQueryResult. + + :ivar signature_id: The ID of the signature. + :vartype signature_id: int + :ivar mode: The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny. Possible values + include: 0, 1, 2. + :vartype mode: int or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIDPSSignatureMode + :ivar severity: Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High. Possible + values include: 1, 2, 3. + :vartype severity: int or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIDPSSignatureSeverity + :ivar direction: Describes in which direction signature is being enforced: 0 - Inbound, 1 - + OutBound, 2 - Bidirectional. Possible values include: 0, 1, 2. + :vartype direction: int or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIDPSSignatureDirection + :ivar group: Describes the groups the signature belongs to. + :vartype group: str + :ivar description: Describes what is the signature enforces. + :vartype description: str + :ivar protocol: Describes the protocol the signatures is being enforced in. + :vartype protocol: str + :ivar source_ports: Describes the list of source ports related to this signature. + :vartype source_ports: list[str] + :ivar destination_ports: Describes the list of destination ports related to this signature. + :vartype destination_ports: list[str] + :ivar last_updated: Describes the last updated time of the signature (provided from 3rd party + vendor). + :vartype last_updated: str + :ivar inherited_from_parent_policy: Describes if this override is inherited from base policy or + not. + :vartype inherited_from_parent_policy: bool + """ + + _attribute_map = { + 'signature_id': {'key': 'signatureId', 'type': 'int'}, + 'mode': {'key': 'mode', 'type': 'int'}, + 'severity': {'key': 'severity', 'type': 'int'}, + 'direction': {'key': 'direction', 'type': 'int'}, + 'group': {'key': 'group', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_ports': {'key': 'sourcePorts', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + 'inherited_from_parent_policy': {'key': 'inheritedFromParentPolicy', 'type': 'bool'}, + } + + def __init__( + self, + *, + signature_id: Optional[int] = None, + mode: Optional[Union[int, "FirewallPolicyIDPSSignatureMode"]] = None, + severity: Optional[Union[int, "FirewallPolicyIDPSSignatureSeverity"]] = None, + direction: Optional[Union[int, "FirewallPolicyIDPSSignatureDirection"]] = None, + group: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[str] = None, + source_ports: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + last_updated: Optional[str] = None, + inherited_from_parent_policy: Optional[bool] = None, + **kwargs + ): + """ + :keyword signature_id: The ID of the signature. + :paramtype signature_id: int + :keyword mode: The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny. Possible values + include: 0, 1, 2. + :paramtype mode: int or ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIDPSSignatureMode + :keyword severity: Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High. Possible + values include: 1, 2, 3. + :paramtype severity: int or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIDPSSignatureSeverity + :keyword direction: Describes in which direction signature is being enforced: 0 - Inbound, 1 - + OutBound, 2 - Bidirectional. Possible values include: 0, 1, 2. + :paramtype direction: int or + ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyIDPSSignatureDirection + :keyword group: Describes the groups the signature belongs to. + :paramtype group: str + :keyword description: Describes what is the signature enforces. + :paramtype description: str + :keyword protocol: Describes the protocol the signatures is being enforced in. + :paramtype protocol: str + :keyword source_ports: Describes the list of source ports related to this signature. + :paramtype source_ports: list[str] + :keyword destination_ports: Describes the list of destination ports related to this signature. + :paramtype destination_ports: list[str] + :keyword last_updated: Describes the last updated time of the signature (provided from 3rd + party vendor). + :paramtype last_updated: str + :keyword inherited_from_parent_policy: Describes if this override is inherited from base policy + or not. + :paramtype inherited_from_parent_policy: bool + """ + super(SingleQueryResult, self).__init__(**kwargs) + self.signature_id = signature_id + self.mode = mode + self.severity = severity + self.direction = direction + self.group = group + self.description = description + self.protocol = protocol + self.source_ports = source_ports + self.destination_ports = destination_ports + self.last_updated = last_updated + self.inherited_from_parent_policy = inherited_from_parent_policy + + +class Sku(msrest.serialization.Model): + """The sku of this Bastion Host. + + :ivar name: The name of this Bastion Host. Possible values include: "Basic", "Standard". + Default value: "Standard". + :vartype name: str or ~azure.mgmt.network.v2021_08_01.models.BastionHostSkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "BastionHostSkuName"]] = "Standard", + **kwargs + ): + """ + :keyword name: The name of this Bastion Host. Possible values include: "Basic", "Standard". + Default value: "Standard". + :paramtype name: str or ~azure.mgmt.network.v2021_08_01.models.BastionHostSkuName + """ + super(Sku, self).__init__(**kwargs) + self.name = name + + +class StaticRoute(msrest.serialization.Model): + """List of all Static Routes. + + :ivar name: The name of the StaticRoute that is unique within a VnetRoute. + :vartype name: str + :ivar address_prefixes: List of all address prefixes. + :vartype address_prefixes: list[str] + :ivar next_hop_ip_address: The ip address of the next hop. + :vartype next_hop_ip_address: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + address_prefixes: Optional[List[str]] = None, + next_hop_ip_address: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the StaticRoute that is unique within a VnetRoute. + :paramtype name: str + :keyword address_prefixes: List of all address prefixes. + :paramtype address_prefixes: list[str] + :keyword next_hop_ip_address: The ip address of the next hop. + :paramtype next_hop_ip_address: str + """ + super(StaticRoute, self).__init__(**kwargs) + self.name = name + self.address_prefixes = address_prefixes + self.next_hop_ip_address = next_hop_ip_address + + +class Subnet(SubResource): + """Subnet in a virtual network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar address_prefix: The address prefix for the subnet. + :vartype address_prefix: str + :ivar address_prefixes: List of address prefixes for the subnet. + :vartype address_prefixes: list[str] + :ivar network_security_group: The reference to the NetworkSecurityGroup resource. + :vartype network_security_group: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :ivar route_table: The reference to the RouteTable resource. + :vartype route_table: ~azure.mgmt.network.v2021_08_01.models.RouteTable + :ivar nat_gateway: Nat gateway associated with this subnet. + :vartype nat_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar service_endpoints: An array of service endpoints. + :vartype service_endpoints: + list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPropertiesFormat] + :ivar service_endpoint_policies: An array of service endpoint policies. + :vartype service_endpoint_policies: + list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy] + :ivar private_endpoints: An array of references to private endpoints. + :vartype private_endpoints: list[~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint] + :ivar ip_configurations: An array of references to the network interface IP configurations + using subnet. + :vartype ip_configurations: list[~azure.mgmt.network.v2021_08_01.models.IPConfiguration] + :ivar ip_configuration_profiles: Array of IP configuration profiles which reference this + subnet. + :vartype ip_configuration_profiles: + list[~azure.mgmt.network.v2021_08_01.models.IPConfigurationProfile] + :ivar ip_allocations: Array of IpAllocation which reference this subnet. + :vartype ip_allocations: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar resource_navigation_links: An array of references to the external resources using subnet. + :vartype resource_navigation_links: + list[~azure.mgmt.network.v2021_08_01.models.ResourceNavigationLink] + :ivar service_association_links: An array of references to services injecting into this subnet. + :vartype service_association_links: + list[~azure.mgmt.network.v2021_08_01.models.ServiceAssociationLink] + :ivar delegations: An array of references to the delegations on the subnet. + :vartype delegations: list[~azure.mgmt.network.v2021_08_01.models.Delegation] + :ivar purpose: A read-only string identifying the intention of use for this subnet based on + delegations and other user-defined properties. + :vartype purpose: str + :ivar provisioning_state: The provisioning state of the subnet resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar private_endpoint_network_policies: Enable or Disable apply network policies on private + end point in the subnet. Possible values include: "Enabled", "Disabled". Default value: + "Enabled". + :vartype private_endpoint_network_policies: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPrivateEndpointNetworkPolicies + :ivar private_link_service_network_policies: Enable or Disable apply network policies on + private link service in the subnet. Possible values include: "Enabled", "Disabled". Default + value: "Enabled". + :vartype private_link_service_network_policies: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPrivateLinkServiceNetworkPolicies + :ivar application_gateway_ip_configurations: Application gateway IP configurations of virtual + network resource. + :vartype application_gateway_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayIPConfiguration] + """ + + _validation = { + 'etag': {'readonly': True}, + 'private_endpoints': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'ip_configuration_profiles': {'readonly': True}, + 'resource_navigation_links': {'readonly': True}, + 'service_association_links': {'readonly': True}, + 'purpose': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'address_prefixes': {'key': 'properties.addressPrefixes', 'type': '[str]'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, + 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'SubResource'}, + 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, + 'service_endpoint_policies': {'key': 'properties.serviceEndpointPolicies', 'type': '[ServiceEndpointPolicy]'}, + 'private_endpoints': {'key': 'properties.privateEndpoints', 'type': '[PrivateEndpoint]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, + 'ip_configuration_profiles': {'key': 'properties.ipConfigurationProfiles', 'type': '[IPConfigurationProfile]'}, + 'ip_allocations': {'key': 'properties.ipAllocations', 'type': '[SubResource]'}, + 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, + 'service_association_links': {'key': 'properties.serviceAssociationLinks', 'type': '[ServiceAssociationLink]'}, + 'delegations': {'key': 'properties.delegations', 'type': '[Delegation]'}, + 'purpose': {'key': 'properties.purpose', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_network_policies': {'key': 'properties.privateEndpointNetworkPolicies', 'type': 'str'}, + 'private_link_service_network_policies': {'key': 'properties.privateLinkServiceNetworkPolicies', 'type': 'str'}, + 'application_gateway_ip_configurations': {'key': 'properties.applicationGatewayIpConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + address_prefix: Optional[str] = None, + address_prefixes: Optional[List[str]] = None, + network_security_group: Optional["NetworkSecurityGroup"] = None, + route_table: Optional["RouteTable"] = None, + nat_gateway: Optional["SubResource"] = None, + service_endpoints: Optional[List["ServiceEndpointPropertiesFormat"]] = None, + service_endpoint_policies: Optional[List["ServiceEndpointPolicy"]] = None, + ip_allocations: Optional[List["SubResource"]] = None, + delegations: Optional[List["Delegation"]] = None, + private_endpoint_network_policies: Optional[Union[str, "VirtualNetworkPrivateEndpointNetworkPolicies"]] = "Enabled", + private_link_service_network_policies: Optional[Union[str, "VirtualNetworkPrivateLinkServiceNetworkPolicies"]] = "Enabled", + application_gateway_ip_configurations: Optional[List["ApplicationGatewayIPConfiguration"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword type: Resource type. + :paramtype type: str + :keyword address_prefix: The address prefix for the subnet. + :paramtype address_prefix: str + :keyword address_prefixes: List of address prefixes for the subnet. + :paramtype address_prefixes: list[str] + :keyword network_security_group: The reference to the NetworkSecurityGroup resource. + :paramtype network_security_group: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :keyword route_table: The reference to the RouteTable resource. + :paramtype route_table: ~azure.mgmt.network.v2021_08_01.models.RouteTable + :keyword nat_gateway: Nat gateway associated with this subnet. + :paramtype nat_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword service_endpoints: An array of service endpoints. + :paramtype service_endpoints: + list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPropertiesFormat] + :keyword service_endpoint_policies: An array of service endpoint policies. + :paramtype service_endpoint_policies: + list[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy] + :keyword ip_allocations: Array of IpAllocation which reference this subnet. + :paramtype ip_allocations: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword delegations: An array of references to the delegations on the subnet. + :paramtype delegations: list[~azure.mgmt.network.v2021_08_01.models.Delegation] + :keyword private_endpoint_network_policies: Enable or Disable apply network policies on private + end point in the subnet. Possible values include: "Enabled", "Disabled". Default value: + "Enabled". + :paramtype private_endpoint_network_policies: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPrivateEndpointNetworkPolicies + :keyword private_link_service_network_policies: Enable or Disable apply network policies on + private link service in the subnet. Possible values include: "Enabled", "Disabled". Default + value: "Enabled". + :paramtype private_link_service_network_policies: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPrivateLinkServiceNetworkPolicies + :keyword application_gateway_ip_configurations: Application gateway IP configurations of + virtual network resource. + :paramtype application_gateway_ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayIPConfiguration] + """ + super(Subnet, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.address_prefix = address_prefix + self.address_prefixes = address_prefixes + self.network_security_group = network_security_group + self.route_table = route_table + self.nat_gateway = nat_gateway + self.service_endpoints = service_endpoints + self.service_endpoint_policies = service_endpoint_policies + self.private_endpoints = None + self.ip_configurations = None + self.ip_configuration_profiles = None + self.ip_allocations = ip_allocations + self.resource_navigation_links = None + self.service_association_links = None + self.delegations = delegations + self.purpose = None + self.provisioning_state = None + self.private_endpoint_network_policies = private_endpoint_network_policies + self.private_link_service_network_policies = private_link_service_network_policies + self.application_gateway_ip_configurations = application_gateway_ip_configurations + + +class SubnetAssociation(msrest.serialization.Model): + """Subnet and it's custom security rules. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Subnet ID. + :vartype id: str + :ivar security_rules: Collection of custom security rules. + :vartype security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, + } + + def __init__( + self, + *, + security_rules: Optional[List["SecurityRule"]] = None, + **kwargs + ): + """ + :keyword security_rules: Collection of custom security rules. + :paramtype security_rules: list[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + """ + super(SubnetAssociation, self).__init__(**kwargs) + self.id = None + self.security_rules = security_rules + + +class SubnetListResult(msrest.serialization.Model): + """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. + + :ivar value: The subnets in a virtual network. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.Subnet] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Subnet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Subnet"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The subnets in a virtual network. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.Subnet] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(SubnetListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(TagsObject, self).__init__(**kwargs) + self.tags = tags + + +class Topology(msrest.serialization.Model): + """Topology of the specified resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: GUID representing the operation id. + :vartype id: str + :ivar created_date_time: The datetime when the topology was initially created for the resource + group. + :vartype created_date_time: ~datetime.datetime + :ivar last_modified: The datetime when the topology was last modified. + :vartype last_modified: ~datetime.datetime + :ivar resources: A list of topology resources. + :vartype resources: list[~azure.mgmt.network.v2021_08_01.models.TopologyResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'created_date_time': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, + 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, + } + + def __init__( + self, + *, + resources: Optional[List["TopologyResource"]] = None, + **kwargs + ): + """ + :keyword resources: A list of topology resources. + :paramtype resources: list[~azure.mgmt.network.v2021_08_01.models.TopologyResource] + """ + super(Topology, self).__init__(**kwargs) + self.id = None + self.created_date_time = None + self.last_modified = None + self.resources = resources + + +class TopologyAssociation(msrest.serialization.Model): + """Resources that have an association with the parent resource. + + :ivar name: The name of the resource that is associated with the parent resource. + :vartype name: str + :ivar resource_id: The ID of the resource that is associated with the parent resource. + :vartype resource_id: str + :ivar association_type: The association type of the child resource to the parent resource. + Possible values include: "Associated", "Contains". + :vartype association_type: str or ~azure.mgmt.network.v2021_08_01.models.AssociationType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'association_type': {'key': 'associationType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + resource_id: Optional[str] = None, + association_type: Optional[Union[str, "AssociationType"]] = None, + **kwargs + ): + """ + :keyword name: The name of the resource that is associated with the parent resource. + :paramtype name: str + :keyword resource_id: The ID of the resource that is associated with the parent resource. + :paramtype resource_id: str + :keyword association_type: The association type of the child resource to the parent resource. + Possible values include: "Associated", "Contains". + :paramtype association_type: str or ~azure.mgmt.network.v2021_08_01.models.AssociationType + """ + super(TopologyAssociation, self).__init__(**kwargs) + self.name = name + self.resource_id = resource_id + self.association_type = association_type + + +class TopologyParameters(msrest.serialization.Model): + """Parameters that define the representation of topology. + + :ivar target_resource_group_name: The name of the target resource group to perform topology on. + :vartype target_resource_group_name: str + :ivar target_virtual_network: The reference to the Virtual Network resource. + :vartype target_virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar target_subnet: The reference to the Subnet resource. + :vartype target_subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + + _attribute_map = { + 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, + 'target_virtual_network': {'key': 'targetVirtualNetwork', 'type': 'SubResource'}, + 'target_subnet': {'key': 'targetSubnet', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + target_resource_group_name: Optional[str] = None, + target_virtual_network: Optional["SubResource"] = None, + target_subnet: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword target_resource_group_name: The name of the target resource group to perform topology + on. + :paramtype target_resource_group_name: str + :keyword target_virtual_network: The reference to the Virtual Network resource. + :paramtype target_virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword target_subnet: The reference to the Subnet resource. + :paramtype target_subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(TopologyParameters, self).__init__(**kwargs) + self.target_resource_group_name = target_resource_group_name + self.target_virtual_network = target_virtual_network + self.target_subnet = target_subnet + + +class TopologyResource(msrest.serialization.Model): + """The network resource topology information for the given resource group. + + :ivar name: Name of the resource. + :vartype name: str + :ivar id: ID of the resource. + :vartype id: str + :ivar location: Resource location. + :vartype location: str + :ivar associations: Holds the associations the resource has with other resources in the + resource group. + :vartype associations: list[~azure.mgmt.network.v2021_08_01.models.TopologyAssociation] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + location: Optional[str] = None, + associations: Optional[List["TopologyAssociation"]] = None, + **kwargs + ): + """ + :keyword name: Name of the resource. + :paramtype name: str + :keyword id: ID of the resource. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword associations: Holds the associations the resource has with other resources in the + resource group. + :paramtype associations: list[~azure.mgmt.network.v2021_08_01.models.TopologyAssociation] + """ + super(TopologyResource, self).__init__(**kwargs) + self.name = name + self.id = id + self.location = location + self.associations = associations + + +class TrafficAnalyticsConfigurationProperties(msrest.serialization.Model): + """Parameters that define the configuration of traffic analytics. + + :ivar enabled: Flag to enable/disable traffic analytics. + :vartype enabled: bool + :ivar workspace_id: The resource guid of the attached workspace. + :vartype workspace_id: str + :ivar workspace_region: The location of the attached workspace. + :vartype workspace_region: str + :ivar workspace_resource_id: Resource Id of the attached workspace. + :vartype workspace_resource_id: str + :ivar traffic_analytics_interval: The interval in minutes which would decide how frequently TA + service should do flow analytics. + :vartype traffic_analytics_interval: int + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'workspace_region': {'key': 'workspaceRegion', 'type': 'str'}, + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'traffic_analytics_interval': {'key': 'trafficAnalyticsInterval', 'type': 'int'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + workspace_id: Optional[str] = None, + workspace_region: Optional[str] = None, + workspace_resource_id: Optional[str] = None, + traffic_analytics_interval: Optional[int] = None, + **kwargs + ): + """ + :keyword enabled: Flag to enable/disable traffic analytics. + :paramtype enabled: bool + :keyword workspace_id: The resource guid of the attached workspace. + :paramtype workspace_id: str + :keyword workspace_region: The location of the attached workspace. + :paramtype workspace_region: str + :keyword workspace_resource_id: Resource Id of the attached workspace. + :paramtype workspace_resource_id: str + :keyword traffic_analytics_interval: The interval in minutes which would decide how frequently + TA service should do flow analytics. + :paramtype traffic_analytics_interval: int + """ + super(TrafficAnalyticsConfigurationProperties, self).__init__(**kwargs) + self.enabled = enabled + self.workspace_id = workspace_id + self.workspace_region = workspace_region + self.workspace_resource_id = workspace_resource_id + self.traffic_analytics_interval = traffic_analytics_interval + + +class TrafficAnalyticsProperties(msrest.serialization.Model): + """Parameters that define the configuration of traffic analytics. + + :ivar network_watcher_flow_analytics_configuration: Parameters that define the configuration of + traffic analytics. + :vartype network_watcher_flow_analytics_configuration: + ~azure.mgmt.network.v2021_08_01.models.TrafficAnalyticsConfigurationProperties + """ + + _attribute_map = { + 'network_watcher_flow_analytics_configuration': {'key': 'networkWatcherFlowAnalyticsConfiguration', 'type': 'TrafficAnalyticsConfigurationProperties'}, + } + + def __init__( + self, + *, + network_watcher_flow_analytics_configuration: Optional["TrafficAnalyticsConfigurationProperties"] = None, + **kwargs + ): + """ + :keyword network_watcher_flow_analytics_configuration: Parameters that define the configuration + of traffic analytics. + :paramtype network_watcher_flow_analytics_configuration: + ~azure.mgmt.network.v2021_08_01.models.TrafficAnalyticsConfigurationProperties + """ + super(TrafficAnalyticsProperties, self).__init__(**kwargs) + self.network_watcher_flow_analytics_configuration = network_watcher_flow_analytics_configuration + + +class TrafficSelectorPolicy(msrest.serialization.Model): + """An traffic selector policy for a virtual network gateway connection. + + All required parameters must be populated in order to send to Azure. + + :ivar local_address_ranges: Required. A collection of local address spaces in CIDR format. + :vartype local_address_ranges: list[str] + :ivar remote_address_ranges: Required. A collection of remote address spaces in CIDR format. + :vartype remote_address_ranges: list[str] + """ + + _validation = { + 'local_address_ranges': {'required': True}, + 'remote_address_ranges': {'required': True}, + } + + _attribute_map = { + 'local_address_ranges': {'key': 'localAddressRanges', 'type': '[str]'}, + 'remote_address_ranges': {'key': 'remoteAddressRanges', 'type': '[str]'}, + } + + def __init__( + self, + *, + local_address_ranges: List[str], + remote_address_ranges: List[str], + **kwargs + ): + """ + :keyword local_address_ranges: Required. A collection of local address spaces in CIDR format. + :paramtype local_address_ranges: list[str] + :keyword remote_address_ranges: Required. A collection of remote address spaces in CIDR format. + :paramtype remote_address_ranges: list[str] + """ + super(TrafficSelectorPolicy, self).__init__(**kwargs) + self.local_address_ranges = local_address_ranges + self.remote_address_ranges = remote_address_ranges + + +class TroubleshootingDetails(msrest.serialization.Model): + """Information gained from troubleshooting of specified resource. + + :ivar id: The id of the get troubleshoot operation. + :vartype id: str + :ivar reason_type: Reason type of failure. + :vartype reason_type: str + :ivar summary: A summary of troubleshooting. + :vartype summary: str + :ivar detail: Details on troubleshooting results. + :vartype detail: str + :ivar recommended_actions: List of recommended actions. + :vartype recommended_actions: + list[~azure.mgmt.network.v2021_08_01.models.TroubleshootingRecommendedActions] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'reason_type': {'key': 'reasonType', 'type': 'str'}, + 'summary': {'key': 'summary', 'type': 'str'}, + 'detail': {'key': 'detail', 'type': 'str'}, + 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + reason_type: Optional[str] = None, + summary: Optional[str] = None, + detail: Optional[str] = None, + recommended_actions: Optional[List["TroubleshootingRecommendedActions"]] = None, + **kwargs + ): + """ + :keyword id: The id of the get troubleshoot operation. + :paramtype id: str + :keyword reason_type: Reason type of failure. + :paramtype reason_type: str + :keyword summary: A summary of troubleshooting. + :paramtype summary: str + :keyword detail: Details on troubleshooting results. + :paramtype detail: str + :keyword recommended_actions: List of recommended actions. + :paramtype recommended_actions: + list[~azure.mgmt.network.v2021_08_01.models.TroubleshootingRecommendedActions] + """ + super(TroubleshootingDetails, self).__init__(**kwargs) + self.id = id + self.reason_type = reason_type + self.summary = summary + self.detail = detail + self.recommended_actions = recommended_actions + + +class TroubleshootingParameters(msrest.serialization.Model): + """Parameters that define the resource to troubleshoot. + + All required parameters must be populated in order to send to Azure. + + :ivar target_resource_id: Required. The target resource to troubleshoot. + :vartype target_resource_id: str + :ivar storage_id: Required. The ID for the storage account to save the troubleshoot result. + :vartype storage_id: str + :ivar storage_path: Required. The path to the blob to save the troubleshoot result in. + :vartype storage_path: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'storage_id': {'required': True}, + 'storage_path': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + storage_id: str, + storage_path: str, + **kwargs + ): + """ + :keyword target_resource_id: Required. The target resource to troubleshoot. + :paramtype target_resource_id: str + :keyword storage_id: Required. The ID for the storage account to save the troubleshoot result. + :paramtype storage_id: str + :keyword storage_path: Required. The path to the blob to save the troubleshoot result in. + :paramtype storage_path: str + """ + super(TroubleshootingParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.storage_id = storage_id + self.storage_path = storage_path + + +class TroubleshootingRecommendedActions(msrest.serialization.Model): + """Recommended actions based on discovered issues. + + :ivar action_id: ID of the recommended action. + :vartype action_id: str + :ivar action_text: Description of recommended actions. + :vartype action_text: str + :ivar action_uri: The uri linking to a documentation for the recommended troubleshooting + actions. + :vartype action_uri: str + :ivar action_uri_text: The information from the URI for the recommended troubleshooting + actions. + :vartype action_uri_text: str + """ + + _attribute_map = { + 'action_id': {'key': 'actionId', 'type': 'str'}, + 'action_text': {'key': 'actionText', 'type': 'str'}, + 'action_uri': {'key': 'actionUri', 'type': 'str'}, + 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, + } + + def __init__( + self, + *, + action_id: Optional[str] = None, + action_text: Optional[str] = None, + action_uri: Optional[str] = None, + action_uri_text: Optional[str] = None, + **kwargs + ): + """ + :keyword action_id: ID of the recommended action. + :paramtype action_id: str + :keyword action_text: Description of recommended actions. + :paramtype action_text: str + :keyword action_uri: The uri linking to a documentation for the recommended troubleshooting + actions. + :paramtype action_uri: str + :keyword action_uri_text: The information from the URI for the recommended troubleshooting + actions. + :paramtype action_uri_text: str + """ + super(TroubleshootingRecommendedActions, self).__init__(**kwargs) + self.action_id = action_id + self.action_text = action_text + self.action_uri = action_uri + self.action_uri_text = action_uri_text + + +class TroubleshootingResult(msrest.serialization.Model): + """Troubleshooting information gained from specified resource. + + :ivar start_time: The start time of the troubleshooting. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the troubleshooting. + :vartype end_time: ~datetime.datetime + :ivar code: The result code of the troubleshooting. + :vartype code: str + :ivar results: Information from troubleshooting. + :vartype results: list[~azure.mgmt.network.v2021_08_01.models.TroubleshootingDetails] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, + } + + def __init__( + self, + *, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + code: Optional[str] = None, + results: Optional[List["TroubleshootingDetails"]] = None, + **kwargs + ): + """ + :keyword start_time: The start time of the troubleshooting. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time of the troubleshooting. + :paramtype end_time: ~datetime.datetime + :keyword code: The result code of the troubleshooting. + :paramtype code: str + :keyword results: Information from troubleshooting. + :paramtype results: list[~azure.mgmt.network.v2021_08_01.models.TroubleshootingDetails] + """ + super(TroubleshootingResult, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.code = code + self.results = results + + +class TunnelConnectionHealth(msrest.serialization.Model): + """VirtualNetworkGatewayConnection properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar tunnel: Tunnel name. + :vartype tunnel: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionStatus + :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar last_connection_established_utc_time: The time at which connection was established in Utc + format. + :vartype last_connection_established_utc_time: str + """ + + _validation = { + 'tunnel': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'last_connection_established_utc_time': {'readonly': True}, + } + + _attribute_map = { + 'tunnel': {'key': 'tunnel', 'type': 'str'}, + 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, + 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(TunnelConnectionHealth, self).__init__(**kwargs) + self.tunnel = None + self.connection_status = None + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.last_connection_established_utc_time = None + + +class UnprepareNetworkPoliciesRequest(msrest.serialization.Model): + """Details of UnprepareNetworkPolicies for Subnet. + + :ivar service_name: The name of the service for which subnet is being unprepared for. + :vartype service_name: str + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + **kwargs + ): + """ + :keyword service_name: The name of the service for which subnet is being unprepared for. + :paramtype service_name: str + """ + super(UnprepareNetworkPoliciesRequest, self).__init__(**kwargs) + self.service_name = service_name + + +class Usage(msrest.serialization.Model): + """The network resource usage. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource identifier. + :vartype id: str + :ivar unit: Required. An enum describing the unit of measurement. Possible values include: + "Count". + :vartype unit: str or ~azure.mgmt.network.v2021_08_01.models.UsageUnit + :ivar current_value: Required. The current value of the usage. + :vartype current_value: long + :ivar limit: Required. The limit of usage. + :vartype limit: long + :ivar name: Required. The name of the type of usage. + :vartype name: ~azure.mgmt.network.v2021_08_01.models.UsageName + """ + + _validation = { + 'id': {'readonly': True}, + 'unit': {'required': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__( + self, + *, + unit: Union[str, "UsageUnit"], + current_value: int, + limit: int, + name: "UsageName", + **kwargs + ): + """ + :keyword unit: Required. An enum describing the unit of measurement. Possible values include: + "Count". + :paramtype unit: str or ~azure.mgmt.network.v2021_08_01.models.UsageUnit + :keyword current_value: Required. The current value of the usage. + :paramtype current_value: long + :keyword limit: Required. The limit of usage. + :paramtype limit: long + :keyword name: Required. The name of the type of usage. + :paramtype name: ~azure.mgmt.network.v2021_08_01.models.UsageName + """ + super(Usage, self).__init__(**kwargs) + self.id = None + self.unit = unit + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(msrest.serialization.Model): + """The usage names. + + :ivar value: A string describing the resource name. + :vartype value: str + :ivar localized_value: A localized string describing the resource name. + :vartype localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + localized_value: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A string describing the resource name. + :paramtype value: str + :keyword localized_value: A localized string describing the resource name. + :paramtype localized_value: str + """ + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class UsagesListResult(msrest.serialization.Model): + """The list usages operation response. + + :ivar value: The list network resource usages. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.Usage] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Usage"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The list network resource usages. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.Usage] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(UsagesListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VerificationIPFlowParameters(msrest.serialization.Model): + """Parameters that define the IP flow to be verified. + + All required parameters must be populated in order to send to Azure. + + :ivar target_resource_id: Required. The ID of the target resource to perform next-hop on. + :vartype target_resource_id: str + :ivar direction: Required. The direction of the packet represented as a 5-tuple. Possible + values include: "Inbound", "Outbound". + :vartype direction: str or ~azure.mgmt.network.v2021_08_01.models.Direction + :ivar protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". + :vartype protocol: str or ~azure.mgmt.network.v2021_08_01.models.IpFlowProtocol + :ivar local_port: Required. The local port. Acceptable values are a single integer in the range + (0-65535). Support for * for the source port, which depends on the direction. + :vartype local_port: str + :ivar remote_port: Required. The remote port. Acceptable values are a single integer in the + range (0-65535). Support for * for the source port, which depends on the direction. + :vartype remote_port: str + :ivar local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 + addresses. + :vartype local_ip_address: str + :ivar remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 + addresses. + :vartype remote_ip_address: str + :ivar target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is enabled + on any of them, then this parameter must be specified. Otherwise optional). + :vartype target_nic_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'direction': {'required': True}, + 'protocol': {'required': True}, + 'local_port': {'required': True}, + 'remote_port': {'required': True}, + 'local_ip_address': {'required': True}, + 'remote_ip_address': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'direction': {'key': 'direction', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'local_port': {'key': 'localPort', 'type': 'str'}, + 'remote_port': {'key': 'remotePort', 'type': 'str'}, + 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, + 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, + 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + direction: Union[str, "Direction"], + protocol: Union[str, "IpFlowProtocol"], + local_port: str, + remote_port: str, + local_ip_address: str, + remote_ip_address: str, + target_nic_resource_id: Optional[str] = None, + **kwargs + ): + """ + :keyword target_resource_id: Required. The ID of the target resource to perform next-hop on. + :paramtype target_resource_id: str + :keyword direction: Required. The direction of the packet represented as a 5-tuple. Possible + values include: "Inbound", "Outbound". + :paramtype direction: str or ~azure.mgmt.network.v2021_08_01.models.Direction + :keyword protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". + :paramtype protocol: str or ~azure.mgmt.network.v2021_08_01.models.IpFlowProtocol + :keyword local_port: Required. The local port. Acceptable values are a single integer in the + range (0-65535). Support for * for the source port, which depends on the direction. + :paramtype local_port: str + :keyword remote_port: Required. The remote port. Acceptable values are a single integer in the + range (0-65535). Support for * for the source port, which depends on the direction. + :paramtype remote_port: str + :keyword local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 + addresses. + :paramtype local_ip_address: str + :keyword remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 + addresses. + :paramtype remote_ip_address: str + :keyword target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is + enabled on any of them, then this parameter must be specified. Otherwise optional). + :paramtype target_nic_resource_id: str + """ + super(VerificationIPFlowParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.direction = direction + self.protocol = protocol + self.local_port = local_port + self.remote_port = remote_port + self.local_ip_address = local_ip_address + self.remote_ip_address = remote_ip_address + self.target_nic_resource_id = target_nic_resource_id + + +class VerificationIPFlowResult(msrest.serialization.Model): + """Results of IP flow verification on the target resource. + + :ivar access: Indicates whether the traffic is allowed or denied. Possible values include: + "Allow", "Deny". + :vartype access: str or ~azure.mgmt.network.v2021_08_01.models.Access + :ivar rule_name: Name of the rule. If input is not matched against any security rule, it is not + displayed. + :vartype rule_name: str + """ + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + } + + def __init__( + self, + *, + access: Optional[Union[str, "Access"]] = None, + rule_name: Optional[str] = None, + **kwargs + ): + """ + :keyword access: Indicates whether the traffic is allowed or denied. Possible values include: + "Allow", "Deny". + :paramtype access: str or ~azure.mgmt.network.v2021_08_01.models.Access + :keyword rule_name: Name of the rule. If input is not matched against any security rule, it is + not displayed. + :paramtype rule_name: str + """ + super(VerificationIPFlowResult, self).__init__(**kwargs) + self.access = access + self.rule_name = rule_name + + +class VirtualApplianceNicProperties(msrest.serialization.Model): + """Network Virtual Appliance NIC properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: NIC name. + :vartype name: str + :ivar public_ip_address: Public IP address. + :vartype public_ip_address: str + :ivar private_ip_address: Private IP address. + :vartype private_ip_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(VirtualApplianceNicProperties, self).__init__(**kwargs) + self.name = None + self.public_ip_address = None + self.private_ip_address = None + + +class VirtualApplianceSite(SubResource): + """Virtual Appliance Site resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the virtual appliance site. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Site type. + :vartype type: str + :ivar address_prefix: Address Prefix. + :vartype address_prefix: str + :ivar o365_policy: Office 365 Policy. + :vartype o365_policy: ~azure.mgmt.network.v2021_08_01.models.Office365PolicyProperties + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'o365_policy': {'key': 'properties.o365Policy', 'type': 'Office365PolicyProperties'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + address_prefix: Optional[str] = None, + o365_policy: Optional["Office365PolicyProperties"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the virtual appliance site. + :paramtype name: str + :keyword address_prefix: Address Prefix. + :paramtype address_prefix: str + :keyword o365_policy: Office 365 Policy. + :paramtype o365_policy: ~azure.mgmt.network.v2021_08_01.models.Office365PolicyProperties + """ + super(VirtualApplianceSite, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.address_prefix = address_prefix + self.o365_policy = o365_policy + self.provisioning_state = None + + +class VirtualApplianceSkuProperties(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :ivar vendor: Virtual Appliance Vendor. + :vartype vendor: str + :ivar bundled_scale_unit: Virtual Appliance Scale Unit. + :vartype bundled_scale_unit: str + :ivar market_place_version: Virtual Appliance Version. + :vartype market_place_version: str + """ + + _attribute_map = { + 'vendor': {'key': 'vendor', 'type': 'str'}, + 'bundled_scale_unit': {'key': 'bundledScaleUnit', 'type': 'str'}, + 'market_place_version': {'key': 'marketPlaceVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + vendor: Optional[str] = None, + bundled_scale_unit: Optional[str] = None, + market_place_version: Optional[str] = None, + **kwargs + ): + """ + :keyword vendor: Virtual Appliance Vendor. + :paramtype vendor: str + :keyword bundled_scale_unit: Virtual Appliance Scale Unit. + :paramtype bundled_scale_unit: str + :keyword market_place_version: Virtual Appliance Version. + :paramtype market_place_version: str + """ + super(VirtualApplianceSkuProperties, self).__init__(**kwargs) + self.vendor = vendor + self.bundled_scale_unit = bundled_scale_unit + self.market_place_version = market_place_version + + +class VirtualHub(Resource): + """VirtualHub Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar kind: Kind of service virtual hub. This is metadata used for the Azure portal experience + for Route Server. + :vartype kind: str + :ivar virtual_wan: The VirtualWAN to which the VirtualHub belongs. + :vartype virtual_wan: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar vpn_gateway: The VpnGateway associated with this VirtualHub. + :vartype vpn_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar p2_s_vpn_gateway: The P2SVpnGateway associated with this VirtualHub. + :vartype p2_s_vpn_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar express_route_gateway: The expressRouteGateway associated with this VirtualHub. + :vartype express_route_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar azure_firewall: The azureFirewall associated with this VirtualHub. + :vartype azure_firewall: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar security_partner_provider: The securityPartnerProvider associated with this VirtualHub. + :vartype security_partner_provider: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar address_prefix: Address-prefix for this VirtualHub. + :vartype address_prefix: str + :ivar route_table: The routeTable associated with this virtual hub. + :vartype route_table: ~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTable + :ivar provisioning_state: The provisioning state of the virtual hub resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar security_provider_name: The Security Provider name. + :vartype security_provider_name: str + :ivar virtual_hub_route_table_v2_s: List of all virtual hub route table v2s associated with + this VirtualHub. + :vartype virtual_hub_route_table_v2_s: + list[~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2] + :ivar sku: The sku of this VirtualHub. + :vartype sku: str + :ivar routing_state: The routing state. Possible values include: "None", "Provisioned", + "Provisioning", "Failed". + :vartype routing_state: str or ~azure.mgmt.network.v2021_08_01.models.RoutingState + :ivar bgp_connections: List of references to Bgp Connections. + :vartype bgp_connections: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar ip_configurations: List of references to IpConfigurations. + :vartype ip_configurations: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar virtual_router_asn: VirtualRouter ASN. + :vartype virtual_router_asn: long + :ivar virtual_router_ips: VirtualRouter IPs. + :vartype virtual_router_ips: list[str] + :ivar allow_branch_to_branch_traffic: Flag to control transit for VirtualRouter hub. + :vartype allow_branch_to_branch_traffic: bool + :ivar preferred_routing_gateway: The preferred gateway to route on-prem traffic. Possible + values include: "ExpressRoute", "VpnGateway", "None". + :vartype preferred_routing_gateway: str or + ~azure.mgmt.network.v2021_08_01.models.PreferredRoutingGateway + :ivar hub_routing_preference: The hubRoutingPreference of this VirtualHub. Possible values + include: "ExpressRoute", "VpnGateway", "ASPath". + :vartype hub_routing_preference: str or + ~azure.mgmt.network.v2021_08_01.models.HubRoutingPreference + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'routing_state': {'readonly': True}, + 'bgp_connections': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'virtual_router_asn': {'maximum': 4294967295, 'minimum': 0}, + } + + _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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'virtual_wan': {'key': 'properties.virtualWan', 'type': 'SubResource'}, + 'vpn_gateway': {'key': 'properties.vpnGateway', 'type': 'SubResource'}, + 'p2_s_vpn_gateway': {'key': 'properties.p2SVpnGateway', 'type': 'SubResource'}, + 'express_route_gateway': {'key': 'properties.expressRouteGateway', 'type': 'SubResource'}, + 'azure_firewall': {'key': 'properties.azureFirewall', 'type': 'SubResource'}, + 'security_partner_provider': {'key': 'properties.securityPartnerProvider', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'route_table': {'key': 'properties.routeTable', 'type': 'VirtualHubRouteTable'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'security_provider_name': {'key': 'properties.securityProviderName', 'type': 'str'}, + 'virtual_hub_route_table_v2_s': {'key': 'properties.virtualHubRouteTableV2s', 'type': '[VirtualHubRouteTableV2]'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'routing_state': {'key': 'properties.routingState', 'type': 'str'}, + 'bgp_connections': {'key': 'properties.bgpConnections', 'type': '[SubResource]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[SubResource]'}, + 'virtual_router_asn': {'key': 'properties.virtualRouterAsn', 'type': 'long'}, + 'virtual_router_ips': {'key': 'properties.virtualRouterIps', 'type': '[str]'}, + 'allow_branch_to_branch_traffic': {'key': 'properties.allowBranchToBranchTraffic', 'type': 'bool'}, + 'preferred_routing_gateway': {'key': 'properties.preferredRoutingGateway', 'type': 'str'}, + 'hub_routing_preference': {'key': 'properties.hubRoutingPreference', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_wan: Optional["SubResource"] = None, + vpn_gateway: Optional["SubResource"] = None, + p2_s_vpn_gateway: Optional["SubResource"] = None, + express_route_gateway: Optional["SubResource"] = None, + azure_firewall: Optional["SubResource"] = None, + security_partner_provider: Optional["SubResource"] = None, + address_prefix: Optional[str] = None, + route_table: Optional["VirtualHubRouteTable"] = None, + security_provider_name: Optional[str] = None, + virtual_hub_route_table_v2_s: Optional[List["VirtualHubRouteTableV2"]] = None, + sku: Optional[str] = None, + virtual_router_asn: Optional[int] = None, + virtual_router_ips: Optional[List[str]] = None, + allow_branch_to_branch_traffic: Optional[bool] = None, + preferred_routing_gateway: Optional[Union[str, "PreferredRoutingGateway"]] = None, + hub_routing_preference: Optional[Union[str, "HubRoutingPreference"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword virtual_wan: The VirtualWAN to which the VirtualHub belongs. + :paramtype virtual_wan: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword vpn_gateway: The VpnGateway associated with this VirtualHub. + :paramtype vpn_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword p2_s_vpn_gateway: The P2SVpnGateway associated with this VirtualHub. + :paramtype p2_s_vpn_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword express_route_gateway: The expressRouteGateway associated with this VirtualHub. + :paramtype express_route_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword azure_firewall: The azureFirewall associated with this VirtualHub. + :paramtype azure_firewall: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword security_partner_provider: The securityPartnerProvider associated with this + VirtualHub. + :paramtype security_partner_provider: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword address_prefix: Address-prefix for this VirtualHub. + :paramtype address_prefix: str + :keyword route_table: The routeTable associated with this virtual hub. + :paramtype route_table: ~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTable + :keyword security_provider_name: The Security Provider name. + :paramtype security_provider_name: str + :keyword virtual_hub_route_table_v2_s: List of all virtual hub route table v2s associated with + this VirtualHub. + :paramtype virtual_hub_route_table_v2_s: + list[~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2] + :keyword sku: The sku of this VirtualHub. + :paramtype sku: str + :keyword virtual_router_asn: VirtualRouter ASN. + :paramtype virtual_router_asn: long + :keyword virtual_router_ips: VirtualRouter IPs. + :paramtype virtual_router_ips: list[str] + :keyword allow_branch_to_branch_traffic: Flag to control transit for VirtualRouter hub. + :paramtype allow_branch_to_branch_traffic: bool + :keyword preferred_routing_gateway: The preferred gateway to route on-prem traffic. Possible + values include: "ExpressRoute", "VpnGateway", "None". + :paramtype preferred_routing_gateway: str or + ~azure.mgmt.network.v2021_08_01.models.PreferredRoutingGateway + :keyword hub_routing_preference: The hubRoutingPreference of this VirtualHub. Possible values + include: "ExpressRoute", "VpnGateway", "ASPath". + :paramtype hub_routing_preference: str or + ~azure.mgmt.network.v2021_08_01.models.HubRoutingPreference + """ + super(VirtualHub, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.kind = None + self.virtual_wan = virtual_wan + self.vpn_gateway = vpn_gateway + self.p2_s_vpn_gateway = p2_s_vpn_gateway + self.express_route_gateway = express_route_gateway + self.azure_firewall = azure_firewall + self.security_partner_provider = security_partner_provider + self.address_prefix = address_prefix + self.route_table = route_table + self.provisioning_state = None + self.security_provider_name = security_provider_name + self.virtual_hub_route_table_v2_s = virtual_hub_route_table_v2_s + self.sku = sku + self.routing_state = None + self.bgp_connections = None + self.ip_configurations = None + self.virtual_router_asn = virtual_router_asn + self.virtual_router_ips = virtual_router_ips + self.allow_branch_to_branch_traffic = allow_branch_to_branch_traffic + self.preferred_routing_gateway = preferred_routing_gateway + self.hub_routing_preference = hub_routing_preference + + +class VirtualHubEffectiveRoute(msrest.serialization.Model): + """The effective route configured on the virtual hub or specified resource. + + :ivar address_prefixes: The list of address prefixes. + :vartype address_prefixes: list[str] + :ivar next_hops: The list of next hops. + :vartype next_hops: list[str] + :ivar next_hop_type: The type of the next hop. + :vartype next_hop_type: str + :ivar as_path: The ASPath of this route. + :vartype as_path: str + :ivar route_origin: The origin of this route. + :vartype route_origin: str + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hops': {'key': 'nextHops', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'route_origin': {'key': 'routeOrigin', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefixes: Optional[List[str]] = None, + next_hops: Optional[List[str]] = None, + next_hop_type: Optional[str] = None, + as_path: Optional[str] = None, + route_origin: Optional[str] = None, + **kwargs + ): + """ + :keyword address_prefixes: The list of address prefixes. + :paramtype address_prefixes: list[str] + :keyword next_hops: The list of next hops. + :paramtype next_hops: list[str] + :keyword next_hop_type: The type of the next hop. + :paramtype next_hop_type: str + :keyword as_path: The ASPath of this route. + :paramtype as_path: str + :keyword route_origin: The origin of this route. + :paramtype route_origin: str + """ + super(VirtualHubEffectiveRoute, self).__init__(**kwargs) + self.address_prefixes = address_prefixes + self.next_hops = next_hops + self.next_hop_type = next_hop_type + self.as_path = as_path + self.route_origin = route_origin + + +class VirtualHubEffectiveRouteList(msrest.serialization.Model): + """EffectiveRoutes List. + + :ivar value: The list of effective routes configured on the virtual hub or the specified + resource. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualHubEffectiveRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHubEffectiveRoute]'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualHubEffectiveRoute"]] = None, + **kwargs + ): + """ + :keyword value: The list of effective routes configured on the virtual hub or the specified + resource. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualHubEffectiveRoute] + """ + super(VirtualHubEffectiveRouteList, self).__init__(**kwargs) + self.value = value + + +class VirtualHubId(msrest.serialization.Model): + """Virtual Hub identifier. + + :ivar id: The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be + deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same + subscription. + :vartype id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be + deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same + subscription. + :paramtype id: str + """ + super(VirtualHubId, self).__init__(**kwargs) + self.id = id + + +class VirtualHubRoute(msrest.serialization.Model): + """VirtualHub route. + + :ivar address_prefixes: List of all addressPrefixes. + :vartype address_prefixes: list[str] + :ivar next_hop_ip_address: NextHop ip address. + :vartype next_hop_ip_address: str + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefixes: Optional[List[str]] = None, + next_hop_ip_address: Optional[str] = None, + **kwargs + ): + """ + :keyword address_prefixes: List of all addressPrefixes. + :paramtype address_prefixes: list[str] + :keyword next_hop_ip_address: NextHop ip address. + :paramtype next_hop_ip_address: str + """ + super(VirtualHubRoute, self).__init__(**kwargs) + self.address_prefixes = address_prefixes + self.next_hop_ip_address = next_hop_ip_address + + +class VirtualHubRouteTable(msrest.serialization.Model): + """VirtualHub route table. + + :ivar routes: List of all routes. + :vartype routes: list[~azure.mgmt.network.v2021_08_01.models.VirtualHubRoute] + """ + + _attribute_map = { + 'routes': {'key': 'routes', 'type': '[VirtualHubRoute]'}, + } + + def __init__( + self, + *, + routes: Optional[List["VirtualHubRoute"]] = None, + **kwargs + ): + """ + :keyword routes: List of all routes. + :paramtype routes: list[~azure.mgmt.network.v2021_08_01.models.VirtualHubRoute] + """ + super(VirtualHubRouteTable, self).__init__(**kwargs) + self.routes = routes + + +class VirtualHubRouteTableV2(SubResource): + """VirtualHubRouteTableV2 Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar routes: List of all routes. + :vartype routes: list[~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteV2] + :ivar attached_connections: List of all connections attached to this route table v2. + :vartype attached_connections: list[str] + :ivar provisioning_state: The provisioning state of the virtual hub route table v2 resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[VirtualHubRouteV2]'}, + 'attached_connections': {'key': 'properties.attachedConnections', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + routes: Optional[List["VirtualHubRouteV2"]] = None, + attached_connections: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword routes: List of all routes. + :paramtype routes: list[~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteV2] + :keyword attached_connections: List of all connections attached to this route table v2. + :paramtype attached_connections: list[str] + """ + super(VirtualHubRouteTableV2, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.routes = routes + self.attached_connections = attached_connections + self.provisioning_state = None + + +class VirtualHubRouteV2(msrest.serialization.Model): + """VirtualHubRouteTableV2 route. + + :ivar destination_type: The type of destinations. + :vartype destination_type: str + :ivar destinations: List of all destinations. + :vartype destinations: list[str] + :ivar next_hop_type: The type of next hops. + :vartype next_hop_type: str + :ivar next_hops: NextHops ip address. + :vartype next_hops: list[str] + """ + + _attribute_map = { + 'destination_type': {'key': 'destinationType', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hops': {'key': 'nextHops', 'type': '[str]'}, + } + + def __init__( + self, + *, + destination_type: Optional[str] = None, + destinations: Optional[List[str]] = None, + next_hop_type: Optional[str] = None, + next_hops: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword destination_type: The type of destinations. + :paramtype destination_type: str + :keyword destinations: List of all destinations. + :paramtype destinations: list[str] + :keyword next_hop_type: The type of next hops. + :paramtype next_hop_type: str + :keyword next_hops: NextHops ip address. + :paramtype next_hops: list[str] + """ + super(VirtualHubRouteV2, self).__init__(**kwargs) + self.destination_type = destination_type + self.destinations = destinations + self.next_hop_type = next_hop_type + self.next_hops = next_hops + + +class VirtualNetwork(Resource): + """Virtual Network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of the virtual network. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar address_space: The AddressSpace that contains an array of IP address ranges that can be + used by subnets. + :vartype address_space: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :ivar dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs + deployed in the virtual network. + :vartype dhcp_options: ~azure.mgmt.network.v2021_08_01.models.DhcpOptions + :ivar flow_timeout_in_minutes: The FlowTimeout value (in minutes) for the Virtual Network. + :vartype flow_timeout_in_minutes: int + :ivar subnets: A list of subnets in a Virtual Network. + :vartype subnets: list[~azure.mgmt.network.v2021_08_01.models.Subnet] + :ivar virtual_network_peerings: A list of peerings in a Virtual Network. + :vartype virtual_network_peerings: + list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering] + :ivar resource_guid: The resourceGuid property of the Virtual Network resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar enable_ddos_protection: Indicates if DDoS protection is enabled for all the protected + resources in the virtual network. It requires a DDoS protection plan associated with the + resource. + :vartype enable_ddos_protection: bool + :ivar enable_vm_protection: Indicates if VM protection is enabled for all the subnets in the + virtual network. + :vartype enable_vm_protection: bool + :ivar ddos_protection_plan: The DDoS protection plan associated with the virtual network. + :vartype ddos_protection_plan: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar bgp_communities: Bgp Communities sent over ExpressRoute with each route corresponding to + a prefix in this VNET. + :vartype bgp_communities: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkBgpCommunities + :ivar encryption: Indicates if encryption is enabled on virtual network and if VM without + encryption is allowed in encrypted VNet. + :vartype encryption: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkEncryption + :ivar ip_allocations: Array of IpAllocation which reference this VNET. + :vartype ip_allocations: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, + 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, + 'flow_timeout_in_minutes': {'key': 'properties.flowTimeoutInMinutes', 'type': 'int'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'enable_ddos_protection': {'key': 'properties.enableDdosProtection', 'type': 'bool'}, + 'enable_vm_protection': {'key': 'properties.enableVmProtection', 'type': 'bool'}, + 'ddos_protection_plan': {'key': 'properties.ddosProtectionPlan', 'type': 'SubResource'}, + 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': 'VirtualNetworkBgpCommunities'}, + 'encryption': {'key': 'properties.encryption', 'type': 'VirtualNetworkEncryption'}, + 'ip_allocations': {'key': 'properties.ipAllocations', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + address_space: Optional["AddressSpace"] = None, + dhcp_options: Optional["DhcpOptions"] = None, + flow_timeout_in_minutes: Optional[int] = None, + subnets: Optional[List["Subnet"]] = None, + virtual_network_peerings: Optional[List["VirtualNetworkPeering"]] = None, + enable_ddos_protection: Optional[bool] = False, + enable_vm_protection: Optional[bool] = False, + ddos_protection_plan: Optional["SubResource"] = None, + bgp_communities: Optional["VirtualNetworkBgpCommunities"] = None, + encryption: Optional["VirtualNetworkEncryption"] = None, + ip_allocations: Optional[List["SubResource"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of the virtual network. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword address_space: The AddressSpace that contains an array of IP address ranges that can + be used by subnets. + :paramtype address_space: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :keyword dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs + deployed in the virtual network. + :paramtype dhcp_options: ~azure.mgmt.network.v2021_08_01.models.DhcpOptions + :keyword flow_timeout_in_minutes: The FlowTimeout value (in minutes) for the Virtual Network. + :paramtype flow_timeout_in_minutes: int + :keyword subnets: A list of subnets in a Virtual Network. + :paramtype subnets: list[~azure.mgmt.network.v2021_08_01.models.Subnet] + :keyword virtual_network_peerings: A list of peerings in a Virtual Network. + :paramtype virtual_network_peerings: + list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering] + :keyword enable_ddos_protection: Indicates if DDoS protection is enabled for all the protected + resources in the virtual network. It requires a DDoS protection plan associated with the + resource. + :paramtype enable_ddos_protection: bool + :keyword enable_vm_protection: Indicates if VM protection is enabled for all the subnets in the + virtual network. + :paramtype enable_vm_protection: bool + :keyword ddos_protection_plan: The DDoS protection plan associated with the virtual network. + :paramtype ddos_protection_plan: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword bgp_communities: Bgp Communities sent over ExpressRoute with each route corresponding + to a prefix in this VNET. + :paramtype bgp_communities: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkBgpCommunities + :keyword encryption: Indicates if encryption is enabled on virtual network and if VM without + encryption is allowed in encrypted VNet. + :paramtype encryption: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkEncryption + :keyword ip_allocations: Array of IpAllocation which reference this VNET. + :paramtype ip_allocations: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + super(VirtualNetwork, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.address_space = address_space + self.dhcp_options = dhcp_options + self.flow_timeout_in_minutes = flow_timeout_in_minutes + self.subnets = subnets + self.virtual_network_peerings = virtual_network_peerings + self.resource_guid = None + self.provisioning_state = None + self.enable_ddos_protection = enable_ddos_protection + self.enable_vm_protection = enable_vm_protection + self.ddos_protection_plan = ddos_protection_plan + self.bgp_communities = bgp_communities + self.encryption = encryption + self.ip_allocations = ip_allocations + + +class VirtualNetworkBgpCommunities(msrest.serialization.Model): + """Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar virtual_network_community: Required. The BGP community associated with the virtual + network. + :vartype virtual_network_community: str + :ivar regional_community: The BGP community associated with the region of the virtual network. + :vartype regional_community: str + """ + + _validation = { + 'virtual_network_community': {'required': True}, + 'regional_community': {'readonly': True}, + } + + _attribute_map = { + 'virtual_network_community': {'key': 'virtualNetworkCommunity', 'type': 'str'}, + 'regional_community': {'key': 'regionalCommunity', 'type': 'str'}, + } + + def __init__( + self, + *, + virtual_network_community: str, + **kwargs + ): + """ + :keyword virtual_network_community: Required. The BGP community associated with the virtual + network. + :paramtype virtual_network_community: str + """ + super(VirtualNetworkBgpCommunities, self).__init__(**kwargs) + self.virtual_network_community = virtual_network_community + self.regional_community = None + + +class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): + """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. + :vartype id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + **kwargs + ): + """ + :keyword id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. + :paramtype id: str + """ + super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) + self.id = id + + +class VirtualNetworkEncryption(msrest.serialization.Model): + """Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. + + All required parameters must be populated in order to send to Azure. + + :ivar enabled: Required. Indicates if encryption is enabled on the virtual network. + :vartype enabled: bool + :ivar enforcement: If the encrypted VNet allows VM that does not support encryption. Possible + values include: "DropUnencrypted", "AllowUnencrypted". + :vartype enforcement: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkEncryptionEnforcement + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'enforcement': {'key': 'enforcement', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + enforcement: Optional[Union[str, "VirtualNetworkEncryptionEnforcement"]] = None, + **kwargs + ): + """ + :keyword enabled: Required. Indicates if encryption is enabled on the virtual network. + :paramtype enabled: bool + :keyword enforcement: If the encrypted VNet allows VM that does not support encryption. + Possible values include: "DropUnencrypted", "AllowUnencrypted". + :paramtype enforcement: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkEncryptionEnforcement + """ + super(VirtualNetworkEncryption, self).__init__(**kwargs) + self.enabled = enabled + self.enforcement = enforcement + + +class VirtualNetworkGateway(Resource): + """A common class for general resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar extended_location: The extended location of type local virtual network gateway. + :vartype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar ip_configurations: IP configurations for virtual network gateway. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayIPConfiguration] + :ivar gateway_type: The type of this virtual network gateway. Possible values include: "Vpn", + "ExpressRoute", "LocalGateway". + :vartype gateway_type: str or ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayType + :ivar vpn_type: The type of this virtual network gateway. Possible values include: + "PolicyBased", "RouteBased". + :vartype vpn_type: str or ~azure.mgmt.network.v2021_08_01.models.VpnType + :ivar vpn_gateway_generation: The generation for this VirtualNetworkGateway. Must be None if + gatewayType is not VPN. Possible values include: "None", "Generation1", "Generation2". + :vartype vpn_gateway_generation: str or + ~azure.mgmt.network.v2021_08_01.models.VpnGatewayGeneration + :ivar enable_bgp: Whether BGP is enabled for this virtual network gateway or not. + :vartype enable_bgp: bool + :ivar enable_private_ip_address: Whether private IP needs to be enabled on this gateway for + connections or not. + :vartype enable_private_ip_address: bool + :ivar active: ActiveActive flag. + :vartype active: bool + :ivar disable_ip_sec_replay_protection: disableIPSecReplayProtection flag. + :vartype disable_ip_sec_replay_protection: bool + :ivar gateway_default_site: The reference to the LocalNetworkGateway resource which represents + local network site having default routes. Assign Null value in case of removing existing + default site setting. + :vartype gateway_default_site: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar sku: The reference to the VirtualNetworkGatewaySku resource which represents the SKU + selected for Virtual network gateway. + :vartype sku: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewaySku + :ivar vpn_client_configuration: The reference to the VpnClientConfiguration resource which + represents the P2S VpnClient configurations. + :vartype vpn_client_configuration: + ~azure.mgmt.network.v2021_08_01.models.VpnClientConfiguration + :ivar bgp_settings: Virtual network gateway's BGP speaker settings. + :vartype bgp_settings: ~azure.mgmt.network.v2021_08_01.models.BgpSettings + :ivar custom_routes: The reference to the address space resource which represents the custom + routes address space specified by the customer for virtual network gateway and VpnClient. + :vartype custom_routes: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :ivar resource_guid: The resource GUID property of the virtual network gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar enable_dns_forwarding: Whether dns forwarding is enabled or not. + :vartype enable_dns_forwarding: bool + :ivar inbound_dns_forwarding_endpoint: The IP address allocated by the gateway to which dns + requests can be sent. + :vartype inbound_dns_forwarding_endpoint: str + :ivar v_net_extended_location_resource_id: Customer vnet resource id. VirtualNetworkGateway of + type local gateway is associated with the customer vnet. + :vartype v_net_extended_location_resource_id: str + :ivar nat_rules: NatRules for virtual network gateway. + :vartype nat_rules: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule] + :ivar enable_bgp_route_translation_for_nat: EnableBgpRouteTranslationForNat flag. + :vartype enable_bgp_route_translation_for_nat: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'inbound_dns_forwarding_endpoint': {'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}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, + 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, + 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, + 'vpn_gateway_generation': {'key': 'properties.vpnGatewayGeneration', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'enable_private_ip_address': {'key': 'properties.enablePrivateIpAddress', 'type': 'bool'}, + 'active': {'key': 'properties.activeActive', 'type': 'bool'}, + 'disable_ip_sec_replay_protection': {'key': 'properties.disableIPSecReplayProtection', 'type': 'bool'}, + 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, + 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, + 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'custom_routes': {'key': 'properties.customRoutes', 'type': 'AddressSpace'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'enable_dns_forwarding': {'key': 'properties.enableDnsForwarding', 'type': 'bool'}, + 'inbound_dns_forwarding_endpoint': {'key': 'properties.inboundDnsForwardingEndpoint', 'type': 'str'}, + 'v_net_extended_location_resource_id': {'key': 'properties.vNetExtendedLocationResourceId', 'type': 'str'}, + 'nat_rules': {'key': 'properties.natRules', 'type': '[VirtualNetworkGatewayNatRule]'}, + 'enable_bgp_route_translation_for_nat': {'key': 'properties.enableBgpRouteTranslationForNat', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + ip_configurations: Optional[List["VirtualNetworkGatewayIPConfiguration"]] = None, + gateway_type: Optional[Union[str, "VirtualNetworkGatewayType"]] = None, + vpn_type: Optional[Union[str, "VpnType"]] = None, + vpn_gateway_generation: Optional[Union[str, "VpnGatewayGeneration"]] = None, + enable_bgp: Optional[bool] = None, + enable_private_ip_address: Optional[bool] = None, + active: Optional[bool] = None, + disable_ip_sec_replay_protection: Optional[bool] = None, + gateway_default_site: Optional["SubResource"] = None, + sku: Optional["VirtualNetworkGatewaySku"] = None, + vpn_client_configuration: Optional["VpnClientConfiguration"] = None, + bgp_settings: Optional["BgpSettings"] = None, + custom_routes: Optional["AddressSpace"] = None, + enable_dns_forwarding: Optional[bool] = None, + v_net_extended_location_resource_id: Optional[str] = None, + nat_rules: Optional[List["VirtualNetworkGatewayNatRule"]] = None, + enable_bgp_route_translation_for_nat: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword extended_location: The extended location of type local virtual network gateway. + :paramtype extended_location: ~azure.mgmt.network.v2021_08_01.models.ExtendedLocation + :keyword ip_configurations: IP configurations for virtual network gateway. + :paramtype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayIPConfiguration] + :keyword gateway_type: The type of this virtual network gateway. Possible values include: + "Vpn", "ExpressRoute", "LocalGateway". + :paramtype gateway_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayType + :keyword vpn_type: The type of this virtual network gateway. Possible values include: + "PolicyBased", "RouteBased". + :paramtype vpn_type: str or ~azure.mgmt.network.v2021_08_01.models.VpnType + :keyword vpn_gateway_generation: The generation for this VirtualNetworkGateway. Must be None if + gatewayType is not VPN. Possible values include: "None", "Generation1", "Generation2". + :paramtype vpn_gateway_generation: str or + ~azure.mgmt.network.v2021_08_01.models.VpnGatewayGeneration + :keyword enable_bgp: Whether BGP is enabled for this virtual network gateway or not. + :paramtype enable_bgp: bool + :keyword enable_private_ip_address: Whether private IP needs to be enabled on this gateway for + connections or not. + :paramtype enable_private_ip_address: bool + :keyword active: ActiveActive flag. + :paramtype active: bool + :keyword disable_ip_sec_replay_protection: disableIPSecReplayProtection flag. + :paramtype disable_ip_sec_replay_protection: bool + :keyword gateway_default_site: The reference to the LocalNetworkGateway resource which + represents local network site having default routes. Assign Null value in case of removing + existing default site setting. + :paramtype gateway_default_site: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword sku: The reference to the VirtualNetworkGatewaySku resource which represents the SKU + selected for Virtual network gateway. + :paramtype sku: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewaySku + :keyword vpn_client_configuration: The reference to the VpnClientConfiguration resource which + represents the P2S VpnClient configurations. + :paramtype vpn_client_configuration: + ~azure.mgmt.network.v2021_08_01.models.VpnClientConfiguration + :keyword bgp_settings: Virtual network gateway's BGP speaker settings. + :paramtype bgp_settings: ~azure.mgmt.network.v2021_08_01.models.BgpSettings + :keyword custom_routes: The reference to the address space resource which represents the custom + routes address space specified by the customer for virtual network gateway and VpnClient. + :paramtype custom_routes: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :keyword enable_dns_forwarding: Whether dns forwarding is enabled or not. + :paramtype enable_dns_forwarding: bool + :keyword v_net_extended_location_resource_id: Customer vnet resource id. VirtualNetworkGateway + of type local gateway is associated with the customer vnet. + :paramtype v_net_extended_location_resource_id: str + :keyword nat_rules: NatRules for virtual network gateway. + :paramtype nat_rules: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule] + :keyword enable_bgp_route_translation_for_nat: EnableBgpRouteTranslationForNat flag. + :paramtype enable_bgp_route_translation_for_nat: bool + """ + super(VirtualNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.ip_configurations = ip_configurations + self.gateway_type = gateway_type + self.vpn_type = vpn_type + self.vpn_gateway_generation = vpn_gateway_generation + self.enable_bgp = enable_bgp + self.enable_private_ip_address = enable_private_ip_address + self.active = active + self.disable_ip_sec_replay_protection = disable_ip_sec_replay_protection + self.gateway_default_site = gateway_default_site + self.sku = sku + self.vpn_client_configuration = vpn_client_configuration + self.bgp_settings = bgp_settings + self.custom_routes = custom_routes + self.resource_guid = None + self.provisioning_state = None + self.enable_dns_forwarding = enable_dns_forwarding + self.inbound_dns_forwarding_endpoint = None + self.v_net_extended_location_resource_id = v_net_extended_location_resource_id + self.nat_rules = nat_rules + self.enable_bgp_route_translation_for_nat = enable_bgp_route_translation_for_nat + + +class VirtualNetworkGatewayConnection(Resource): + """A common class for general resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar authorization_key: The authorizationKey. + :vartype authorization_key: str + :ivar virtual_network_gateway1: Required. The reference to virtual network gateway resource. + :vartype virtual_network_gateway1: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway + :ivar virtual_network_gateway2: The reference to virtual network gateway resource. + :vartype virtual_network_gateway2: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway + :ivar local_network_gateway2: The reference to local network gateway resource. + :vartype local_network_gateway2: ~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway + :ivar ingress_nat_rules: List of ingress NatRules. + :vartype ingress_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar egress_nat_rules: List of egress NatRules. + :vartype egress_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar connection_type: Required. Gateway connection type. Possible values include: "IPsec", + "Vnet2Vnet", "ExpressRoute", "VPNClient". + :vartype connection_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionType + :ivar connection_protocol: Connection protocol used for this connection. Possible values + include: "IKEv2", "IKEv1". + :vartype connection_protocol: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionProtocol + :ivar routing_weight: The routing weight. + :vartype routing_weight: int + :ivar dpd_timeout_seconds: The dead peer detection timeout of this connection in seconds. + :vartype dpd_timeout_seconds: int + :ivar connection_mode: The connection mode for this connection. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :vartype connection_mode: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionMode + :ivar shared_key: The IPSec shared key. + :vartype shared_key: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionStatus + :ivar tunnel_connection_status: Collection of all tunnels' connection health status. + :vartype tunnel_connection_status: + list[~azure.mgmt.network.v2021_08_01.models.TunnelConnectionHealth] + :ivar egress_bytes_transferred: The egress bytes transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. + :vartype ingress_bytes_transferred: long + :ivar peer: The reference to peerings resource. + :vartype peer: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar enable_bgp: EnableBgp flag. + :vartype enable_bgp: bool + :ivar gateway_custom_bgp_ip_addresses: GatewayCustomBgpIpAddresses to be used for virtual + network gateway Connection. + :vartype gateway_custom_bgp_ip_addresses: + list[~azure.mgmt.network.v2021_08_01.models.GatewayCustomBgpIpAddressIpConfiguration] + :ivar use_local_azure_ip_address: Use private local Azure IP for the connection. + :vartype use_local_azure_ip_address: bool + :ivar use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :vartype use_policy_based_traffic_selectors: bool + :ivar ipsec_policies: The IPSec Policies to be considered by this connection. + :vartype ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :ivar traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :vartype traffic_selector_policies: + list[~azure.mgmt.network.v2021_08_01.models.TrafficSelectorPolicy] + :ivar resource_guid: The resource GUID property of the virtual network gateway connection + resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. + :vartype express_route_gateway_bypass: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_network_gateway1': {'required': True}, + 'connection_type': {'required': True}, + 'connection_status': {'readonly': True}, + 'tunnel_connection_status': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, + 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, + 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, + 'ingress_nat_rules': {'key': 'properties.ingressNatRules', 'type': '[SubResource]'}, + 'egress_nat_rules': {'key': 'properties.egressNatRules', 'type': '[SubResource]'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, + 'connection_protocol': {'key': 'properties.connectionProtocol', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'dpd_timeout_seconds': {'key': 'properties.dpdTimeoutSeconds', 'type': 'int'}, + 'connection_mode': {'key': 'properties.connectionMode', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'gateway_custom_bgp_ip_addresses': {'key': 'properties.gatewayCustomBgpIpAddresses', 'type': '[GatewayCustomBgpIpAddressIpConfiguration]'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + } + + def __init__( + self, + *, + virtual_network_gateway1: "VirtualNetworkGateway", + connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + authorization_key: Optional[str] = None, + virtual_network_gateway2: Optional["VirtualNetworkGateway"] = None, + local_network_gateway2: Optional["LocalNetworkGateway"] = None, + ingress_nat_rules: Optional[List["SubResource"]] = None, + egress_nat_rules: Optional[List["SubResource"]] = None, + connection_protocol: Optional[Union[str, "VirtualNetworkGatewayConnectionProtocol"]] = None, + routing_weight: Optional[int] = None, + dpd_timeout_seconds: Optional[int] = None, + connection_mode: Optional[Union[str, "VirtualNetworkGatewayConnectionMode"]] = None, + shared_key: Optional[str] = None, + peer: Optional["SubResource"] = None, + enable_bgp: Optional[bool] = None, + gateway_custom_bgp_ip_addresses: Optional[List["GatewayCustomBgpIpAddressIpConfiguration"]] = None, + use_local_azure_ip_address: Optional[bool] = None, + use_policy_based_traffic_selectors: Optional[bool] = None, + ipsec_policies: Optional[List["IpsecPolicy"]] = None, + traffic_selector_policies: Optional[List["TrafficSelectorPolicy"]] = None, + express_route_gateway_bypass: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword authorization_key: The authorizationKey. + :paramtype authorization_key: str + :keyword virtual_network_gateway1: Required. The reference to virtual network gateway resource. + :paramtype virtual_network_gateway1: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway + :keyword virtual_network_gateway2: The reference to virtual network gateway resource. + :paramtype virtual_network_gateway2: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway + :keyword local_network_gateway2: The reference to local network gateway resource. + :paramtype local_network_gateway2: ~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway + :keyword ingress_nat_rules: List of ingress NatRules. + :paramtype ingress_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword egress_nat_rules: List of egress NatRules. + :paramtype egress_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword connection_type: Required. Gateway connection type. Possible values include: "IPsec", + "Vnet2Vnet", "ExpressRoute", "VPNClient". + :paramtype connection_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionType + :keyword connection_protocol: Connection protocol used for this connection. Possible values + include: "IKEv2", "IKEv1". + :paramtype connection_protocol: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionProtocol + :keyword routing_weight: The routing weight. + :paramtype routing_weight: int + :keyword dpd_timeout_seconds: The dead peer detection timeout of this connection in seconds. + :paramtype dpd_timeout_seconds: int + :keyword connection_mode: The connection mode for this connection. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :paramtype connection_mode: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionMode + :keyword shared_key: The IPSec shared key. + :paramtype shared_key: str + :keyword peer: The reference to peerings resource. + :paramtype peer: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword enable_bgp: EnableBgp flag. + :paramtype enable_bgp: bool + :keyword gateway_custom_bgp_ip_addresses: GatewayCustomBgpIpAddresses to be used for virtual + network gateway Connection. + :paramtype gateway_custom_bgp_ip_addresses: + list[~azure.mgmt.network.v2021_08_01.models.GatewayCustomBgpIpAddressIpConfiguration] + :keyword use_local_azure_ip_address: Use private local Azure IP for the connection. + :paramtype use_local_azure_ip_address: bool + :keyword use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :paramtype use_policy_based_traffic_selectors: bool + :keyword ipsec_policies: The IPSec Policies to be considered by this connection. + :paramtype ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :keyword traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :paramtype traffic_selector_policies: + list[~azure.mgmt.network.v2021_08_01.models.TrafficSelectorPolicy] + :keyword express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. + :paramtype express_route_gateway_bypass: bool + """ + super(VirtualNetworkGatewayConnection, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.authorization_key = authorization_key + self.virtual_network_gateway1 = virtual_network_gateway1 + self.virtual_network_gateway2 = virtual_network_gateway2 + self.local_network_gateway2 = local_network_gateway2 + self.ingress_nat_rules = ingress_nat_rules + self.egress_nat_rules = egress_nat_rules + self.connection_type = connection_type + self.connection_protocol = connection_protocol + self.routing_weight = routing_weight + self.dpd_timeout_seconds = dpd_timeout_seconds + self.connection_mode = connection_mode + self.shared_key = shared_key + self.connection_status = None + self.tunnel_connection_status = None + self.egress_bytes_transferred = None + self.ingress_bytes_transferred = None + self.peer = peer + self.enable_bgp = enable_bgp + self.gateway_custom_bgp_ip_addresses = gateway_custom_bgp_ip_addresses + self.use_local_azure_ip_address = use_local_azure_ip_address + self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors + self.ipsec_policies = ipsec_policies + self.traffic_selector_policies = traffic_selector_policies + self.resource_guid = None + self.provisioning_state = None + self.express_route_gateway_bypass = express_route_gateway_bypass + + +class VirtualNetworkGatewayConnectionListEntity(Resource): + """A common class for general resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar authorization_key: The authorizationKey. + :vartype authorization_key: str + :ivar virtual_network_gateway1: Required. The reference to virtual network gateway resource. + :vartype virtual_network_gateway1: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkConnectionGatewayReference + :ivar virtual_network_gateway2: The reference to virtual network gateway resource. + :vartype virtual_network_gateway2: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkConnectionGatewayReference + :ivar local_network_gateway2: The reference to local network gateway resource. + :vartype local_network_gateway2: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkConnectionGatewayReference + :ivar connection_type: Required. Gateway connection type. Possible values include: "IPsec", + "Vnet2Vnet", "ExpressRoute", "VPNClient". + :vartype connection_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionType + :ivar connection_protocol: Connection protocol used for this connection. Possible values + include: "IKEv2", "IKEv1". + :vartype connection_protocol: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionProtocol + :ivar routing_weight: The routing weight. + :vartype routing_weight: int + :ivar connection_mode: The connection mode for this connection. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :vartype connection_mode: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionMode + :ivar shared_key: The IPSec shared key. + :vartype shared_key: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionStatus + :ivar tunnel_connection_status: Collection of all tunnels' connection health status. + :vartype tunnel_connection_status: + list[~azure.mgmt.network.v2021_08_01.models.TunnelConnectionHealth] + :ivar egress_bytes_transferred: The egress bytes transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. + :vartype ingress_bytes_transferred: long + :ivar peer: The reference to peerings resource. + :vartype peer: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar enable_bgp: EnableBgp flag. + :vartype enable_bgp: bool + :ivar gateway_custom_bgp_ip_addresses: GatewayCustomBgpIpAddresses to be used for virtual + network gateway Connection. + :vartype gateway_custom_bgp_ip_addresses: + list[~azure.mgmt.network.v2021_08_01.models.GatewayCustomBgpIpAddressIpConfiguration] + :ivar use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :vartype use_policy_based_traffic_selectors: bool + :ivar ipsec_policies: The IPSec Policies to be considered by this connection. + :vartype ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :ivar traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :vartype traffic_selector_policies: + list[~azure.mgmt.network.v2021_08_01.models.TrafficSelectorPolicy] + :ivar resource_guid: The resource GUID property of the virtual network gateway connection + resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. + :vartype express_route_gateway_bypass: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_network_gateway1': {'required': True}, + 'connection_type': {'required': True}, + 'connection_status': {'readonly': True}, + 'tunnel_connection_status': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, + 'connection_protocol': {'key': 'properties.connectionProtocol', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'connection_mode': {'key': 'properties.connectionMode', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'gateway_custom_bgp_ip_addresses': {'key': 'properties.gatewayCustomBgpIpAddresses', 'type': '[GatewayCustomBgpIpAddressIpConfiguration]'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + } + + def __init__( + self, + *, + virtual_network_gateway1: "VirtualNetworkConnectionGatewayReference", + connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + authorization_key: Optional[str] = None, + virtual_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, + local_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, + connection_protocol: Optional[Union[str, "VirtualNetworkGatewayConnectionProtocol"]] = None, + routing_weight: Optional[int] = None, + connection_mode: Optional[Union[str, "VirtualNetworkGatewayConnectionMode"]] = None, + shared_key: Optional[str] = None, + peer: Optional["SubResource"] = None, + enable_bgp: Optional[bool] = None, + gateway_custom_bgp_ip_addresses: Optional[List["GatewayCustomBgpIpAddressIpConfiguration"]] = None, + use_policy_based_traffic_selectors: Optional[bool] = None, + ipsec_policies: Optional[List["IpsecPolicy"]] = None, + traffic_selector_policies: Optional[List["TrafficSelectorPolicy"]] = None, + express_route_gateway_bypass: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword authorization_key: The authorizationKey. + :paramtype authorization_key: str + :keyword virtual_network_gateway1: Required. The reference to virtual network gateway resource. + :paramtype virtual_network_gateway1: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkConnectionGatewayReference + :keyword virtual_network_gateway2: The reference to virtual network gateway resource. + :paramtype virtual_network_gateway2: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkConnectionGatewayReference + :keyword local_network_gateway2: The reference to local network gateway resource. + :paramtype local_network_gateway2: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkConnectionGatewayReference + :keyword connection_type: Required. Gateway connection type. Possible values include: "IPsec", + "Vnet2Vnet", "ExpressRoute", "VPNClient". + :paramtype connection_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionType + :keyword connection_protocol: Connection protocol used for this connection. Possible values + include: "IKEv2", "IKEv1". + :paramtype connection_protocol: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionProtocol + :keyword routing_weight: The routing weight. + :paramtype routing_weight: int + :keyword connection_mode: The connection mode for this connection. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :paramtype connection_mode: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionMode + :keyword shared_key: The IPSec shared key. + :paramtype shared_key: str + :keyword peer: The reference to peerings resource. + :paramtype peer: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword enable_bgp: EnableBgp flag. + :paramtype enable_bgp: bool + :keyword gateway_custom_bgp_ip_addresses: GatewayCustomBgpIpAddresses to be used for virtual + network gateway Connection. + :paramtype gateway_custom_bgp_ip_addresses: + list[~azure.mgmt.network.v2021_08_01.models.GatewayCustomBgpIpAddressIpConfiguration] + :keyword use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :paramtype use_policy_based_traffic_selectors: bool + :keyword ipsec_policies: The IPSec Policies to be considered by this connection. + :paramtype ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :keyword traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :paramtype traffic_selector_policies: + list[~azure.mgmt.network.v2021_08_01.models.TrafficSelectorPolicy] + :keyword express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. + :paramtype express_route_gateway_bypass: bool + """ + super(VirtualNetworkGatewayConnectionListEntity, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.authorization_key = authorization_key + self.virtual_network_gateway1 = virtual_network_gateway1 + self.virtual_network_gateway2 = virtual_network_gateway2 + self.local_network_gateway2 = local_network_gateway2 + self.connection_type = connection_type + self.connection_protocol = connection_protocol + self.routing_weight = routing_weight + self.connection_mode = connection_mode + self.shared_key = shared_key + self.connection_status = None + self.tunnel_connection_status = None + self.egress_bytes_transferred = None + self.ingress_bytes_transferred = None + self.peer = peer + self.enable_bgp = enable_bgp + self.gateway_custom_bgp_ip_addresses = gateway_custom_bgp_ip_addresses + self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors + self.ipsec_policies = ipsec_policies + self.traffic_selector_policies = traffic_selector_policies + self.resource_guid = None + self.provisioning_state = None + self.express_route_gateway_bypass = express_route_gateway_bypass + + +class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworkGatewayConnections API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of VirtualNetworkGatewayConnection resources that exists in a resource + group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkGatewayConnection"]] = None, + **kwargs + ): + """ + :keyword value: A list of VirtualNetworkGatewayConnection resources that exists in a resource + group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection] + """ + super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class VirtualNetworkGatewayIPConfiguration(SubResource): + """IP configuration for virtual network gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :vartype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :ivar subnet: The reference to the subnet resource. + :vartype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar public_ip_address: The reference to the public IP resource. + :vartype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar private_ip_address: Private IP Address for this gateway. + :vartype private_ip_address: str + :ivar provisioning_state: The provisioning state of the virtual network gateway IP + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["SubResource"] = None, + public_ip_address: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword private_ip_allocation_method: The private IP address allocation method. Possible + values include: "Static", "Dynamic". + :paramtype private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_08_01.models.IPAllocationMethod + :keyword subnet: The reference to the subnet resource. + :paramtype subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword public_ip_address: The reference to the public IP resource. + :paramtype public_ip_address: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(VirtualNetworkGatewayIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.public_ip_address = public_ip_address + self.private_ip_address = None + self.provisioning_state = None + + +class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): + """Response for the VirtualNetworkGatewayListConnections API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of VirtualNetworkGatewayConnection resources that exists in a resource + group. + :vartype value: + list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionListEntity] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkGatewayConnectionListEntity"]] = None, + **kwargs + ): + """ + :keyword value: A list of VirtualNetworkGatewayConnection resources that exists in a resource + group. + :paramtype value: + list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionListEntity] + """ + super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class VirtualNetworkGatewayListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworkGateways API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: A list of VirtualNetworkGateway resources that exists in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkGateway"]] = None, + **kwargs + ): + """ + :keyword value: A list of VirtualNetworkGateway resources that exists in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway] + """ + super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class VirtualNetworkGatewayNatRule(SubResource): + """VirtualNetworkGatewayNatRule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: The provisioning state of the NAT Rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar type_properties_type: The type of NAT rule for VPN NAT. Possible values include: + "Static", "Dynamic". + :vartype type_properties_type: str or ~azure.mgmt.network.v2021_08_01.models.VpnNatRuleType + :ivar mode: The Source NAT direction of a VPN NAT. Possible values include: "EgressSnat", + "IngressSnat". + :vartype mode: str or ~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMode + :ivar internal_mappings: The private IP address internal mapping for NAT. + :vartype internal_mappings: list[~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMapping] + :ivar external_mappings: The private IP address external mapping for NAT. + :vartype external_mappings: list[~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMapping] + :ivar ip_configuration_id: The IP Configuration ID this NAT rule applies to. + :vartype ip_configuration_id: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'internal_mappings': {'key': 'properties.internalMappings', 'type': '[VpnNatRuleMapping]'}, + 'external_mappings': {'key': 'properties.externalMappings', 'type': '[VpnNatRuleMapping]'}, + 'ip_configuration_id': {'key': 'properties.ipConfigurationId', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_properties_type: Optional[Union[str, "VpnNatRuleType"]] = None, + mode: Optional[Union[str, "VpnNatRuleMode"]] = None, + internal_mappings: Optional[List["VpnNatRuleMapping"]] = None, + external_mappings: Optional[List["VpnNatRuleMapping"]] = None, + ip_configuration_id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword type_properties_type: The type of NAT rule for VPN NAT. Possible values include: + "Static", "Dynamic". + :paramtype type_properties_type: str or ~azure.mgmt.network.v2021_08_01.models.VpnNatRuleType + :keyword mode: The Source NAT direction of a VPN NAT. Possible values include: "EgressSnat", + "IngressSnat". + :paramtype mode: str or ~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMode + :keyword internal_mappings: The private IP address internal mapping for NAT. + :paramtype internal_mappings: list[~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMapping] + :keyword external_mappings: The private IP address external mapping for NAT. + :paramtype external_mappings: list[~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMapping] + :keyword ip_configuration_id: The IP Configuration ID this NAT rule applies to. + :paramtype ip_configuration_id: str + """ + super(VirtualNetworkGatewayNatRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.provisioning_state = None + self.type_properties_type = type_properties_type + self.mode = mode + self.internal_mappings = internal_mappings + self.external_mappings = external_mappings + self.ip_configuration_id = ip_configuration_id + + +class VirtualNetworkGatewaySku(msrest.serialization.Model): + """VirtualNetworkGatewaySku details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", + "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3", "VpnGw4", "VpnGw5", "VpnGw1AZ", "VpnGw2AZ", + "VpnGw3AZ", "VpnGw4AZ", "VpnGw5AZ", "ErGw1AZ", "ErGw2AZ", "ErGw3AZ". + :vartype name: str or ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewaySkuName + :ivar tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", + "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3", "VpnGw4", "VpnGw5", "VpnGw1AZ", "VpnGw2AZ", + "VpnGw3AZ", "VpnGw4AZ", "VpnGw5AZ", "ErGw1AZ", "ErGw2AZ", "ErGw3AZ". + :vartype tier: str or ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewaySkuTier + :ivar capacity: The capacity. + :vartype capacity: int + """ + + _validation = { + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "VirtualNetworkGatewaySkuName"]] = None, + tier: Optional[Union[str, "VirtualNetworkGatewaySkuTier"]] = None, + **kwargs + ): + """ + :keyword name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", + "Standard", "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3", "VpnGw4", "VpnGw5", "VpnGw1AZ", + "VpnGw2AZ", "VpnGw3AZ", "VpnGw4AZ", "VpnGw5AZ", "ErGw1AZ", "ErGw2AZ", "ErGw3AZ". + :paramtype name: str or ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewaySkuName + :keyword tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", + "Standard", "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3", "VpnGw4", "VpnGw5", "VpnGw1AZ", + "VpnGw2AZ", "VpnGw3AZ", "VpnGw4AZ", "VpnGw5AZ", "ErGw1AZ", "ErGw2AZ", "ErGw3AZ". + :paramtype tier: str or ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewaySkuTier + """ + super(VirtualNetworkGatewaySku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = None + + +class VirtualNetworkListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworks API service call. + + :ivar value: A list of VirtualNetwork resources in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetwork] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetwork"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of VirtualNetwork resources in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetwork] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(VirtualNetworkListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualNetworkListUsageResult(msrest.serialization.Model): + """Response for the virtual networks GetUsage API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: VirtualNetwork usage stats. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkUsage] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(VirtualNetworkListUsageResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class VirtualNetworkPeering(SubResource): + """Peerings in a virtual network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar allow_virtual_network_access: Whether the VMs in the local virtual network space would be + able to access the VMs in remote virtual network space. + :vartype allow_virtual_network_access: bool + :ivar allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the local virtual + network will be allowed/disallowed in remote virtual network. + :vartype allow_forwarded_traffic: bool + :ivar allow_gateway_transit: If gateway links can be used in remote virtual networking to link + to this virtual network. + :vartype allow_gateway_transit: bool + :ivar use_remote_gateways: If remote gateways can be used on this virtual network. If the flag + is set to true, and allowGatewayTransit on remote peering is also true, virtual network will + use gateways of remote virtual network for transit. Only one peering can have this flag set to + true. This flag cannot be set if virtual network already has a gateway. + :vartype use_remote_gateways: bool + :ivar remote_virtual_network: The reference to the remote virtual network. The remote virtual + network can be in the same or different region (preview). See here to register for the preview + and learn more + (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + :vartype remote_virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar remote_address_space: The reference to the address space peered with the remote virtual + network. + :vartype remote_address_space: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :ivar remote_virtual_network_address_space: The reference to the current address space of the + remote virtual network. + :vartype remote_virtual_network_address_space: + ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :ivar remote_bgp_communities: The reference to the remote virtual network's Bgp Communities. + :vartype remote_bgp_communities: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkBgpCommunities + :ivar remote_virtual_network_encryption: The reference to the remote virtual network's + encryption. + :vartype remote_virtual_network_encryption: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkEncryption + :ivar peering_state: The status of the virtual network peering. Possible values include: + "Initiated", "Connected", "Disconnected". + :vartype peering_state: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeeringState + :ivar peering_sync_level: The peering sync status of the virtual network peering. Possible + values include: "FullyInSync", "RemoteNotInSync", "LocalNotInSync", "LocalAndRemoteNotInSync". + :vartype peering_sync_level: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeeringLevel + :ivar provisioning_state: The provisioning state of the virtual network peering resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar do_not_verify_remote_gateways: If we need to verify the provisioning state of the remote + gateway. + :vartype do_not_verify_remote_gateways: bool + :ivar resource_guid: The resourceGuid property of the Virtual Network peering resource. + :vartype resource_guid: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'remote_virtual_network_encryption': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, + 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, + 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, + 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, + 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, + 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, + 'remote_virtual_network_address_space': {'key': 'properties.remoteVirtualNetworkAddressSpace', 'type': 'AddressSpace'}, + 'remote_bgp_communities': {'key': 'properties.remoteBgpCommunities', 'type': 'VirtualNetworkBgpCommunities'}, + 'remote_virtual_network_encryption': {'key': 'properties.remoteVirtualNetworkEncryption', 'type': 'VirtualNetworkEncryption'}, + 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, + 'peering_sync_level': {'key': 'properties.peeringSyncLevel', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'do_not_verify_remote_gateways': {'key': 'properties.doNotVerifyRemoteGateways', 'type': 'bool'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + allow_virtual_network_access: Optional[bool] = None, + allow_forwarded_traffic: Optional[bool] = None, + allow_gateway_transit: Optional[bool] = None, + use_remote_gateways: Optional[bool] = None, + remote_virtual_network: Optional["SubResource"] = None, + remote_address_space: Optional["AddressSpace"] = None, + remote_virtual_network_address_space: Optional["AddressSpace"] = None, + remote_bgp_communities: Optional["VirtualNetworkBgpCommunities"] = None, + peering_state: Optional[Union[str, "VirtualNetworkPeeringState"]] = None, + peering_sync_level: Optional[Union[str, "VirtualNetworkPeeringLevel"]] = None, + do_not_verify_remote_gateways: Optional[bool] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword type: Resource type. + :paramtype type: str + :keyword allow_virtual_network_access: Whether the VMs in the local virtual network space would + be able to access the VMs in remote virtual network space. + :paramtype allow_virtual_network_access: bool + :keyword allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the local + virtual network will be allowed/disallowed in remote virtual network. + :paramtype allow_forwarded_traffic: bool + :keyword allow_gateway_transit: If gateway links can be used in remote virtual networking to + link to this virtual network. + :paramtype allow_gateway_transit: bool + :keyword use_remote_gateways: If remote gateways can be used on this virtual network. If the + flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network + will use gateways of remote virtual network for transit. Only one peering can have this flag + set to true. This flag cannot be set if virtual network already has a gateway. + :paramtype use_remote_gateways: bool + :keyword remote_virtual_network: The reference to the remote virtual network. The remote + virtual network can be in the same or different region (preview). See here to register for the + preview and learn more + (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + :paramtype remote_virtual_network: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword remote_address_space: The reference to the address space peered with the remote + virtual network. + :paramtype remote_address_space: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :keyword remote_virtual_network_address_space: The reference to the current address space of + the remote virtual network. + :paramtype remote_virtual_network_address_space: + ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :keyword remote_bgp_communities: The reference to the remote virtual network's Bgp Communities. + :paramtype remote_bgp_communities: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkBgpCommunities + :keyword peering_state: The status of the virtual network peering. Possible values include: + "Initiated", "Connected", "Disconnected". + :paramtype peering_state: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeeringState + :keyword peering_sync_level: The peering sync status of the virtual network peering. Possible + values include: "FullyInSync", "RemoteNotInSync", "LocalNotInSync", "LocalAndRemoteNotInSync". + :paramtype peering_sync_level: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeeringLevel + :keyword do_not_verify_remote_gateways: If we need to verify the provisioning state of the + remote gateway. + :paramtype do_not_verify_remote_gateways: bool + """ + super(VirtualNetworkPeering, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.allow_virtual_network_access = allow_virtual_network_access + self.allow_forwarded_traffic = allow_forwarded_traffic + self.allow_gateway_transit = allow_gateway_transit + self.use_remote_gateways = use_remote_gateways + self.remote_virtual_network = remote_virtual_network + self.remote_address_space = remote_address_space + self.remote_virtual_network_address_space = remote_virtual_network_address_space + self.remote_bgp_communities = remote_bgp_communities + self.remote_virtual_network_encryption = None + self.peering_state = peering_state + self.peering_sync_level = peering_sync_level + self.provisioning_state = None + self.do_not_verify_remote_gateways = do_not_verify_remote_gateways + self.resource_guid = None + + +class VirtualNetworkPeeringListResult(msrest.serialization.Model): + """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. + + :ivar value: The peerings in a virtual network. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkPeering"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The peerings in a virtual network. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualNetworkTap(Resource): + """Virtual Network Tap resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar network_interface_tap_configurations: Specifies the list of resource IDs for the network + interface IP configuration that needs to be tapped. + :vartype network_interface_tap_configurations: + list[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration] + :ivar resource_guid: The resource GUID property of the virtual network tap resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network tap resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar destination_network_interface_ip_configuration: The reference to the private IP Address + of the collector nic that will receive the tap. + :vartype destination_network_interface_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :ivar destination_load_balancer_front_end_ip_configuration: The reference to the private IP + address on the internal Load Balancer that will receive the tap. + :vartype destination_load_balancer_front_end_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration + :ivar destination_port: The VXLAN destination port that will receive the tapped traffic. + :vartype destination_port: int + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interface_tap_configurations': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'network_interface_tap_configurations': {'key': 'properties.networkInterfaceTapConfigurations', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'destination_network_interface_ip_configuration': {'key': 'properties.destinationNetworkInterfaceIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'destination_load_balancer_front_end_ip_configuration': {'key': 'properties.destinationLoadBalancerFrontEndIPConfiguration', 'type': 'FrontendIPConfiguration'}, + 'destination_port': {'key': 'properties.destinationPort', 'type': 'int'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + destination_network_interface_ip_configuration: Optional["NetworkInterfaceIPConfiguration"] = None, + destination_load_balancer_front_end_ip_configuration: Optional["FrontendIPConfiguration"] = None, + destination_port: Optional[int] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword destination_network_interface_ip_configuration: The reference to the private IP + Address of the collector nic that will receive the tap. + :paramtype destination_network_interface_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :keyword destination_load_balancer_front_end_ip_configuration: The reference to the private IP + address on the internal Load Balancer that will receive the tap. + :paramtype destination_load_balancer_front_end_ip_configuration: + ~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration + :keyword destination_port: The VXLAN destination port that will receive the tapped traffic. + :paramtype destination_port: int + """ + super(VirtualNetworkTap, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.network_interface_tap_configurations = None + self.resource_guid = None + self.provisioning_state = None + self.destination_network_interface_ip_configuration = destination_network_interface_ip_configuration + self.destination_load_balancer_front_end_ip_configuration = destination_load_balancer_front_end_ip_configuration + self.destination_port = destination_port + + +class VirtualNetworkTapListResult(msrest.serialization.Model): + """Response for ListVirtualNetworkTap API service call. + + :ivar value: A list of VirtualNetworkTaps in a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkTap]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkTap"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: A list of VirtualNetworkTaps in a resource group. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(VirtualNetworkTapListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualNetworkUsage(msrest.serialization.Model): + """Usage details for subnet. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar current_value: Indicates number of IPs used from the Subnet. + :vartype current_value: float + :ivar id: Subnet identifier. + :vartype id: str + :ivar limit: Indicates the size of the subnet. + :vartype limit: float + :ivar name: The name containing common and localized value for usage. + :vartype name: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkUsageName + :ivar unit: Usage units. Returns 'Count'. + :vartype unit: str + """ + + _validation = { + 'current_value': {'readonly': True}, + 'id': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(VirtualNetworkUsage, self).__init__(**kwargs) + self.current_value = None + self.id = None + self.limit = None + self.name = None + self.unit = None + + +class VirtualNetworkUsageName(msrest.serialization.Model): + """Usage strings container. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar localized_value: Localized subnet size and usage string. + :vartype localized_value: str + :ivar value: Subnet size and usage string. + :vartype value: str + """ + + _validation = { + 'localized_value': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(VirtualNetworkUsageName, self).__init__(**kwargs) + self.localized_value = None + self.value = None + + +class VirtualRouter(Resource): + """VirtualRouter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar virtual_router_asn: VirtualRouter ASN. + :vartype virtual_router_asn: long + :ivar virtual_router_ips: VirtualRouter IPs. + :vartype virtual_router_ips: list[str] + :ivar hosted_subnet: The Subnet on which VirtualRouter is hosted. + :vartype hosted_subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar hosted_gateway: The Gateway on which VirtualRouter is hosted. + :vartype hosted_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar peerings: List of references to VirtualRouterPeerings. + :vartype peerings: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_router_asn': {'maximum': 4294967295, 'minimum': 0}, + 'peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_router_asn': {'key': 'properties.virtualRouterAsn', 'type': 'long'}, + 'virtual_router_ips': {'key': 'properties.virtualRouterIps', 'type': '[str]'}, + 'hosted_subnet': {'key': 'properties.hostedSubnet', 'type': 'SubResource'}, + 'hosted_gateway': {'key': 'properties.hostedGateway', 'type': 'SubResource'}, + 'peerings': {'key': 'properties.peerings', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_router_asn: Optional[int] = None, + virtual_router_ips: Optional[List[str]] = None, + hosted_subnet: Optional["SubResource"] = None, + hosted_gateway: Optional["SubResource"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword virtual_router_asn: VirtualRouter ASN. + :paramtype virtual_router_asn: long + :keyword virtual_router_ips: VirtualRouter IPs. + :paramtype virtual_router_ips: list[str] + :keyword hosted_subnet: The Subnet on which VirtualRouter is hosted. + :paramtype hosted_subnet: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword hosted_gateway: The Gateway on which VirtualRouter is hosted. + :paramtype hosted_gateway: ~azure.mgmt.network.v2021_08_01.models.SubResource + """ + super(VirtualRouter, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.virtual_router_asn = virtual_router_asn + self.virtual_router_ips = virtual_router_ips + self.hosted_subnet = hosted_subnet + self.hosted_gateway = hosted_gateway + self.peerings = None + self.provisioning_state = None + + +class VirtualRouterListResult(msrest.serialization.Model): + """Response for ListVirtualRouters API service call. + + :ivar value: List of Virtual Routers. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualRouter] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualRouter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualRouter"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of Virtual Routers. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualRouter] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(VirtualRouterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualRouterPeering(SubResource): + """Virtual Router Peering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Name of the virtual router peering that is unique within a virtual router. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Peering type. + :vartype type: str + :ivar peer_asn: Peer ASN. + :vartype peer_asn: long + :ivar peer_ip: Peer IP. + :vartype peer_ip: str + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peer_asn': {'key': 'properties.peerAsn', 'type': 'long'}, + 'peer_ip': {'key': 'properties.peerIp', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + peer_asn: Optional[int] = None, + peer_ip: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: Name of the virtual router peering that is unique within a virtual router. + :paramtype name: str + :keyword peer_asn: Peer ASN. + :paramtype peer_asn: long + :keyword peer_ip: Peer IP. + :paramtype peer_ip: str + """ + super(VirtualRouterPeering, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.peer_asn = peer_asn + self.peer_ip = peer_ip + self.provisioning_state = None + + +class VirtualRouterPeeringListResult(msrest.serialization.Model): + """Response for ListVirtualRouterPeerings API service call. + + :ivar value: List of VirtualRouterPeerings in a VirtualRouter. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeering] + :ivar next_link: URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualRouterPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualRouterPeering"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: List of VirtualRouterPeerings in a VirtualRouter. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeering] + :keyword next_link: URL to get the next set of results. + :paramtype next_link: str + """ + super(VirtualRouterPeeringListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualWAN(Resource): + """VirtualWAN Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar disable_vpn_encryption: Vpn encryption to be disabled or not. + :vartype disable_vpn_encryption: bool + :ivar virtual_hubs: List of VirtualHubs in the VirtualWAN. + :vartype virtual_hubs: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar vpn_sites: List of VpnSites in the VirtualWAN. + :vartype vpn_sites: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar allow_branch_to_branch_traffic: True if branch to branch traffic is allowed. + :vartype allow_branch_to_branch_traffic: bool + :ivar allow_vnet_to_vnet_traffic: True if Vnet to Vnet traffic is allowed. + :vartype allow_vnet_to_vnet_traffic: bool + :ivar office365_local_breakout_category: The office local breakout category. Possible values + include: "Optimize", "OptimizeAndAllow", "All", "None". + :vartype office365_local_breakout_category: str or + ~azure.mgmt.network.v2021_08_01.models.OfficeTrafficCategory + :ivar provisioning_state: The provisioning state of the virtual WAN resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar type_properties_type: The type of the VirtualWAN. + :vartype type_properties_type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_hubs': {'readonly': True}, + 'vpn_sites': {'readonly': True}, + 'office365_local_breakout_category': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'disable_vpn_encryption': {'key': 'properties.disableVpnEncryption', 'type': 'bool'}, + 'virtual_hubs': {'key': 'properties.virtualHubs', 'type': '[SubResource]'}, + 'vpn_sites': {'key': 'properties.vpnSites', 'type': '[SubResource]'}, + 'allow_branch_to_branch_traffic': {'key': 'properties.allowBranchToBranchTraffic', 'type': 'bool'}, + 'allow_vnet_to_vnet_traffic': {'key': 'properties.allowVnetToVnetTraffic', 'type': 'bool'}, + 'office365_local_breakout_category': {'key': 'properties.office365LocalBreakoutCategory', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + disable_vpn_encryption: Optional[bool] = None, + allow_branch_to_branch_traffic: Optional[bool] = None, + allow_vnet_to_vnet_traffic: Optional[bool] = None, + type_properties_type: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword disable_vpn_encryption: Vpn encryption to be disabled or not. + :paramtype disable_vpn_encryption: bool + :keyword allow_branch_to_branch_traffic: True if branch to branch traffic is allowed. + :paramtype allow_branch_to_branch_traffic: bool + :keyword allow_vnet_to_vnet_traffic: True if Vnet to Vnet traffic is allowed. + :paramtype allow_vnet_to_vnet_traffic: bool + :keyword type_properties_type: The type of the VirtualWAN. + :paramtype type_properties_type: str + """ + super(VirtualWAN, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.disable_vpn_encryption = disable_vpn_encryption + self.virtual_hubs = None + self.vpn_sites = None + self.allow_branch_to_branch_traffic = allow_branch_to_branch_traffic + self.allow_vnet_to_vnet_traffic = allow_vnet_to_vnet_traffic + self.office365_local_breakout_category = None + self.provisioning_state = None + self.type_properties_type = type_properties_type + + +class VirtualWanSecurityProvider(msrest.serialization.Model): + """Collection of SecurityProviders. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the security provider. + :vartype name: str + :ivar url: Url of the security provider. + :vartype url: str + :ivar type: Name of the security provider. Possible values include: "External", "Native". + :vartype type: str or ~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProviderType + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + url: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the security provider. + :paramtype name: str + :keyword url: Url of the security provider. + :paramtype url: str + """ + super(VirtualWanSecurityProvider, self).__init__(**kwargs) + self.name = name + self.url = url + self.type = None + + +class VirtualWanSecurityProviders(msrest.serialization.Model): + """Collection of SecurityProviders. + + :ivar supported_providers: List of VirtualWAN security providers. + :vartype supported_providers: + list[~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProvider] + """ + + _attribute_map = { + 'supported_providers': {'key': 'supportedProviders', 'type': '[VirtualWanSecurityProvider]'}, + } + + def __init__( + self, + *, + supported_providers: Optional[List["VirtualWanSecurityProvider"]] = None, + **kwargs + ): + """ + :keyword supported_providers: List of VirtualWAN security providers. + :paramtype supported_providers: + list[~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProvider] + """ + super(VirtualWanSecurityProviders, self).__init__(**kwargs) + self.supported_providers = supported_providers + + +class VirtualWanVpnProfileParameters(msrest.serialization.Model): + """Virtual Wan Vpn profile parameters Vpn profile generation. + + :ivar vpn_server_configuration_resource_id: VpnServerConfiguration partial resource uri with + which VirtualWan is associated to. + :vartype vpn_server_configuration_resource_id: str + :ivar authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :vartype authentication_method: str or + ~azure.mgmt.network.v2021_08_01.models.AuthenticationMethod + """ + + _attribute_map = { + 'vpn_server_configuration_resource_id': {'key': 'vpnServerConfigurationResourceId', 'type': 'str'}, + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + vpn_server_configuration_resource_id: Optional[str] = None, + authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, + **kwargs + ): + """ + :keyword vpn_server_configuration_resource_id: VpnServerConfiguration partial resource uri with + which VirtualWan is associated to. + :paramtype vpn_server_configuration_resource_id: str + :keyword authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :paramtype authentication_method: str or + ~azure.mgmt.network.v2021_08_01.models.AuthenticationMethod + """ + super(VirtualWanVpnProfileParameters, self).__init__(**kwargs) + self.vpn_server_configuration_resource_id = vpn_server_configuration_resource_id + self.authentication_method = authentication_method + + +class VM(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'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}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + """ + super(VM, self).__init__(id=id, location=location, tags=tags, **kwargs) + + +class VnetRoute(msrest.serialization.Model): + """List of routes that control routing from VirtualHub into a virtual network connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar static_routes: List of all Static Routes. + :vartype static_routes: list[~azure.mgmt.network.v2021_08_01.models.StaticRoute] + :ivar bgp_connections: The list of references to HubBgpConnection objects. + :vartype bgp_connections: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _validation = { + 'bgp_connections': {'readonly': True}, + } + + _attribute_map = { + 'static_routes': {'key': 'staticRoutes', 'type': '[StaticRoute]'}, + 'bgp_connections': {'key': 'bgpConnections', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + static_routes: Optional[List["StaticRoute"]] = None, + **kwargs + ): + """ + :keyword static_routes: List of all Static Routes. + :paramtype static_routes: list[~azure.mgmt.network.v2021_08_01.models.StaticRoute] + """ + super(VnetRoute, self).__init__(**kwargs) + self.static_routes = static_routes + self.bgp_connections = None + + +class VpnClientConfiguration(msrest.serialization.Model): + """VpnClientConfiguration for P2S client. + + :ivar vpn_client_address_pool: The reference to the address space resource which represents + Address space for P2S VpnClient. + :vartype vpn_client_address_pool: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :ivar vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. + :vartype vpn_client_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnClientRootCertificate] + :ivar vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network gateway. + :vartype vpn_client_revoked_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnClientRevokedCertificate] + :ivar vpn_client_protocols: VpnClientProtocols for Virtual network gateway. + :vartype vpn_client_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.VpnClientProtocol] + :ivar vpn_authentication_types: VPN authentication types for the virtual network gateway.. + :vartype vpn_authentication_types: list[str or + ~azure.mgmt.network.v2021_08_01.models.VpnAuthenticationType] + :ivar vpn_client_ipsec_policies: VpnClientIpsecPolicies for virtual network gateway P2S client. + :vartype vpn_client_ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :ivar radius_server_address: The radius server address property of the VirtualNetworkGateway + resource for vpn client connection. + :vartype radius_server_address: str + :ivar radius_server_secret: The radius secret property of the VirtualNetworkGateway resource + for vpn client connection. + :vartype radius_server_secret: str + :ivar radius_servers: The radiusServers property for multiple radius server configuration. + :vartype radius_servers: list[~azure.mgmt.network.v2021_08_01.models.RadiusServer] + :ivar aad_tenant: The AADTenant property of the VirtualNetworkGateway resource for vpn client + connection used for AAD authentication. + :vartype aad_tenant: str + :ivar aad_audience: The AADAudience property of the VirtualNetworkGateway resource for vpn + client connection used for AAD authentication. + :vartype aad_audience: str + :ivar aad_issuer: The AADIssuer property of the VirtualNetworkGateway resource for vpn client + connection used for AAD authentication. + :vartype aad_issuer: str + """ + + _attribute_map = { + 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, + 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, + 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, + 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, + 'vpn_authentication_types': {'key': 'vpnAuthenticationTypes', 'type': '[str]'}, + 'vpn_client_ipsec_policies': {'key': 'vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, + 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, + 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, + 'radius_servers': {'key': 'radiusServers', 'type': '[RadiusServer]'}, + 'aad_tenant': {'key': 'aadTenant', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + 'aad_issuer': {'key': 'aadIssuer', 'type': 'str'}, + } + + def __init__( + self, + *, + vpn_client_address_pool: Optional["AddressSpace"] = None, + vpn_client_root_certificates: Optional[List["VpnClientRootCertificate"]] = None, + vpn_client_revoked_certificates: Optional[List["VpnClientRevokedCertificate"]] = None, + vpn_client_protocols: Optional[List[Union[str, "VpnClientProtocol"]]] = None, + vpn_authentication_types: Optional[List[Union[str, "VpnAuthenticationType"]]] = None, + vpn_client_ipsec_policies: Optional[List["IpsecPolicy"]] = None, + radius_server_address: Optional[str] = None, + radius_server_secret: Optional[str] = None, + radius_servers: Optional[List["RadiusServer"]] = None, + aad_tenant: Optional[str] = None, + aad_audience: Optional[str] = None, + aad_issuer: Optional[str] = None, + **kwargs + ): + """ + :keyword vpn_client_address_pool: The reference to the address space resource which represents + Address space for P2S VpnClient. + :paramtype vpn_client_address_pool: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :keyword vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. + :paramtype vpn_client_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnClientRootCertificate] + :keyword vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network + gateway. + :paramtype vpn_client_revoked_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnClientRevokedCertificate] + :keyword vpn_client_protocols: VpnClientProtocols for Virtual network gateway. + :paramtype vpn_client_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.VpnClientProtocol] + :keyword vpn_authentication_types: VPN authentication types for the virtual network gateway.. + :paramtype vpn_authentication_types: list[str or + ~azure.mgmt.network.v2021_08_01.models.VpnAuthenticationType] + :keyword vpn_client_ipsec_policies: VpnClientIpsecPolicies for virtual network gateway P2S + client. + :paramtype vpn_client_ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :keyword radius_server_address: The radius server address property of the VirtualNetworkGateway + resource for vpn client connection. + :paramtype radius_server_address: str + :keyword radius_server_secret: The radius secret property of the VirtualNetworkGateway resource + for vpn client connection. + :paramtype radius_server_secret: str + :keyword radius_servers: The radiusServers property for multiple radius server configuration. + :paramtype radius_servers: list[~azure.mgmt.network.v2021_08_01.models.RadiusServer] + :keyword aad_tenant: The AADTenant property of the VirtualNetworkGateway resource for vpn + client connection used for AAD authentication. + :paramtype aad_tenant: str + :keyword aad_audience: The AADAudience property of the VirtualNetworkGateway resource for vpn + client connection used for AAD authentication. + :paramtype aad_audience: str + :keyword aad_issuer: The AADIssuer property of the VirtualNetworkGateway resource for vpn + client connection used for AAD authentication. + :paramtype aad_issuer: str + """ + super(VpnClientConfiguration, self).__init__(**kwargs) + self.vpn_client_address_pool = vpn_client_address_pool + self.vpn_client_root_certificates = vpn_client_root_certificates + self.vpn_client_revoked_certificates = vpn_client_revoked_certificates + self.vpn_client_protocols = vpn_client_protocols + self.vpn_authentication_types = vpn_authentication_types + self.vpn_client_ipsec_policies = vpn_client_ipsec_policies + self.radius_server_address = radius_server_address + self.radius_server_secret = radius_server_secret + self.radius_servers = radius_servers + self.aad_tenant = aad_tenant + self.aad_audience = aad_audience + self.aad_issuer = aad_issuer + + +class VpnClientConnectionHealth(msrest.serialization.Model): + """VpnClientConnectionHealth properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar total_ingress_bytes_transferred: Total of the Ingress Bytes Transferred in this P2S Vpn + connection. + :vartype total_ingress_bytes_transferred: long + :ivar total_egress_bytes_transferred: Total of the Egress Bytes Transferred in this connection. + :vartype total_egress_bytes_transferred: long + :ivar vpn_client_connections_count: The total of p2s vpn clients connected at this time to this + P2SVpnGateway. + :vartype vpn_client_connections_count: int + :ivar allocated_ip_addresses: List of allocated ip addresses to the connected p2s vpn clients. + :vartype allocated_ip_addresses: list[str] + """ + + _validation = { + 'total_ingress_bytes_transferred': {'readonly': True}, + 'total_egress_bytes_transferred': {'readonly': True}, + } + + _attribute_map = { + 'total_ingress_bytes_transferred': {'key': 'totalIngressBytesTransferred', 'type': 'long'}, + 'total_egress_bytes_transferred': {'key': 'totalEgressBytesTransferred', 'type': 'long'}, + 'vpn_client_connections_count': {'key': 'vpnClientConnectionsCount', 'type': 'int'}, + 'allocated_ip_addresses': {'key': 'allocatedIpAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + vpn_client_connections_count: Optional[int] = None, + allocated_ip_addresses: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword vpn_client_connections_count: The total of p2s vpn clients connected at this time to + this P2SVpnGateway. + :paramtype vpn_client_connections_count: int + :keyword allocated_ip_addresses: List of allocated ip addresses to the connected p2s vpn + clients. + :paramtype allocated_ip_addresses: list[str] + """ + super(VpnClientConnectionHealth, self).__init__(**kwargs) + self.total_ingress_bytes_transferred = None + self.total_egress_bytes_transferred = None + self.vpn_client_connections_count = vpn_client_connections_count + self.allocated_ip_addresses = allocated_ip_addresses + + +class VpnClientConnectionHealthDetail(msrest.serialization.Model): + """VPN client connection health detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vpn_connection_id: The vpn client Id. + :vartype vpn_connection_id: str + :ivar vpn_connection_duration: The duration time of a connected vpn client. + :vartype vpn_connection_duration: long + :ivar vpn_connection_time: The start time of a connected vpn client. + :vartype vpn_connection_time: str + :ivar public_ip_address: The public Ip of a connected vpn client. + :vartype public_ip_address: str + :ivar private_ip_address: The assigned private Ip of a connected vpn client. + :vartype private_ip_address: str + :ivar vpn_user_name: The user name of a connected vpn client. + :vartype vpn_user_name: str + :ivar max_bandwidth: The max band width. + :vartype max_bandwidth: long + :ivar egress_packets_transferred: The egress packets per second. + :vartype egress_packets_transferred: long + :ivar egress_bytes_transferred: The egress bytes per second. + :vartype egress_bytes_transferred: long + :ivar ingress_packets_transferred: The ingress packets per second. + :vartype ingress_packets_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes per second. + :vartype ingress_bytes_transferred: long + :ivar max_packets_per_second: The max packets transferred per second. + :vartype max_packets_per_second: long + """ + + _validation = { + 'vpn_connection_id': {'readonly': True}, + 'vpn_connection_duration': {'readonly': True}, + 'vpn_connection_time': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'vpn_user_name': {'readonly': True}, + 'max_bandwidth': {'readonly': True}, + 'egress_packets_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_packets_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'max_packets_per_second': {'readonly': True}, + } + + _attribute_map = { + 'vpn_connection_id': {'key': 'vpnConnectionId', 'type': 'str'}, + 'vpn_connection_duration': {'key': 'vpnConnectionDuration', 'type': 'long'}, + 'vpn_connection_time': {'key': 'vpnConnectionTime', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'vpn_user_name': {'key': 'vpnUserName', 'type': 'str'}, + 'max_bandwidth': {'key': 'maxBandwidth', 'type': 'long'}, + 'egress_packets_transferred': {'key': 'egressPacketsTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, + 'ingress_packets_transferred': {'key': 'ingressPacketsTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, + 'max_packets_per_second': {'key': 'maxPacketsPerSecond', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(VpnClientConnectionHealthDetail, self).__init__(**kwargs) + self.vpn_connection_id = None + self.vpn_connection_duration = None + self.vpn_connection_time = None + self.public_ip_address = None + self.private_ip_address = None + self.vpn_user_name = None + self.max_bandwidth = None + self.egress_packets_transferred = None + self.egress_bytes_transferred = None + self.ingress_packets_transferred = None + self.ingress_bytes_transferred = None + self.max_packets_per_second = None + + +class VpnClientConnectionHealthDetailListResult(msrest.serialization.Model): + """List of virtual network gateway vpn client connection health. + + :ivar value: List of vpn client connection health. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.VpnClientConnectionHealthDetail] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnClientConnectionHealthDetail]'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnClientConnectionHealthDetail"]] = None, + **kwargs + ): + """ + :keyword value: List of vpn client connection health. + :paramtype value: list[~azure.mgmt.network.v2021_08_01.models.VpnClientConnectionHealthDetail] + """ + super(VpnClientConnectionHealthDetailListResult, self).__init__(**kwargs) + self.value = value + + +class VpnClientIPsecParameters(msrest.serialization.Model): + """An IPSec parameters for a virtual network gateway P2S connection. + + All required parameters must be populated in order to send to Azure. + + :ivar sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode or + Phase 2 SA) lifetime in seconds for P2S client. + :vartype sa_life_time_seconds: int + :ivar sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) payload size in KB for P2S client.. + :vartype sa_data_size_kilobytes: int + :ivar ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible values + include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", + "GCMAES256". + :vartype ipsec_encryption: str or ~azure.mgmt.network.v2021_08_01.models.IpsecEncryption + :ivar ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values + include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". + :vartype ipsec_integrity: str or ~azure.mgmt.network.v2021_08_01.models.IpsecIntegrity + :ivar ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values + include: "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES256", "GCMAES128". + :vartype ike_encryption: str or ~azure.mgmt.network.v2021_08_01.models.IkeEncryption + :ivar ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values + include: "MD5", "SHA1", "SHA256", "SHA384", "GCMAES256", "GCMAES128". + :vartype ike_integrity: str or ~azure.mgmt.network.v2021_08_01.models.IkeIntegrity + :ivar dh_group: Required. The DH Group used in IKE Phase 1 for initial SA. Possible values + include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", + "DHGroup24". + :vartype dh_group: str or ~azure.mgmt.network.v2021_08_01.models.DhGroup + :ivar pfs_group: Required. The Pfs Group used in IKE Phase 2 for new child SA. Possible values + include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24", "PFS14", "PFSMM". + :vartype pfs_group: str or ~azure.mgmt.network.v2021_08_01.models.PfsGroup + """ + + _validation = { + 'sa_life_time_seconds': {'required': True}, + 'sa_data_size_kilobytes': {'required': True}, + 'ipsec_encryption': {'required': True}, + 'ipsec_integrity': {'required': True}, + 'ike_encryption': {'required': True}, + 'ike_integrity': {'required': True}, + 'dh_group': {'required': True}, + 'pfs_group': {'required': True}, + } + + _attribute_map = { + 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, + 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, + 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, + 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, + 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, + 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, + 'dh_group': {'key': 'dhGroup', 'type': 'str'}, + 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, + } + + def __init__( + self, + *, + sa_life_time_seconds: int, + sa_data_size_kilobytes: int, + ipsec_encryption: Union[str, "IpsecEncryption"], + ipsec_integrity: Union[str, "IpsecIntegrity"], + ike_encryption: Union[str, "IkeEncryption"], + ike_integrity: Union[str, "IkeIntegrity"], + dh_group: Union[str, "DhGroup"], + pfs_group: Union[str, "PfsGroup"], + **kwargs + ): + """ + :keyword sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) lifetime in seconds for P2S client. + :paramtype sa_life_time_seconds: int + :keyword sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick + Mode or Phase 2 SA) payload size in KB for P2S client.. + :paramtype sa_data_size_kilobytes: int + :keyword ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible + values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", + "GCMAES256". + :paramtype ipsec_encryption: str or ~azure.mgmt.network.v2021_08_01.models.IpsecEncryption + :keyword ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible + values include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". + :paramtype ipsec_integrity: str or ~azure.mgmt.network.v2021_08_01.models.IpsecIntegrity + :keyword ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values + include: "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES256", "GCMAES128". + :paramtype ike_encryption: str or ~azure.mgmt.network.v2021_08_01.models.IkeEncryption + :keyword ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values + include: "MD5", "SHA1", "SHA256", "SHA384", "GCMAES256", "GCMAES128". + :paramtype ike_integrity: str or ~azure.mgmt.network.v2021_08_01.models.IkeIntegrity + :keyword dh_group: Required. The DH Group used in IKE Phase 1 for initial SA. Possible values + include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", + "DHGroup24". + :paramtype dh_group: str or ~azure.mgmt.network.v2021_08_01.models.DhGroup + :keyword pfs_group: Required. The Pfs Group used in IKE Phase 2 for new child SA. Possible + values include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24", "PFS14", + "PFSMM". + :paramtype pfs_group: str or ~azure.mgmt.network.v2021_08_01.models.PfsGroup + """ + super(VpnClientIPsecParameters, self).__init__(**kwargs) + self.sa_life_time_seconds = sa_life_time_seconds + self.sa_data_size_kilobytes = sa_data_size_kilobytes + self.ipsec_encryption = ipsec_encryption + self.ipsec_integrity = ipsec_integrity + self.ike_encryption = ike_encryption + self.ike_integrity = ike_integrity + self.dh_group = dh_group + self.pfs_group = pfs_group + + +class VpnClientParameters(msrest.serialization.Model): + """Vpn Client Parameters for package generation. + + :ivar processor_architecture: VPN client Processor Architecture. Possible values include: + "Amd64", "X86". + :vartype processor_architecture: str or + ~azure.mgmt.network.v2021_08_01.models.ProcessorArchitecture + :ivar authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :vartype authentication_method: str or + ~azure.mgmt.network.v2021_08_01.models.AuthenticationMethod + :ivar radius_server_auth_certificate: The public certificate data for the radius server + authentication certificate as a Base-64 encoded string. Required only if external radius + authentication has been configured with EAPTLS authentication. + :vartype radius_server_auth_certificate: str + :ivar client_root_certificates: A list of client root certificates public certificate data + encoded as Base-64 strings. Optional parameter for external radius based authentication with + EAPTLS. + :vartype client_root_certificates: list[str] + """ + + _attribute_map = { + 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, + 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, + } + + def __init__( + self, + *, + processor_architecture: Optional[Union[str, "ProcessorArchitecture"]] = None, + authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, + radius_server_auth_certificate: Optional[str] = None, + client_root_certificates: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword processor_architecture: VPN client Processor Architecture. Possible values include: + "Amd64", "X86". + :paramtype processor_architecture: str or + ~azure.mgmt.network.v2021_08_01.models.ProcessorArchitecture + :keyword authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :paramtype authentication_method: str or + ~azure.mgmt.network.v2021_08_01.models.AuthenticationMethod + :keyword radius_server_auth_certificate: The public certificate data for the radius server + authentication certificate as a Base-64 encoded string. Required only if external radius + authentication has been configured with EAPTLS authentication. + :paramtype radius_server_auth_certificate: str + :keyword client_root_certificates: A list of client root certificates public certificate data + encoded as Base-64 strings. Optional parameter for external radius based authentication with + EAPTLS. + :paramtype client_root_certificates: list[str] + """ + super(VpnClientParameters, self).__init__(**kwargs) + self.processor_architecture = processor_architecture + self.authentication_method = authentication_method + self.radius_server_auth_certificate = radius_server_auth_certificate + self.client_root_certificates = client_root_certificates + + +class VpnClientRevokedCertificate(SubResource): + """VPN client revoked certificate of virtual network gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar thumbprint: The revoked VPN client certificate thumbprint. + :vartype thumbprint: str + :ivar provisioning_state: The provisioning state of the VPN client revoked certificate + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + thumbprint: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword thumbprint: The revoked VPN client certificate thumbprint. + :paramtype thumbprint: str + """ + super(VpnClientRevokedCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.thumbprint = thumbprint + self.provisioning_state = None + + +class VpnClientRootCertificate(SubResource): + """VPN client root certificate of virtual network gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar public_cert_data: Required. The certificate public data. + :vartype public_cert_data: str + :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'public_cert_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + public_cert_data: str, + id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword public_cert_data: Required. The certificate public data. + :paramtype public_cert_data: str + """ + super(VpnClientRootCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.public_cert_data = public_cert_data + self.provisioning_state = None + + +class VpnConnection(SubResource): + """VpnConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar remote_vpn_site: Id of the connected vpn site. + :vartype remote_vpn_site: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar routing_weight: Routing weight for vpn connection. + :vartype routing_weight: int + :ivar dpd_timeout_seconds: DPD timeout in seconds for vpn connection. + :vartype dpd_timeout_seconds: int + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or ~azure.mgmt.network.v2021_08_01.models.VpnConnectionStatus + :ivar vpn_connection_protocol_type: Connection protocol used for this connection. Possible + values include: "IKEv2", "IKEv1". + :vartype vpn_connection_protocol_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionProtocol + :ivar ingress_bytes_transferred: Ingress bytes transferred. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: Egress bytes transferred. + :vartype egress_bytes_transferred: long + :ivar connection_bandwidth: Expected bandwidth in MBPS. + :vartype connection_bandwidth: int + :ivar shared_key: SharedKey for the vpn connection. + :vartype shared_key: str + :ivar enable_bgp: EnableBgp flag. + :vartype enable_bgp: bool + :ivar use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :vartype use_policy_based_traffic_selectors: bool + :ivar ipsec_policies: The IPSec Policies to be considered by this connection. + :vartype ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :ivar traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :vartype traffic_selector_policies: + list[~azure.mgmt.network.v2021_08_01.models.TrafficSelectorPolicy] + :ivar enable_rate_limiting: EnableBgp flag. + :vartype enable_rate_limiting: bool + :ivar enable_internet_security: Enable internet security. + :vartype enable_internet_security: bool + :ivar use_local_azure_ip_address: Use local azure ip to initiate connection. + :vartype use_local_azure_ip_address: bool + :ivar provisioning_state: The provisioning state of the VPN connection resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar vpn_link_connections: List of all vpn site link connections to the gateway. + :vartype vpn_link_connections: + list[~azure.mgmt.network.v2021_08_01.models.VpnSiteLinkConnection] + :ivar routing_configuration: The Routing Configuration indicating the associated and propagated + route tables on this connection. + :vartype routing_configuration: ~azure.mgmt.network.v2021_08_01.models.RoutingConfiguration + """ + + _validation = { + 'etag': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'remote_vpn_site': {'key': 'properties.remoteVpnSite', 'type': 'SubResource'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'dpd_timeout_seconds': {'key': 'properties.dpdTimeoutSeconds', 'type': 'int'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'vpn_connection_protocol_type': {'key': 'properties.vpnConnectionProtocolType', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'connection_bandwidth': {'key': 'properties.connectionBandwidth', 'type': 'int'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'enable_rate_limiting': {'key': 'properties.enableRateLimiting', 'type': 'bool'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_link_connections': {'key': 'properties.vpnLinkConnections', 'type': '[VpnSiteLinkConnection]'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + remote_vpn_site: Optional["SubResource"] = None, + routing_weight: Optional[int] = None, + dpd_timeout_seconds: Optional[int] = None, + vpn_connection_protocol_type: Optional[Union[str, "VirtualNetworkGatewayConnectionProtocol"]] = None, + connection_bandwidth: Optional[int] = None, + shared_key: Optional[str] = None, + enable_bgp: Optional[bool] = None, + use_policy_based_traffic_selectors: Optional[bool] = None, + ipsec_policies: Optional[List["IpsecPolicy"]] = None, + traffic_selector_policies: Optional[List["TrafficSelectorPolicy"]] = None, + enable_rate_limiting: Optional[bool] = None, + enable_internet_security: Optional[bool] = None, + use_local_azure_ip_address: Optional[bool] = None, + vpn_link_connections: Optional[List["VpnSiteLinkConnection"]] = None, + routing_configuration: Optional["RoutingConfiguration"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword remote_vpn_site: Id of the connected vpn site. + :paramtype remote_vpn_site: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword routing_weight: Routing weight for vpn connection. + :paramtype routing_weight: int + :keyword dpd_timeout_seconds: DPD timeout in seconds for vpn connection. + :paramtype dpd_timeout_seconds: int + :keyword vpn_connection_protocol_type: Connection protocol used for this connection. Possible + values include: "IKEv2", "IKEv1". + :paramtype vpn_connection_protocol_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionProtocol + :keyword connection_bandwidth: Expected bandwidth in MBPS. + :paramtype connection_bandwidth: int + :keyword shared_key: SharedKey for the vpn connection. + :paramtype shared_key: str + :keyword enable_bgp: EnableBgp flag. + :paramtype enable_bgp: bool + :keyword use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :paramtype use_policy_based_traffic_selectors: bool + :keyword ipsec_policies: The IPSec Policies to be considered by this connection. + :paramtype ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :keyword traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :paramtype traffic_selector_policies: + list[~azure.mgmt.network.v2021_08_01.models.TrafficSelectorPolicy] + :keyword enable_rate_limiting: EnableBgp flag. + :paramtype enable_rate_limiting: bool + :keyword enable_internet_security: Enable internet security. + :paramtype enable_internet_security: bool + :keyword use_local_azure_ip_address: Use local azure ip to initiate connection. + :paramtype use_local_azure_ip_address: bool + :keyword vpn_link_connections: List of all vpn site link connections to the gateway. + :paramtype vpn_link_connections: + list[~azure.mgmt.network.v2021_08_01.models.VpnSiteLinkConnection] + :keyword routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :paramtype routing_configuration: ~azure.mgmt.network.v2021_08_01.models.RoutingConfiguration + """ + super(VpnConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.remote_vpn_site = remote_vpn_site + self.routing_weight = routing_weight + self.dpd_timeout_seconds = dpd_timeout_seconds + self.connection_status = None + self.vpn_connection_protocol_type = vpn_connection_protocol_type + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.connection_bandwidth = connection_bandwidth + self.shared_key = shared_key + self.enable_bgp = enable_bgp + self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors + self.ipsec_policies = ipsec_policies + self.traffic_selector_policies = traffic_selector_policies + self.enable_rate_limiting = enable_rate_limiting + self.enable_internet_security = enable_internet_security + self.use_local_azure_ip_address = use_local_azure_ip_address + self.provisioning_state = None + self.vpn_link_connections = vpn_link_connections + self.routing_configuration = routing_configuration + + +class VpnConnectionPacketCaptureStartParameters(msrest.serialization.Model): + """Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. + + :ivar filter_data: Start Packet capture parameters on vpn connection. + :vartype filter_data: str + :ivar link_connection_names: List of site link connection names. + :vartype link_connection_names: list[str] + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + 'link_connection_names': {'key': 'linkConnectionNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + filter_data: Optional[str] = None, + link_connection_names: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword filter_data: Start Packet capture parameters on vpn connection. + :paramtype filter_data: str + :keyword link_connection_names: List of site link connection names. + :paramtype link_connection_names: list[str] + """ + super(VpnConnectionPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = filter_data + self.link_connection_names = link_connection_names + + +class VpnConnectionPacketCaptureStopParameters(msrest.serialization.Model): + """Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. + + :ivar sas_url: SAS url for packet capture on vpn connection. + :vartype sas_url: str + :ivar link_connection_names: List of site link connection names. + :vartype link_connection_names: list[str] + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'link_connection_names': {'key': 'linkConnectionNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + link_connection_names: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword sas_url: SAS url for packet capture on vpn connection. + :paramtype sas_url: str + :keyword link_connection_names: List of site link connection names. + :paramtype link_connection_names: list[str] + """ + super(VpnConnectionPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = sas_url + self.link_connection_names = link_connection_names + + +class VpnDeviceScriptParameters(msrest.serialization.Model): + """Vpn device configuration script generation parameters. + + :ivar vendor: The vendor for the vpn device. + :vartype vendor: str + :ivar device_family: The device family for the vpn device. + :vartype device_family: str + :ivar firmware_version: The firmware version for the vpn device. + :vartype firmware_version: str + """ + + _attribute_map = { + 'vendor': {'key': 'vendor', 'type': 'str'}, + 'device_family': {'key': 'deviceFamily', 'type': 'str'}, + 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + vendor: Optional[str] = None, + device_family: Optional[str] = None, + firmware_version: Optional[str] = None, + **kwargs + ): + """ + :keyword vendor: The vendor for the vpn device. + :paramtype vendor: str + :keyword device_family: The device family for the vpn device. + :paramtype device_family: str + :keyword firmware_version: The firmware version for the vpn device. + :paramtype firmware_version: str + """ + super(VpnDeviceScriptParameters, self).__init__(**kwargs) + self.vendor = vendor + self.device_family = device_family + self.firmware_version = firmware_version + + +class VpnGateway(Resource): + """VpnGateway Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar virtual_hub: The VirtualHub to which the gateway belongs. + :vartype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar connections: List of all vpn connections to the gateway. + :vartype connections: list[~azure.mgmt.network.v2021_08_01.models.VpnConnection] + :ivar bgp_settings: Local network gateway's BGP speaker settings. + :vartype bgp_settings: ~azure.mgmt.network.v2021_08_01.models.BgpSettings + :ivar provisioning_state: The provisioning state of the VPN gateway resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar vpn_gateway_scale_unit: The scale unit for this vpn gateway. + :vartype vpn_gateway_scale_unit: int + :ivar ip_configurations: List of all IPs configured on the gateway. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_08_01.models.VpnGatewayIpConfiguration] + :ivar enable_bgp_route_translation_for_nat: Enable BGP routes translation for NAT on this + VpnGateway. + :vartype enable_bgp_route_translation_for_nat: bool + :ivar is_routing_preference_internet: Enable Routing Preference property for the Public IP + Interface of the VpnGateway. + :vartype is_routing_preference_internet: bool + :ivar nat_rules: List of all the nat Rules associated with the gateway. + :vartype nat_rules: list[~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'ip_configurations': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'connections': {'key': 'properties.connections', 'type': '[VpnConnection]'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_gateway_scale_unit': {'key': 'properties.vpnGatewayScaleUnit', 'type': 'int'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VpnGatewayIpConfiguration]'}, + 'enable_bgp_route_translation_for_nat': {'key': 'properties.enableBgpRouteTranslationForNat', 'type': 'bool'}, + 'is_routing_preference_internet': {'key': 'properties.isRoutingPreferenceInternet', 'type': 'bool'}, + 'nat_rules': {'key': 'properties.natRules', 'type': '[VpnGatewayNatRule]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_hub: Optional["SubResource"] = None, + connections: Optional[List["VpnConnection"]] = None, + bgp_settings: Optional["BgpSettings"] = None, + vpn_gateway_scale_unit: Optional[int] = None, + enable_bgp_route_translation_for_nat: Optional[bool] = None, + is_routing_preference_internet: Optional[bool] = None, + nat_rules: Optional[List["VpnGatewayNatRule"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword virtual_hub: The VirtualHub to which the gateway belongs. + :paramtype virtual_hub: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword connections: List of all vpn connections to the gateway. + :paramtype connections: list[~azure.mgmt.network.v2021_08_01.models.VpnConnection] + :keyword bgp_settings: Local network gateway's BGP speaker settings. + :paramtype bgp_settings: ~azure.mgmt.network.v2021_08_01.models.BgpSettings + :keyword vpn_gateway_scale_unit: The scale unit for this vpn gateway. + :paramtype vpn_gateway_scale_unit: int + :keyword enable_bgp_route_translation_for_nat: Enable BGP routes translation for NAT on this + VpnGateway. + :paramtype enable_bgp_route_translation_for_nat: bool + :keyword is_routing_preference_internet: Enable Routing Preference property for the Public IP + Interface of the VpnGateway. + :paramtype is_routing_preference_internet: bool + :keyword nat_rules: List of all the nat Rules associated with the gateway. + :paramtype nat_rules: list[~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule] + """ + super(VpnGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.virtual_hub = virtual_hub + self.connections = connections + self.bgp_settings = bgp_settings + self.provisioning_state = None + self.vpn_gateway_scale_unit = vpn_gateway_scale_unit + self.ip_configurations = None + self.enable_bgp_route_translation_for_nat = enable_bgp_route_translation_for_nat + self.is_routing_preference_internet = is_routing_preference_internet + self.nat_rules = nat_rules + + +class VpnGatewayIpConfiguration(msrest.serialization.Model): + """IP Configuration of a VPN Gateway Resource. + + :ivar id: The identifier of the IP configuration for a VPN Gateway. + :vartype id: str + :ivar public_ip_address: The public IP address of this IP configuration. + :vartype public_ip_address: str + :ivar private_ip_address: The private IP address of this IP configuration. + :vartype private_ip_address: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + public_ip_address: Optional[str] = None, + private_ip_address: Optional[str] = None, + **kwargs + ): + """ + :keyword id: The identifier of the IP configuration for a VPN Gateway. + :paramtype id: str + :keyword public_ip_address: The public IP address of this IP configuration. + :paramtype public_ip_address: str + :keyword private_ip_address: The private IP address of this IP configuration. + :paramtype private_ip_address: str + """ + super(VpnGatewayIpConfiguration, self).__init__(**kwargs) + self.id = id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + + +class VpnGatewayNatRule(SubResource): + """VpnGatewayNatRule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: The provisioning state of the NAT Rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar type_properties_type: The type of NAT rule for VPN NAT. Possible values include: + "Static", "Dynamic". + :vartype type_properties_type: str or ~azure.mgmt.network.v2021_08_01.models.VpnNatRuleType + :ivar mode: The Source NAT direction of a VPN NAT. Possible values include: "EgressSnat", + "IngressSnat". + :vartype mode: str or ~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMode + :ivar internal_mappings: The private IP address internal mapping for NAT. + :vartype internal_mappings: list[~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMapping] + :ivar external_mappings: The private IP address external mapping for NAT. + :vartype external_mappings: list[~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMapping] + :ivar ip_configuration_id: The IP Configuration ID this NAT rule applies to. + :vartype ip_configuration_id: str + :ivar egress_vpn_site_link_connections: List of egress VpnSiteLinkConnections. + :vartype egress_vpn_site_link_connections: + list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar ingress_vpn_site_link_connections: List of ingress VpnSiteLinkConnections. + :vartype ingress_vpn_site_link_connections: + list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'egress_vpn_site_link_connections': {'readonly': True}, + 'ingress_vpn_site_link_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'internal_mappings': {'key': 'properties.internalMappings', 'type': '[VpnNatRuleMapping]'}, + 'external_mappings': {'key': 'properties.externalMappings', 'type': '[VpnNatRuleMapping]'}, + 'ip_configuration_id': {'key': 'properties.ipConfigurationId', 'type': 'str'}, + 'egress_vpn_site_link_connections': {'key': 'properties.egressVpnSiteLinkConnections', 'type': '[SubResource]'}, + 'ingress_vpn_site_link_connections': {'key': 'properties.ingressVpnSiteLinkConnections', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_properties_type: Optional[Union[str, "VpnNatRuleType"]] = None, + mode: Optional[Union[str, "VpnNatRuleMode"]] = None, + internal_mappings: Optional[List["VpnNatRuleMapping"]] = None, + external_mappings: Optional[List["VpnNatRuleMapping"]] = None, + ip_configuration_id: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword type_properties_type: The type of NAT rule for VPN NAT. Possible values include: + "Static", "Dynamic". + :paramtype type_properties_type: str or ~azure.mgmt.network.v2021_08_01.models.VpnNatRuleType + :keyword mode: The Source NAT direction of a VPN NAT. Possible values include: "EgressSnat", + "IngressSnat". + :paramtype mode: str or ~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMode + :keyword internal_mappings: The private IP address internal mapping for NAT. + :paramtype internal_mappings: list[~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMapping] + :keyword external_mappings: The private IP address external mapping for NAT. + :paramtype external_mappings: list[~azure.mgmt.network.v2021_08_01.models.VpnNatRuleMapping] + :keyword ip_configuration_id: The IP Configuration ID this NAT rule applies to. + :paramtype ip_configuration_id: str + """ + super(VpnGatewayNatRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.provisioning_state = None + self.type_properties_type = type_properties_type + self.mode = mode + self.internal_mappings = internal_mappings + self.external_mappings = external_mappings + self.ip_configuration_id = ip_configuration_id + self.egress_vpn_site_link_connections = None + self.ingress_vpn_site_link_connections = None + + +class VpnGatewayPacketCaptureStartParameters(msrest.serialization.Model): + """Start packet capture parameters. + + :ivar filter_data: Start Packet capture parameters on vpn gateway. + :vartype filter_data: str + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_data: Optional[str] = None, + **kwargs + ): + """ + :keyword filter_data: Start Packet capture parameters on vpn gateway. + :paramtype filter_data: str + """ + super(VpnGatewayPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = filter_data + + +class VpnGatewayPacketCaptureStopParameters(msrest.serialization.Model): + """Stop packet capture parameters. + + :ivar sas_url: SAS url for packet capture on vpn gateway. + :vartype sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + **kwargs + ): + """ + :keyword sas_url: SAS url for packet capture on vpn gateway. + :paramtype sas_url: str + """ + super(VpnGatewayPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = sas_url + + +class VpnLinkBgpSettings(msrest.serialization.Model): + """BGP settings details for a link. + + :ivar asn: The BGP speaker's ASN. + :vartype asn: long + :ivar bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. + :vartype bgp_peering_address: str + """ + + _attribute_map = { + 'asn': {'key': 'asn', 'type': 'long'}, + 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + asn: Optional[int] = None, + bgp_peering_address: Optional[str] = None, + **kwargs + ): + """ + :keyword asn: The BGP speaker's ASN. + :paramtype asn: long + :keyword bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. + :paramtype bgp_peering_address: str + """ + super(VpnLinkBgpSettings, self).__init__(**kwargs) + self.asn = asn + self.bgp_peering_address = bgp_peering_address + + +class VpnLinkProviderProperties(msrest.serialization.Model): + """List of properties of a link provider. + + :ivar link_provider_name: Name of the link provider. + :vartype link_provider_name: str + :ivar link_speed_in_mbps: Link speed. + :vartype link_speed_in_mbps: int + """ + + _attribute_map = { + 'link_provider_name': {'key': 'linkProviderName', 'type': 'str'}, + 'link_speed_in_mbps': {'key': 'linkSpeedInMbps', 'type': 'int'}, + } + + def __init__( + self, + *, + link_provider_name: Optional[str] = None, + link_speed_in_mbps: Optional[int] = None, + **kwargs + ): + """ + :keyword link_provider_name: Name of the link provider. + :paramtype link_provider_name: str + :keyword link_speed_in_mbps: Link speed. + :paramtype link_speed_in_mbps: int + """ + super(VpnLinkProviderProperties, self).__init__(**kwargs) + self.link_provider_name = link_provider_name + self.link_speed_in_mbps = link_speed_in_mbps + + +class VpnNatRuleMapping(msrest.serialization.Model): + """Vpn NatRule mapping. + + :ivar address_space: Address space for Vpn NatRule mapping. + :vartype address_space: str + :ivar port_range: Port range for Vpn NatRule mapping. + :vartype port_range: str + """ + + _attribute_map = { + 'address_space': {'key': 'addressSpace', 'type': 'str'}, + 'port_range': {'key': 'portRange', 'type': 'str'}, + } + + def __init__( + self, + *, + address_space: Optional[str] = None, + port_range: Optional[str] = None, + **kwargs + ): + """ + :keyword address_space: Address space for Vpn NatRule mapping. + :paramtype address_space: str + :keyword port_range: Port range for Vpn NatRule mapping. + :paramtype port_range: str + """ + super(VpnNatRuleMapping, self).__init__(**kwargs) + self.address_space = address_space + self.port_range = port_range + + +class VpnPacketCaptureStartParameters(msrest.serialization.Model): + """Start packet capture parameters on virtual network gateway. + + :ivar filter_data: Start Packet capture parameters. + :vartype filter_data: str + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_data: Optional[str] = None, + **kwargs + ): + """ + :keyword filter_data: Start Packet capture parameters. + :paramtype filter_data: str + """ + super(VpnPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = filter_data + + +class VpnPacketCaptureStopParameters(msrest.serialization.Model): + """Stop packet capture parameters. + + :ivar sas_url: SAS url for packet capture on virtual network gateway. + :vartype sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + **kwargs + ): + """ + :keyword sas_url: SAS url for packet capture on virtual network gateway. + :paramtype sas_url: str + """ + super(VpnPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = sas_url + + +class VpnProfileResponse(msrest.serialization.Model): + """Vpn Profile Response for package generation. + + :ivar profile_url: URL to the VPN profile. + :vartype profile_url: str + """ + + _attribute_map = { + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + profile_url: Optional[str] = None, + **kwargs + ): + """ + :keyword profile_url: URL to the VPN profile. + :paramtype profile_url: str + """ + super(VpnProfileResponse, self).__init__(**kwargs) + self.profile_url = profile_url + + +class VpnServerConfigRadiusClientRootCertificate(msrest.serialization.Model): + """Properties of the Radius client root certificate of VpnServerConfiguration. + + :ivar name: The certificate name. + :vartype name: str + :ivar thumbprint: The Radius client root certificate thumbprint. + :vartype thumbprint: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + thumbprint: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The certificate name. + :paramtype name: str + :keyword thumbprint: The Radius client root certificate thumbprint. + :paramtype thumbprint: str + """ + super(VpnServerConfigRadiusClientRootCertificate, self).__init__(**kwargs) + self.name = name + self.thumbprint = thumbprint + + +class VpnServerConfigRadiusServerRootCertificate(msrest.serialization.Model): + """Properties of Radius Server root certificate of VpnServerConfiguration. + + :ivar name: The certificate name. + :vartype name: str + :ivar public_cert_data: The certificate public data. + :vartype public_cert_data: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_cert_data': {'key': 'publicCertData', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The certificate name. + :paramtype name: str + :keyword public_cert_data: The certificate public data. + :paramtype public_cert_data: str + """ + super(VpnServerConfigRadiusServerRootCertificate, self).__init__(**kwargs) + self.name = name + self.public_cert_data = public_cert_data + + +class VpnServerConfiguration(Resource): + """VpnServerConfiguration Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar name_properties_name: The name of the VpnServerConfiguration that is unique within a + resource group. + :vartype name_properties_name: str + :ivar vpn_protocols: VPN protocols for the VpnServerConfiguration. + :vartype vpn_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.VpnGatewayTunnelingProtocol] + :ivar vpn_authentication_types: VPN authentication types for the VpnServerConfiguration. + :vartype vpn_authentication_types: list[str or + ~azure.mgmt.network.v2021_08_01.models.VpnAuthenticationType] + :ivar vpn_client_root_certificates: VPN client root certificate of VpnServerConfiguration. + :vartype vpn_client_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigVpnClientRootCertificate] + :ivar vpn_client_revoked_certificates: VPN client revoked certificate of + VpnServerConfiguration. + :vartype vpn_client_revoked_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigVpnClientRevokedCertificate] + :ivar radius_server_root_certificates: Radius Server root certificate of + VpnServerConfiguration. + :vartype radius_server_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigRadiusServerRootCertificate] + :ivar radius_client_root_certificates: Radius client root certificate of + VpnServerConfiguration. + :vartype radius_client_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigRadiusClientRootCertificate] + :ivar vpn_client_ipsec_policies: VpnClientIpsecPolicies for VpnServerConfiguration. + :vartype vpn_client_ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :ivar radius_server_address: The radius server address property of the VpnServerConfiguration + resource for point to site client connection. + :vartype radius_server_address: str + :ivar radius_server_secret: The radius secret property of the VpnServerConfiguration resource + for point to site client connection. + :vartype radius_server_secret: str + :ivar radius_servers: Multiple Radius Server configuration for VpnServerConfiguration. + :vartype radius_servers: list[~azure.mgmt.network.v2021_08_01.models.RadiusServer] + :ivar aad_authentication_parameters: The set of aad vpn authentication parameters. + :vartype aad_authentication_parameters: + ~azure.mgmt.network.v2021_08_01.models.AadAuthenticationParameters + :ivar provisioning_state: The provisioning state of the VpnServerConfiguration resource. + Possible values are: 'Updating', 'Deleting', and 'Failed'. + :vartype provisioning_state: str + :ivar p2_s_vpn_gateways: List of references to P2SVpnGateways. + :vartype p2_s_vpn_gateways: list[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :ivar configuration_policy_groups: List of all VpnServerConfigurationPolicyGroups. + :vartype configuration_policy_groups: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup] + :ivar etag_properties_etag: A unique read-only string that changes whenever the resource is + updated. + :vartype etag_properties_etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'p2_s_vpn_gateways': {'readonly': True}, + 'etag_properties_etag': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'vpn_protocols': {'key': 'properties.vpnProtocols', 'type': '[str]'}, + 'vpn_authentication_types': {'key': 'properties.vpnAuthenticationTypes', 'type': '[str]'}, + 'vpn_client_root_certificates': {'key': 'properties.vpnClientRootCertificates', 'type': '[VpnServerConfigVpnClientRootCertificate]'}, + 'vpn_client_revoked_certificates': {'key': 'properties.vpnClientRevokedCertificates', 'type': '[VpnServerConfigVpnClientRevokedCertificate]'}, + 'radius_server_root_certificates': {'key': 'properties.radiusServerRootCertificates', 'type': '[VpnServerConfigRadiusServerRootCertificate]'}, + 'radius_client_root_certificates': {'key': 'properties.radiusClientRootCertificates', 'type': '[VpnServerConfigRadiusClientRootCertificate]'}, + 'vpn_client_ipsec_policies': {'key': 'properties.vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, + 'radius_server_address': {'key': 'properties.radiusServerAddress', 'type': 'str'}, + 'radius_server_secret': {'key': 'properties.radiusServerSecret', 'type': 'str'}, + 'radius_servers': {'key': 'properties.radiusServers', 'type': '[RadiusServer]'}, + 'aad_authentication_parameters': {'key': 'properties.aadAuthenticationParameters', 'type': 'AadAuthenticationParameters'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'p2_s_vpn_gateways': {'key': 'properties.p2SVpnGateways', 'type': '[P2SVpnGateway]'}, + 'configuration_policy_groups': {'key': 'properties.configurationPolicyGroups', 'type': '[VpnServerConfigurationPolicyGroup]'}, + 'etag_properties_etag': {'key': 'properties.etag', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + name_properties_name: Optional[str] = None, + vpn_protocols: Optional[List[Union[str, "VpnGatewayTunnelingProtocol"]]] = None, + vpn_authentication_types: Optional[List[Union[str, "VpnAuthenticationType"]]] = None, + vpn_client_root_certificates: Optional[List["VpnServerConfigVpnClientRootCertificate"]] = None, + vpn_client_revoked_certificates: Optional[List["VpnServerConfigVpnClientRevokedCertificate"]] = None, + radius_server_root_certificates: Optional[List["VpnServerConfigRadiusServerRootCertificate"]] = None, + radius_client_root_certificates: Optional[List["VpnServerConfigRadiusClientRootCertificate"]] = None, + vpn_client_ipsec_policies: Optional[List["IpsecPolicy"]] = None, + radius_server_address: Optional[str] = None, + radius_server_secret: Optional[str] = None, + radius_servers: Optional[List["RadiusServer"]] = None, + aad_authentication_parameters: Optional["AadAuthenticationParameters"] = None, + configuration_policy_groups: Optional[List["VpnServerConfigurationPolicyGroup"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword name_properties_name: The name of the VpnServerConfiguration that is unique within a + resource group. + :paramtype name_properties_name: str + :keyword vpn_protocols: VPN protocols for the VpnServerConfiguration. + :paramtype vpn_protocols: list[str or + ~azure.mgmt.network.v2021_08_01.models.VpnGatewayTunnelingProtocol] + :keyword vpn_authentication_types: VPN authentication types for the VpnServerConfiguration. + :paramtype vpn_authentication_types: list[str or + ~azure.mgmt.network.v2021_08_01.models.VpnAuthenticationType] + :keyword vpn_client_root_certificates: VPN client root certificate of VpnServerConfiguration. + :paramtype vpn_client_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigVpnClientRootCertificate] + :keyword vpn_client_revoked_certificates: VPN client revoked certificate of + VpnServerConfiguration. + :paramtype vpn_client_revoked_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigVpnClientRevokedCertificate] + :keyword radius_server_root_certificates: Radius Server root certificate of + VpnServerConfiguration. + :paramtype radius_server_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigRadiusServerRootCertificate] + :keyword radius_client_root_certificates: Radius client root certificate of + VpnServerConfiguration. + :paramtype radius_client_root_certificates: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigRadiusClientRootCertificate] + :keyword vpn_client_ipsec_policies: VpnClientIpsecPolicies for VpnServerConfiguration. + :paramtype vpn_client_ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :keyword radius_server_address: The radius server address property of the + VpnServerConfiguration resource for point to site client connection. + :paramtype radius_server_address: str + :keyword radius_server_secret: The radius secret property of the VpnServerConfiguration + resource for point to site client connection. + :paramtype radius_server_secret: str + :keyword radius_servers: Multiple Radius Server configuration for VpnServerConfiguration. + :paramtype radius_servers: list[~azure.mgmt.network.v2021_08_01.models.RadiusServer] + :keyword aad_authentication_parameters: The set of aad vpn authentication parameters. + :paramtype aad_authentication_parameters: + ~azure.mgmt.network.v2021_08_01.models.AadAuthenticationParameters + :keyword configuration_policy_groups: List of all VpnServerConfigurationPolicyGroups. + :paramtype configuration_policy_groups: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup] + """ + super(VpnServerConfiguration, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.name_properties_name = name_properties_name + self.vpn_protocols = vpn_protocols + self.vpn_authentication_types = vpn_authentication_types + self.vpn_client_root_certificates = vpn_client_root_certificates + self.vpn_client_revoked_certificates = vpn_client_revoked_certificates + self.radius_server_root_certificates = radius_server_root_certificates + self.radius_client_root_certificates = radius_client_root_certificates + self.vpn_client_ipsec_policies = vpn_client_ipsec_policies + self.radius_server_address = radius_server_address + self.radius_server_secret = radius_server_secret + self.radius_servers = radius_servers + self.aad_authentication_parameters = aad_authentication_parameters + self.provisioning_state = None + self.p2_s_vpn_gateways = None + self.configuration_policy_groups = configuration_policy_groups + self.etag_properties_etag = None + + +class VpnServerConfigurationPolicyGroup(SubResource): + """VpnServerConfigurationPolicyGroup Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar is_default: Shows if this is a Default VpnServerConfigurationPolicyGroup or not. + :vartype is_default: bool + :ivar priority: Priority for VpnServerConfigurationPolicyGroup. + :vartype priority: int + :ivar policy_members: Multiple PolicyMembers for VpnServerConfigurationPolicyGroup. + :vartype policy_members: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroupMember] + :ivar p2_s_connection_configurations: List of references to P2SConnectionConfigurations. + :vartype p2_s_connection_configurations: + list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the VpnServerConfigurationPolicyGroup + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'p2_s_connection_configurations': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'policy_members': {'key': 'properties.policyMembers', 'type': '[VpnServerConfigurationPolicyGroupMember]'}, + 'p2_s_connection_configurations': {'key': 'properties.p2SConnectionConfigurations', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + is_default: Optional[bool] = None, + priority: Optional[int] = None, + policy_members: Optional[List["VpnServerConfigurationPolicyGroupMember"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword is_default: Shows if this is a Default VpnServerConfigurationPolicyGroup or not. + :paramtype is_default: bool + :keyword priority: Priority for VpnServerConfigurationPolicyGroup. + :paramtype priority: int + :keyword policy_members: Multiple PolicyMembers for VpnServerConfigurationPolicyGroup. + :paramtype policy_members: + list[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroupMember] + """ + super(VpnServerConfigurationPolicyGroup, self).__init__(id=id, **kwargs) + self.etag = None + self.name = name + self.type = None + self.is_default = is_default + self.priority = priority + self.policy_members = policy_members + self.p2_s_connection_configurations = None + self.provisioning_state = None + + +class VpnServerConfigurationPolicyGroupMember(msrest.serialization.Model): + """VpnServerConfiguration PolicyGroup member. + + :ivar name: Name of the VpnServerConfigurationPolicyGroupMember. + :vartype name: str + :ivar attribute_type: The Vpn Policy member attribute type. Possible values include: + "CertificateGroupId", "AADGroupId", "RadiusAzureGroupId". + :vartype attribute_type: str or + ~azure.mgmt.network.v2021_08_01.models.VpnPolicyMemberAttributeType + :ivar attribute_value: The value of Attribute used for this + VpnServerConfigurationPolicyGroupMember. + :vartype attribute_value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'attribute_type': {'key': 'attributeType', 'type': 'str'}, + 'attribute_value': {'key': 'attributeValue', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + attribute_type: Optional[Union[str, "VpnPolicyMemberAttributeType"]] = None, + attribute_value: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Name of the VpnServerConfigurationPolicyGroupMember. + :paramtype name: str + :keyword attribute_type: The Vpn Policy member attribute type. Possible values include: + "CertificateGroupId", "AADGroupId", "RadiusAzureGroupId". + :paramtype attribute_type: str or + ~azure.mgmt.network.v2021_08_01.models.VpnPolicyMemberAttributeType + :keyword attribute_value: The value of Attribute used for this + VpnServerConfigurationPolicyGroupMember. + :paramtype attribute_value: str + """ + super(VpnServerConfigurationPolicyGroupMember, self).__init__(**kwargs) + self.name = name + self.attribute_type = attribute_type + self.attribute_value = attribute_value + + +class VpnServerConfigurationsResponse(msrest.serialization.Model): + """VpnServerConfigurations list associated with VirtualWan Response. + + :ivar vpn_server_configuration_resource_ids: List of VpnServerConfigurations associated with + VirtualWan. + :vartype vpn_server_configuration_resource_ids: list[str] + """ + + _attribute_map = { + 'vpn_server_configuration_resource_ids': {'key': 'vpnServerConfigurationResourceIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + vpn_server_configuration_resource_ids: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword vpn_server_configuration_resource_ids: List of VpnServerConfigurations associated with + VirtualWan. + :paramtype vpn_server_configuration_resource_ids: list[str] + """ + super(VpnServerConfigurationsResponse, self).__init__(**kwargs) + self.vpn_server_configuration_resource_ids = vpn_server_configuration_resource_ids + + +class VpnServerConfigVpnClientRevokedCertificate(msrest.serialization.Model): + """Properties of the revoked VPN client certificate of VpnServerConfiguration. + + :ivar name: The certificate name. + :vartype name: str + :ivar thumbprint: The revoked VPN client certificate thumbprint. + :vartype thumbprint: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + thumbprint: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The certificate name. + :paramtype name: str + :keyword thumbprint: The revoked VPN client certificate thumbprint. + :paramtype thumbprint: str + """ + super(VpnServerConfigVpnClientRevokedCertificate, self).__init__(**kwargs) + self.name = name + self.thumbprint = thumbprint + + +class VpnServerConfigVpnClientRootCertificate(msrest.serialization.Model): + """Properties of VPN client root certificate of VpnServerConfiguration. + + :ivar name: The certificate name. + :vartype name: str + :ivar public_cert_data: The certificate public data. + :vartype public_cert_data: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_cert_data': {'key': 'publicCertData', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The certificate name. + :paramtype name: str + :keyword public_cert_data: The certificate public data. + :paramtype public_cert_data: str + """ + super(VpnServerConfigVpnClientRootCertificate, self).__init__(**kwargs) + self.name = name + self.public_cert_data = public_cert_data + + +class VpnSite(Resource): + """VpnSite Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar virtual_wan: The VirtualWAN to which the vpnSite belongs. + :vartype virtual_wan: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar device_properties: The device properties. + :vartype device_properties: ~azure.mgmt.network.v2021_08_01.models.DeviceProperties + :ivar ip_address: The ip-address for the vpn-site. + :vartype ip_address: str + :ivar site_key: The key for vpn-site that can be used for connections. + :vartype site_key: str + :ivar address_space: The AddressSpace that contains an array of IP address ranges. + :vartype address_space: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :ivar bgp_properties: The set of bgp properties. + :vartype bgp_properties: ~azure.mgmt.network.v2021_08_01.models.BgpSettings + :ivar provisioning_state: The provisioning state of the VPN site resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar is_security_site: IsSecuritySite flag. + :vartype is_security_site: bool + :ivar vpn_site_links: List of all vpn site links. + :vartype vpn_site_links: list[~azure.mgmt.network.v2021_08_01.models.VpnSiteLink] + :ivar o365_policy: Office365 Policy. + :vartype o365_policy: ~azure.mgmt.network.v2021_08_01.models.O365PolicyProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_wan': {'key': 'properties.virtualWan', 'type': 'SubResource'}, + 'device_properties': {'key': 'properties.deviceProperties', 'type': 'DeviceProperties'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'site_key': {'key': 'properties.siteKey', 'type': 'str'}, + 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, + 'bgp_properties': {'key': 'properties.bgpProperties', 'type': 'BgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_security_site': {'key': 'properties.isSecuritySite', 'type': 'bool'}, + 'vpn_site_links': {'key': 'properties.vpnSiteLinks', 'type': '[VpnSiteLink]'}, + 'o365_policy': {'key': 'properties.o365Policy', 'type': 'O365PolicyProperties'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_wan: Optional["SubResource"] = None, + device_properties: Optional["DeviceProperties"] = None, + ip_address: Optional[str] = None, + site_key: Optional[str] = None, + address_space: Optional["AddressSpace"] = None, + bgp_properties: Optional["BgpSettings"] = None, + is_security_site: Optional[bool] = None, + vpn_site_links: Optional[List["VpnSiteLink"]] = None, + o365_policy: Optional["O365PolicyProperties"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword virtual_wan: The VirtualWAN to which the vpnSite belongs. + :paramtype virtual_wan: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword device_properties: The device properties. + :paramtype device_properties: ~azure.mgmt.network.v2021_08_01.models.DeviceProperties + :keyword ip_address: The ip-address for the vpn-site. + :paramtype ip_address: str + :keyword site_key: The key for vpn-site that can be used for connections. + :paramtype site_key: str + :keyword address_space: The AddressSpace that contains an array of IP address ranges. + :paramtype address_space: ~azure.mgmt.network.v2021_08_01.models.AddressSpace + :keyword bgp_properties: The set of bgp properties. + :paramtype bgp_properties: ~azure.mgmt.network.v2021_08_01.models.BgpSettings + :keyword is_security_site: IsSecuritySite flag. + :paramtype is_security_site: bool + :keyword vpn_site_links: List of all vpn site links. + :paramtype vpn_site_links: list[~azure.mgmt.network.v2021_08_01.models.VpnSiteLink] + :keyword o365_policy: Office365 Policy. + :paramtype o365_policy: ~azure.mgmt.network.v2021_08_01.models.O365PolicyProperties + """ + super(VpnSite, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.virtual_wan = virtual_wan + self.device_properties = device_properties + self.ip_address = ip_address + self.site_key = site_key + self.address_space = address_space + self.bgp_properties = bgp_properties + self.provisioning_state = None + self.is_security_site = is_security_site + self.vpn_site_links = vpn_site_links + self.o365_policy = o365_policy + + +class VpnSiteId(msrest.serialization.Model): + """VpnSite Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vpn_site: The resource-uri of the vpn-site for which config is to be fetched. + :vartype vpn_site: str + """ + + _validation = { + 'vpn_site': {'readonly': True}, + } + + _attribute_map = { + 'vpn_site': {'key': 'vpnSite', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(VpnSiteId, self).__init__(**kwargs) + self.vpn_site = None + + +class VpnSiteLink(SubResource): + """VpnSiteLink Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar link_properties: The link provider properties. + :vartype link_properties: ~azure.mgmt.network.v2021_08_01.models.VpnLinkProviderProperties + :ivar ip_address: The ip-address for the vpn-site-link. + :vartype ip_address: str + :ivar fqdn: FQDN of vpn-site-link. + :vartype fqdn: str + :ivar bgp_properties: The set of bgp properties. + :vartype bgp_properties: ~azure.mgmt.network.v2021_08_01.models.VpnLinkBgpSettings + :ivar provisioning_state: The provisioning state of the VPN site link resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'link_properties': {'key': 'properties.linkProperties', 'type': 'VpnLinkProviderProperties'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'bgp_properties': {'key': 'properties.bgpProperties', 'type': 'VpnLinkBgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + link_properties: Optional["VpnLinkProviderProperties"] = None, + ip_address: Optional[str] = None, + fqdn: Optional[str] = None, + bgp_properties: Optional["VpnLinkBgpSettings"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword link_properties: The link provider properties. + :paramtype link_properties: ~azure.mgmt.network.v2021_08_01.models.VpnLinkProviderProperties + :keyword ip_address: The ip-address for the vpn-site-link. + :paramtype ip_address: str + :keyword fqdn: FQDN of vpn-site-link. + :paramtype fqdn: str + :keyword bgp_properties: The set of bgp properties. + :paramtype bgp_properties: ~azure.mgmt.network.v2021_08_01.models.VpnLinkBgpSettings + """ + super(VpnSiteLink, self).__init__(id=id, **kwargs) + self.etag = None + self.name = name + self.type = None + self.link_properties = link_properties + self.ip_address = ip_address + self.fqdn = fqdn + self.bgp_properties = bgp_properties + self.provisioning_state = None + + +class VpnSiteLinkConnection(SubResource): + """VpnSiteLinkConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar vpn_site_link: Id of the connected vpn site link. + :vartype vpn_site_link: ~azure.mgmt.network.v2021_08_01.models.SubResource + :ivar routing_weight: Routing weight for vpn connection. + :vartype routing_weight: int + :ivar vpn_link_connection_mode: Vpn link connection mode. Possible values include: "Default", + "ResponderOnly", "InitiatorOnly". + :vartype vpn_link_connection_mode: str or + ~azure.mgmt.network.v2021_08_01.models.VpnLinkConnectionMode + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or ~azure.mgmt.network.v2021_08_01.models.VpnConnectionStatus + :ivar vpn_connection_protocol_type: Connection protocol used for this connection. Possible + values include: "IKEv2", "IKEv1". + :vartype vpn_connection_protocol_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionProtocol + :ivar ingress_bytes_transferred: Ingress bytes transferred. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: Egress bytes transferred. + :vartype egress_bytes_transferred: long + :ivar connection_bandwidth: Expected bandwidth in MBPS. + :vartype connection_bandwidth: int + :ivar shared_key: SharedKey for the vpn connection. + :vartype shared_key: str + :ivar enable_bgp: EnableBgp flag. + :vartype enable_bgp: bool + :ivar vpn_gateway_custom_bgp_addresses: vpnGatewayCustomBgpAddresses used by this connection. + :vartype vpn_gateway_custom_bgp_addresses: + list[~azure.mgmt.network.v2021_08_01.models.GatewayCustomBgpIpAddressIpConfiguration] + :ivar use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :vartype use_policy_based_traffic_selectors: bool + :ivar ipsec_policies: The IPSec Policies to be considered by this connection. + :vartype ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :ivar enable_rate_limiting: EnableBgp flag. + :vartype enable_rate_limiting: bool + :ivar use_local_azure_ip_address: Use local azure ip to initiate connection. + :vartype use_local_azure_ip_address: bool + :ivar provisioning_state: The provisioning state of the VPN site link connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar ingress_nat_rules: List of ingress NatRules. + :vartype ingress_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar egress_nat_rules: List of egress NatRules. + :vartype egress_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vpn_site_link': {'key': 'properties.vpnSiteLink', 'type': 'SubResource'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'vpn_link_connection_mode': {'key': 'properties.vpnLinkConnectionMode', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'vpn_connection_protocol_type': {'key': 'properties.vpnConnectionProtocolType', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'connection_bandwidth': {'key': 'properties.connectionBandwidth', 'type': 'int'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'vpn_gateway_custom_bgp_addresses': {'key': 'properties.vpnGatewayCustomBgpAddresses', 'type': '[GatewayCustomBgpIpAddressIpConfiguration]'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'enable_rate_limiting': {'key': 'properties.enableRateLimiting', 'type': 'bool'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'ingress_nat_rules': {'key': 'properties.ingressNatRules', 'type': '[SubResource]'}, + 'egress_nat_rules': {'key': 'properties.egressNatRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + vpn_site_link: Optional["SubResource"] = None, + routing_weight: Optional[int] = None, + vpn_link_connection_mode: Optional[Union[str, "VpnLinkConnectionMode"]] = None, + vpn_connection_protocol_type: Optional[Union[str, "VirtualNetworkGatewayConnectionProtocol"]] = None, + connection_bandwidth: Optional[int] = None, + shared_key: Optional[str] = None, + enable_bgp: Optional[bool] = None, + vpn_gateway_custom_bgp_addresses: Optional[List["GatewayCustomBgpIpAddressIpConfiguration"]] = None, + use_policy_based_traffic_selectors: Optional[bool] = None, + ipsec_policies: Optional[List["IpsecPolicy"]] = None, + enable_rate_limiting: Optional[bool] = None, + use_local_azure_ip_address: Optional[bool] = None, + ingress_nat_rules: Optional[List["SubResource"]] = None, + egress_nat_rules: Optional[List["SubResource"]] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword name: The name of the resource that is unique within a resource group. This name can + be used to access the resource. + :paramtype name: str + :keyword vpn_site_link: Id of the connected vpn site link. + :paramtype vpn_site_link: ~azure.mgmt.network.v2021_08_01.models.SubResource + :keyword routing_weight: Routing weight for vpn connection. + :paramtype routing_weight: int + :keyword vpn_link_connection_mode: Vpn link connection mode. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :paramtype vpn_link_connection_mode: str or + ~azure.mgmt.network.v2021_08_01.models.VpnLinkConnectionMode + :keyword vpn_connection_protocol_type: Connection protocol used for this connection. Possible + values include: "IKEv2", "IKEv1". + :paramtype vpn_connection_protocol_type: str or + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionProtocol + :keyword connection_bandwidth: Expected bandwidth in MBPS. + :paramtype connection_bandwidth: int + :keyword shared_key: SharedKey for the vpn connection. + :paramtype shared_key: str + :keyword enable_bgp: EnableBgp flag. + :paramtype enable_bgp: bool + :keyword vpn_gateway_custom_bgp_addresses: vpnGatewayCustomBgpAddresses used by this + connection. + :paramtype vpn_gateway_custom_bgp_addresses: + list[~azure.mgmt.network.v2021_08_01.models.GatewayCustomBgpIpAddressIpConfiguration] + :keyword use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :paramtype use_policy_based_traffic_selectors: bool + :keyword ipsec_policies: The IPSec Policies to be considered by this connection. + :paramtype ipsec_policies: list[~azure.mgmt.network.v2021_08_01.models.IpsecPolicy] + :keyword enable_rate_limiting: EnableBgp flag. + :paramtype enable_rate_limiting: bool + :keyword use_local_azure_ip_address: Use local azure ip to initiate connection. + :paramtype use_local_azure_ip_address: bool + :keyword ingress_nat_rules: List of ingress NatRules. + :paramtype ingress_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :keyword egress_nat_rules: List of egress NatRules. + :paramtype egress_nat_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + super(VpnSiteLinkConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.vpn_site_link = vpn_site_link + self.routing_weight = routing_weight + self.vpn_link_connection_mode = vpn_link_connection_mode + self.connection_status = None + self.vpn_connection_protocol_type = vpn_connection_protocol_type + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.connection_bandwidth = connection_bandwidth + self.shared_key = shared_key + self.enable_bgp = enable_bgp + self.vpn_gateway_custom_bgp_addresses = vpn_gateway_custom_bgp_addresses + self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors + self.ipsec_policies = ipsec_policies + self.enable_rate_limiting = enable_rate_limiting + self.use_local_azure_ip_address = use_local_azure_ip_address + self.provisioning_state = None + self.ingress_nat_rules = ingress_nat_rules + self.egress_nat_rules = egress_nat_rules + + +class WebApplicationFirewallCustomRule(msrest.serialization.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. + + :ivar name: The name of the resource that is unique within a policy. This name can be used to + access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar priority: Required. Priority of the rule. Rules with a lower value will be evaluated + before rules with a higher value. + :vartype priority: int + :ivar rule_type: Required. The rule type. Possible values include: "MatchRule", "Invalid". + :vartype rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallRuleType + :ivar match_conditions: Required. List of match conditions. + :vartype match_conditions: list[~azure.mgmt.network.v2021_08_01.models.MatchCondition] + :ivar action: Required. Type of Actions. Possible values include: "Allow", "Block", "Log". + :vartype action: str or ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallAction + """ + + _validation = { + 'name': {'max_length': 128, 'min_length': 0}, + 'etag': {'readonly': True}, + 'priority': {'required': True}, + 'rule_type': {'required': True}, + 'match_conditions': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition]'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + *, + priority: int, + rule_type: Union[str, "WebApplicationFirewallRuleType"], + match_conditions: List["MatchCondition"], + action: Union[str, "WebApplicationFirewallAction"], + name: Optional[str] = None, + **kwargs + ): + """ + :keyword name: The name of the resource that is unique within a policy. This name can be used + to access the resource. + :paramtype name: str + :keyword priority: Required. Priority of the rule. Rules with a lower value will be evaluated + before rules with a higher value. + :paramtype priority: int + :keyword rule_type: Required. The rule type. Possible values include: "MatchRule", "Invalid". + :paramtype rule_type: str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallRuleType + :keyword match_conditions: Required. List of match conditions. + :paramtype match_conditions: list[~azure.mgmt.network.v2021_08_01.models.MatchCondition] + :keyword action: Required. Type of Actions. Possible values include: "Allow", "Block", "Log". + :paramtype action: str or ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallAction + """ + super(WebApplicationFirewallCustomRule, self).__init__(**kwargs) + self.name = name + self.etag = None + self.priority = priority + self.rule_type = rule_type + self.match_conditions = match_conditions + self.action = action + + +class WebApplicationFirewallPolicy(Resource): + """Defines web application firewall policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar location: Resource location. + :vartype location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar policy_settings: The PolicySettings for policy. + :vartype policy_settings: ~azure.mgmt.network.v2021_08_01.models.PolicySettings + :ivar custom_rules: The custom rules inside the policy. + :vartype custom_rules: + list[~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallCustomRule] + :ivar application_gateways: A collection of references to application gateways. + :vartype application_gateways: list[~azure.mgmt.network.v2021_08_01.models.ApplicationGateway] + :ivar provisioning_state: The provisioning state of the web application firewall policy + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_08_01.models.ProvisioningState + :ivar resource_state: Resource status of the policy. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or + ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicyResourceState + :ivar managed_rules: Describes the managedRules structure. + :vartype managed_rules: ~azure.mgmt.network.v2021_08_01.models.ManagedRulesDefinition + :ivar http_listeners: A collection of references to application gateway http listeners. + :vartype http_listeners: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + :ivar path_based_rules: A collection of references to application gateway path rules. + :vartype path_based_rules: list[~azure.mgmt.network.v2021_08_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'application_gateways': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_state': {'readonly': True}, + 'http_listeners': {'readonly': True}, + 'path_based_rules': {'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}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'policy_settings': {'key': 'properties.policySettings', 'type': 'PolicySettings'}, + 'custom_rules': {'key': 'properties.customRules', 'type': '[WebApplicationFirewallCustomRule]'}, + 'application_gateways': {'key': 'properties.applicationGateways', 'type': '[ApplicationGateway]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRulesDefinition'}, + 'http_listeners': {'key': 'properties.httpListeners', 'type': '[SubResource]'}, + 'path_based_rules': {'key': 'properties.pathBasedRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + policy_settings: Optional["PolicySettings"] = None, + custom_rules: Optional[List["WebApplicationFirewallCustomRule"]] = None, + managed_rules: Optional["ManagedRulesDefinition"] = None, + **kwargs + ): + """ + :keyword id: Resource ID. + :paramtype id: str + :keyword location: Resource location. + :paramtype location: str + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword policy_settings: The PolicySettings for policy. + :paramtype policy_settings: ~azure.mgmt.network.v2021_08_01.models.PolicySettings + :keyword custom_rules: The custom rules inside the policy. + :paramtype custom_rules: + list[~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallCustomRule] + :keyword managed_rules: Describes the managedRules structure. + :paramtype managed_rules: ~azure.mgmt.network.v2021_08_01.models.ManagedRulesDefinition + """ + super(WebApplicationFirewallPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.policy_settings = policy_settings + self.custom_rules = custom_rules + self.application_gateways = None + self.provisioning_state = None + self.resource_state = None + self.managed_rules = managed_rules + self.http_listeners = None + self.path_based_rules = None + + +class WebApplicationFirewallPolicyListResult(msrest.serialization.Model): + """Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of WebApplicationFirewallPolicies within a resource group. + :vartype value: list[~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicy] + :ivar next_link: URL to get the next set of WebApplicationFirewallPolicy objects if there are + any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebApplicationFirewallPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(WebApplicationFirewallPolicyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/_network_management_client_enums.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/_network_management_client_enums.py new file mode 100644 index 00000000000..a6eee91334a --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/models/_network_management_client_enums.py @@ -0,0 +1,1517 @@ +# 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 enum import Enum +from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta + + +class Access(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Access to be allowed or denied. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class ApplicationGatewayBackendHealthServerHealth(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Health of backend server. + """ + + UNKNOWN = "Unknown" + UP = "Up" + DOWN = "Down" + PARTIAL = "Partial" + DRAINING = "Draining" + +class ApplicationGatewayCookieBasedAffinity(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Cookie based affinity. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class ApplicationGatewayCustomErrorStatusCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Status code of the application gateway customer error. + """ + + HTTP_STATUS403 = "HttpStatus403" + HTTP_STATUS502 = "HttpStatus502" + +class ApplicationGatewayFirewallMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Web application firewall mode. + """ + + DETECTION = "Detection" + PREVENTION = "Prevention" + +class ApplicationGatewayLoadDistributionAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Load Distribution Algorithm enums. + """ + + ROUND_ROBIN = "RoundRobin" + LEAST_CONNECTIONS = "LeastConnections" + IP_HASH = "IpHash" + +class ApplicationGatewayOperationalState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Operational state of the application gateway resource. + """ + + STOPPED = "Stopped" + STARTING = "Starting" + RUNNING = "Running" + STOPPING = "Stopping" + +class ApplicationGatewayProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Application Gateway protocol. + """ + + HTTP = "Http" + HTTPS = "Https" + TCP = "Tcp" + TLS = "Tls" + +class ApplicationGatewayRedirectType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Redirect type enum. + """ + + PERMANENT = "Permanent" + FOUND = "Found" + SEE_OTHER = "SeeOther" + TEMPORARY = "Temporary" + +class ApplicationGatewayRequestRoutingRuleType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Rule type. + """ + + BASIC = "Basic" + PATH_BASED_ROUTING = "PathBasedRouting" + +class ApplicationGatewaySkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Name of an application gateway SKU. + """ + + STANDARD_SMALL = "Standard_Small" + STANDARD_MEDIUM = "Standard_Medium" + STANDARD_LARGE = "Standard_Large" + WAF_MEDIUM = "WAF_Medium" + WAF_LARGE = "WAF_Large" + STANDARD_V2 = "Standard_v2" + WAF_V2 = "WAF_v2" + +class ApplicationGatewaySslCipherSuite(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Ssl cipher suites enums. + """ + + TLS_ECDHE_RSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + TLS_ECDHE_RSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + TLS_ECDHE_RSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + TLS_ECDHE_RSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + TLS_DHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" + TLS_DHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" + TLS_DHE_RSA_WITH_AES256_CBC_SHA = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" + TLS_DHE_RSA_WITH_AES128_CBC_SHA = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" + TLS_RSA_WITH_AES256_GCM_SHA384 = "TLS_RSA_WITH_AES_256_GCM_SHA384" + TLS_RSA_WITH_AES128_GCM_SHA256 = "TLS_RSA_WITH_AES_128_GCM_SHA256" + TLS_RSA_WITH_AES256_CBC_SHA256 = "TLS_RSA_WITH_AES_256_CBC_SHA256" + TLS_RSA_WITH_AES128_CBC_SHA256 = "TLS_RSA_WITH_AES_128_CBC_SHA256" + TLS_RSA_WITH_AES256_CBC_SHA = "TLS_RSA_WITH_AES_256_CBC_SHA" + TLS_RSA_WITH_AES128_CBC_SHA = "TLS_RSA_WITH_AES_128_CBC_SHA" + TLS_ECDHE_ECDSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + TLS_ECDHE_ECDSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" + TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" + TLS_DHE_DSS_WITH_AES256_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" + TLS_DHE_DSS_WITH_AES128_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" + TLS_DHE_DSS_WITH_AES256_CBC_SHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" + TLS_DHE_DSS_WITH_AES128_CBC_SHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" + TLS_RSA_WITH3_DES_EDE_CBC_SHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" + TLS_DHE_DSS_WITH3_DES_EDE_CBC_SHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" + TLS_ECDHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + TLS_ECDHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + +class ApplicationGatewaySslPolicyName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Ssl predefined policy name enums. + """ + + APP_GW_SSL_POLICY20150501 = "AppGwSslPolicy20150501" + APP_GW_SSL_POLICY20170401 = "AppGwSslPolicy20170401" + APP_GW_SSL_POLICY20170401_S = "AppGwSslPolicy20170401S" + +class ApplicationGatewaySslPolicyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of Ssl Policy. + """ + + PREDEFINED = "Predefined" + CUSTOM = "Custom" + +class ApplicationGatewaySslProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Ssl protocol enums. + """ + + TL_SV1_0 = "TLSv1_0" + TL_SV1_1 = "TLSv1_1" + TL_SV1_2 = "TLSv1_2" + +class ApplicationGatewayTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Tier of an application gateway. + """ + + STANDARD = "Standard" + WAF = "WAF" + STANDARD_V2 = "Standard_v2" + WAF_V2 = "WAF_v2" + +class AssociationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The association type of the child resource to the parent resource. + """ + + ASSOCIATED = "Associated" + CONTAINS = "Contains" + +class AuthenticationMethod(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """VPN client authentication method. + """ + + EAPTLS = "EAPTLS" + EAPMSCHA_PV2 = "EAPMSCHAPv2" + +class AuthorizationUseStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The authorization use status. + """ + + AVAILABLE = "Available" + IN_USE = "InUse" + +class AzureFirewallApplicationRuleProtocolType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The protocol type of a Application Rule resource. + """ + + HTTP = "Http" + HTTPS = "Https" + MSSQL = "Mssql" + +class AzureFirewallNatRCActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The action type of a NAT rule collection. + """ + + SNAT = "Snat" + DNAT = "Dnat" + +class AzureFirewallNetworkRuleProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The protocol of a Network Rule resource. + """ + + TCP = "TCP" + UDP = "UDP" + ANY = "Any" + ICMP = "ICMP" + +class AzureFirewallRCActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The action type of a rule collection. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class AzureFirewallSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Name of an Azure Firewall SKU. + """ + + AZFW_VNET = "AZFW_VNet" + AZFW_HUB = "AZFW_Hub" + +class AzureFirewallSkuTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Tier of an Azure Firewall. + """ + + STANDARD = "Standard" + PREMIUM = "Premium" + BASIC = "Basic" + +class AzureFirewallThreatIntelMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The operation mode for Threat Intel. + """ + + ALERT = "Alert" + DENY = "Deny" + OFF = "Off" + +class BastionConnectProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The protocol used to connect to the target. + """ + + SSH = "SSH" + RDP = "RDP" + +class BastionHostSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The name of this Bastion Host. + """ + + BASIC = "Basic" + STANDARD = "Standard" + +class BgpPeerState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The BGP peer state. + """ + + UNKNOWN = "Unknown" + STOPPED = "Stopped" + IDLE = "Idle" + CONNECTING = "Connecting" + CONNECTED = "Connected" + +class CircuitConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Express Route Circuit connection state. + """ + + CONNECTED = "Connected" + CONNECTING = "Connecting" + DISCONNECTED = "Disconnected" + +class CommissionedState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The commissioned state of the Custom IP Prefix. + """ + + PROVISIONING = "Provisioning" + PROVISIONED = "Provisioned" + COMMISSIONING = "Commissioning" + COMMISSIONED = "Commissioned" + DECOMMISSIONING = "Decommissioning" + DEPROVISIONING = "Deprovisioning" + +class ConnectionMonitorEndpointFilterItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of item included in the filter. Currently only 'AgentAddress' is supported. + """ + + AGENT_ADDRESS = "AgentAddress" + +class ConnectionMonitorEndpointFilterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The behavior of the endpoint filter. Currently only 'Include' is supported. + """ + + INCLUDE = "Include" + +class ConnectionMonitorSourceStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Status of connection monitor source. + """ + + UNKNOWN = "Unknown" + ACTIVE = "Active" + INACTIVE = "Inactive" + +class ConnectionMonitorTestConfigurationProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The protocol to use in test evaluation. + """ + + TCP = "Tcp" + HTTP = "Http" + ICMP = "Icmp" + +class ConnectionMonitorType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of connection monitor. + """ + + MULTI_ENDPOINT = "MultiEndpoint" + SINGLE_SOURCE_DESTINATION = "SingleSourceDestination" + +class ConnectionState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The connection state. + """ + + REACHABLE = "Reachable" + UNREACHABLE = "Unreachable" + UNKNOWN = "Unknown" + +class ConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The connection status. + """ + + UNKNOWN = "Unknown" + CONNECTED = "Connected" + DISCONNECTED = "Disconnected" + DEGRADED = "Degraded" + +class CoverageLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Test coverage for the endpoint. + """ + + DEFAULT = "Default" + LOW = "Low" + BELOW_AVERAGE = "BelowAverage" + AVERAGE = "Average" + ABOVE_AVERAGE = "AboveAverage" + FULL = "Full" + +class DdosCustomPolicyProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The protocol for which the DDoS protection policy is being customized. + """ + + TCP = "Tcp" + UDP = "Udp" + SYN = "Syn" + +class DdosCustomPolicyTriggerSensitivityOverride(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with + most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity + w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. + Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. + """ + + RELAXED = "Relaxed" + LOW = "Low" + DEFAULT = "Default" + HIGH = "High" + +class DdosSettingsProtectionCoverage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The DDoS protection policy customizability of the public IP. Only standard coverage will have + the ability to be customized. + """ + + BASIC = "Basic" + STANDARD = "Standard" + +class DeleteOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Specify what happens to the public IP address when the VM using it is deleted + """ + + DELETE = "Delete" + DETACH = "Detach" + +class DestinationPortBehavior(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Destination port behavior. + """ + + NONE = "None" + LISTEN_IF_AVAILABLE = "ListenIfAvailable" + +class DhGroup(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The DH Groups used in IKE Phase 1 for initial SA. + """ + + NONE = "None" + DH_GROUP1 = "DHGroup1" + DH_GROUP2 = "DHGroup2" + DH_GROUP14 = "DHGroup14" + DH_GROUP2048 = "DHGroup2048" + ECP256 = "ECP256" + ECP384 = "ECP384" + DH_GROUP24 = "DHGroup24" + +class Direction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The direction of the traffic. + """ + + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class EffectiveRouteSource(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Who created the route. + """ + + UNKNOWN = "Unknown" + USER = "User" + VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" + DEFAULT = "Default" + +class EffectiveRouteState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The value of effective route. + """ + + ACTIVE = "Active" + INVALID = "Invalid" + +class EffectiveSecurityRuleProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The network protocol this rule applies to. + """ + + TCP = "Tcp" + UDP = "Udp" + ALL = "All" + +class EndpointType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The endpoint type. + """ + + AZURE_VM = "AzureVM" + AZURE_V_NET = "AzureVNet" + AZURE_SUBNET = "AzureSubnet" + EXTERNAL_ADDRESS = "ExternalAddress" + MMA_WORKSPACE_MACHINE = "MMAWorkspaceMachine" + MMA_WORKSPACE_NETWORK = "MMAWorkspaceNetwork" + +class EvaluationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Connectivity analysis evaluation state. + """ + + NOT_STARTED = "NotStarted" + IN_PROGRESS = "InProgress" + COMPLETED = "Completed" + +class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The advertised public prefix state of the Peering resource. + """ + + NOT_CONFIGURED = "NotConfigured" + CONFIGURING = "Configuring" + CONFIGURED = "Configured" + VALIDATION_NEEDED = "ValidationNeeded" + +class ExpressRouteCircuitPeeringState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of peering. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class ExpressRouteCircuitSkuFamily(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The family of the SKU. + """ + + UNLIMITED_DATA = "UnlimitedData" + METERED_DATA = "MeteredData" + +class ExpressRouteCircuitSkuTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The tier of the SKU. + """ + + STANDARD = "Standard" + PREMIUM = "Premium" + BASIC = "Basic" + LOCAL = "Local" + +class ExpressRouteLinkAdminState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Administrative state of the physical port. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class ExpressRouteLinkConnectorType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Physical fiber port type. + """ + + LC = "LC" + SC = "SC" + +class ExpressRouteLinkMacSecCipher(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Mac security cipher. + """ + + GCM_AES256 = "GcmAes256" + GCM_AES128 = "GcmAes128" + GCM_AES_XPN128 = "GcmAesXpn128" + GCM_AES_XPN256 = "GcmAesXpn256" + +class ExpressRouteLinkMacSecSciState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Sci mode enabled/disabled. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class ExpressRoutePeeringState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of peering. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class ExpressRoutePeeringType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The peering type. + """ + + AZURE_PUBLIC_PEERING = "AzurePublicPeering" + AZURE_PRIVATE_PEERING = "AzurePrivatePeering" + MICROSOFT_PEERING = "MicrosoftPeering" + +class ExpressRoutePortAuthorizationUseStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The authorization use status. + """ + + AVAILABLE = "Available" + IN_USE = "InUse" + +class ExpressRoutePortsEncapsulation(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Encapsulation method on physical ports. + """ + + DOT1_Q = "Dot1Q" + QIN_Q = "QinQ" + +class ExtendedLocationTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The supported ExtendedLocation types. Currently only EdgeZone is supported in Microsoft.Network + resources. + """ + + EDGE_ZONE = "EdgeZone" + +class FirewallPolicyFilterRuleCollectionActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The action type of a rule. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class FirewallPolicyIDPSQuerySortOrder(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Describes if results should be in ascending/descending order + """ + + ASCENDING = "Ascending" + DESCENDING = "Descending" + +class FirewallPolicyIDPSSignatureDirection(with_metaclass(CaseInsensitiveEnumMeta, int, Enum)): + """Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, 2 - + Bidirectional + """ + + ZERO = 0 + ONE = 1 + TWO = 2 + +class FirewallPolicyIDPSSignatureMode(with_metaclass(CaseInsensitiveEnumMeta, int, Enum)): + """The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny + """ + + ZERO = 0 + ONE = 1 + TWO = 2 + +class FirewallPolicyIDPSSignatureSeverity(with_metaclass(CaseInsensitiveEnumMeta, int, Enum)): + """Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High + """ + + ONE = 1 + TWO = 2 + THREE = 3 + +class FirewallPolicyIntrusionDetectionProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Possible intrusion detection bypass traffic protocols. + """ + + TCP = "TCP" + UDP = "UDP" + ICMP = "ICMP" + ANY = "ANY" + +class FirewallPolicyIntrusionDetectionStateType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Possible state values. + """ + + OFF = "Off" + ALERT = "Alert" + DENY = "Deny" + +class FirewallPolicyNatRuleCollectionActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The action type of a rule. + """ + + DNAT = "DNAT" + +class FirewallPolicyRuleApplicationProtocolType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The application protocol type of a Rule. + """ + + HTTP = "Http" + HTTPS = "Https" + +class FirewallPolicyRuleCollectionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of the rule collection. + """ + + FIREWALL_POLICY_NAT_RULE_COLLECTION = "FirewallPolicyNatRuleCollection" + FIREWALL_POLICY_FILTER_RULE_COLLECTION = "FirewallPolicyFilterRuleCollection" + +class FirewallPolicyRuleNetworkProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The Network protocol of a Rule. + """ + + TCP = "TCP" + UDP = "UDP" + ANY = "Any" + ICMP = "ICMP" + +class FirewallPolicyRuleType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Rule Type. + """ + + APPLICATION_RULE = "ApplicationRule" + NETWORK_RULE = "NetworkRule" + NAT_RULE = "NatRule" + +class FirewallPolicySkuTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Tier of Firewall Policy. + """ + + STANDARD = "Standard" + PREMIUM = "Premium" + BASIC = "Basic" + +class FlowLogFormatType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The file type of flow log. + """ + + JSON = "JSON" + +class GatewayLoadBalancerTunnelInterfaceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Traffic type of gateway load balancer tunnel interface. + """ + + NONE = "None" + INTERNAL = "Internal" + EXTERNAL = "External" + +class GatewayLoadBalancerTunnelProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Protocol of gateway load balancer tunnel interface. + """ + + NONE = "None" + NATIVE = "Native" + VXLAN = "VXLAN" + +class HTTPConfigurationMethod(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The HTTP method to use. + """ + + GET = "Get" + POST = "Post" + +class HTTPMethod(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """HTTP method. + """ + + GET = "Get" + +class HubBgpConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the VirtualHub to Peer. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class HubRoutingPreference(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The hub routing preference gateway types + """ + + EXPRESS_ROUTE = "ExpressRoute" + VPN_GATEWAY = "VpnGateway" + AS_PATH = "ASPath" + +class HubVirtualNetworkConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the VirtualHub to vnet connection. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class IkeEncryption(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The IKE encryption algorithm (IKE phase 2). + """ + + DES = "DES" + DES3 = "DES3" + AES128 = "AES128" + AES192 = "AES192" + AES256 = "AES256" + GCMAES256 = "GCMAES256" + GCMAES128 = "GCMAES128" + +class IkeIntegrity(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The IKE integrity algorithm (IKE phase 2). + """ + + MD5 = "MD5" + SHA1 = "SHA1" + SHA256 = "SHA256" + SHA384 = "SHA384" + GCMAES256 = "GCMAES256" + GCMAES128 = "GCMAES128" + +class InboundSecurityRulesProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Protocol. This should be either TCP or UDP. + """ + + TCP = "TCP" + UDP = "UDP" + +class IPAllocationMethod(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """IP address allocation method. + """ + + STATIC = "Static" + DYNAMIC = "Dynamic" + +class IpAllocationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """IpAllocation type. + """ + + UNDEFINED = "Undefined" + HYPERNET = "Hypernet" + +class IpFlowProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Protocol to be verified on. + """ + + TCP = "TCP" + UDP = "UDP" + +class IpsecEncryption(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The IPSec encryption algorithm (IKE phase 1). + """ + + NONE = "None" + DES = "DES" + DES3 = "DES3" + AES128 = "AES128" + AES192 = "AES192" + AES256 = "AES256" + GCMAES128 = "GCMAES128" + GCMAES192 = "GCMAES192" + GCMAES256 = "GCMAES256" + +class IpsecIntegrity(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The IPSec integrity algorithm (IKE phase 1). + """ + + MD5 = "MD5" + SHA1 = "SHA1" + SHA256 = "SHA256" + GCMAES128 = "GCMAES128" + GCMAES192 = "GCMAES192" + GCMAES256 = "GCMAES256" + +class IPVersion(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """IP address version. + """ + + I_PV4 = "IPv4" + I_PV6 = "IPv6" + +class IssueType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of issue. + """ + + UNKNOWN = "Unknown" + AGENT_STOPPED = "AgentStopped" + GUEST_FIREWALL = "GuestFirewall" + DNS_RESOLUTION = "DnsResolution" + SOCKET_BIND = "SocketBind" + NETWORK_SECURITY_RULE = "NetworkSecurityRule" + USER_DEFINED_ROUTE = "UserDefinedRoute" + PORT_THROTTLED = "PortThrottled" + PLATFORM = "Platform" + +class LoadBalancerBackendAddressAdminState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """A list of administrative states which once set can override health probe so that Load Balancer + will always forward new connections to backend, or deny new connections and reset existing + connections. + """ + + NONE = "None" + UP = "Up" + DOWN = "Down" + DRAIN = "Drain" + +class LoadBalancerOutboundRuleProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The protocol for the outbound rule in load balancer. + """ + + TCP = "Tcp" + UDP = "Udp" + ALL = "All" + +class LoadBalancerSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Name of a load balancer SKU. + """ + + BASIC = "Basic" + STANDARD = "Standard" + GATEWAY = "Gateway" + +class LoadBalancerSkuTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a load balancer SKU. + """ + + REGIONAL = "Regional" + GLOBAL_ENUM = "Global" + +class LoadDistribution(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The load distribution policy for this rule. + """ + + DEFAULT = "Default" + SOURCE_IP = "SourceIP" + SOURCE_IP_PROTOCOL = "SourceIPProtocol" + +class ManagedRuleEnabledState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the managed rule. Defaults to Disabled if not specified. + """ + + DISABLED = "Disabled" + +class NatGatewaySkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Name of Nat Gateway SKU. + """ + + STANDARD = "Standard" + +class NetworkInterfaceAuxiliaryMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Auxiliary mode of Network Interface resource. + """ + + NONE = "None" + MAX_CONNECTIONS = "MaxConnections" + FLOATING = "Floating" + +class NetworkInterfaceMigrationPhase(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Migration phase of Network Interface resource. + """ + + NONE = "None" + PREPARE = "Prepare" + COMMIT = "Commit" + ABORT = "Abort" + COMMITTED = "Committed" + +class NetworkInterfaceNicType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of Network Interface resource. + """ + + STANDARD = "Standard" + ELASTIC = "Elastic" + +class NetworkOperationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Status of the Azure async operation. + """ + + IN_PROGRESS = "InProgress" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class NextHopType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Next hop type. + """ + + INTERNET = "Internet" + VIRTUAL_APPLIANCE = "VirtualAppliance" + VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" + VNET_LOCAL = "VnetLocal" + HYPER_NET_GATEWAY = "HyperNetGateway" + NONE = "None" + +class OfficeTrafficCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The office traffic category. + """ + + OPTIMIZE = "Optimize" + OPTIMIZE_AND_ALLOW = "OptimizeAndAllow" + ALL = "All" + NONE = "None" + +class Origin(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The origin of the issue. + """ + + LOCAL = "Local" + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class OutputType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Connection monitor output destination type. Currently, only "Workspace" is supported. + """ + + WORKSPACE = "Workspace" + +class OwaspCrsExclusionEntryMatchVariable(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The variable to be excluded. + """ + + REQUEST_HEADER_NAMES = "RequestHeaderNames" + REQUEST_COOKIE_NAMES = "RequestCookieNames" + REQUEST_ARG_NAMES = "RequestArgNames" + REQUEST_HEADER_KEYS = "RequestHeaderKeys" + REQUEST_HEADER_VALUES = "RequestHeaderValues" + REQUEST_COOKIE_KEYS = "RequestCookieKeys" + REQUEST_COOKIE_VALUES = "RequestCookieValues" + REQUEST_ARG_KEYS = "RequestArgKeys" + REQUEST_ARG_VALUES = "RequestArgValues" + +class OwaspCrsExclusionEntrySelectorMatchOperator(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """When matchVariable is a collection, operate on the selector to specify which elements in the + collection this exclusion applies to. + """ + + EQUALS = "Equals" + CONTAINS = "Contains" + STARTS_WITH = "StartsWith" + ENDS_WITH = "EndsWith" + EQUALS_ANY = "EqualsAny" + +class PcError(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + INTERNAL_ERROR = "InternalError" + AGENT_STOPPED = "AgentStopped" + CAPTURE_FAILED = "CaptureFailed" + LOCAL_FILE_FAILED = "LocalFileFailed" + STORAGE_FAILED = "StorageFailed" + +class PcProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Protocol to be filtered on. + """ + + TCP = "TCP" + UDP = "UDP" + ANY = "Any" + +class PcStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the packet capture session. + """ + + NOT_STARTED = "NotStarted" + RUNNING = "Running" + STOPPED = "Stopped" + ERROR = "Error" + UNKNOWN = "Unknown" + +class PfsGroup(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The Pfs Groups used in IKE Phase 2 for new child SA. + """ + + NONE = "None" + PFS1 = "PFS1" + PFS2 = "PFS2" + PFS2048 = "PFS2048" + ECP256 = "ECP256" + ECP384 = "ECP384" + PFS24 = "PFS24" + PFS14 = "PFS14" + PFSMM = "PFSMM" + +class PreferredIPVersion(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The preferred IP version to use in test evaluation. The connection monitor may choose to use a + different version depending on other parameters. + """ + + I_PV4 = "IPv4" + I_PV6 = "IPv6" + +class PreferredRoutingGateway(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The preferred routing gateway types + """ + + EXPRESS_ROUTE = "ExpressRoute" + VPN_GATEWAY = "VpnGateway" + NONE = "None" + +class ProbeProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe + to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI + is required for the probe to be successful. + """ + + HTTP = "Http" + TCP = "Tcp" + HTTPS = "Https" + +class ProcessorArchitecture(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """VPN client Processor Architecture. + """ + + AMD64 = "Amd64" + X86 = "X86" + +class Protocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Network protocol. + """ + + TCP = "Tcp" + HTTP = "Http" + HTTPS = "Https" + ICMP = "Icmp" + +class ProtocolType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """RNM supported protocol types. + """ + + DO_NOT_USE = "DoNotUse" + ICMP = "Icmp" + TCP = "Tcp" + UDP = "Udp" + GRE = "Gre" + ESP = "Esp" + AH = "Ah" + VXLAN = "Vxlan" + ALL = "All" + +class ProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class PublicIPAddressMigrationPhase(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Migration phase of Public IP Address. + """ + + NONE = "None" + PREPARE = "Prepare" + COMMIT = "Commit" + ABORT = "Abort" + COMMITTED = "Committed" + +class PublicIPAddressSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Name of a public IP address SKU. + """ + + BASIC = "Basic" + STANDARD = "Standard" + +class PublicIPAddressSkuTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a public IP address SKU. + """ + + REGIONAL = "Regional" + GLOBAL_ENUM = "Global" + +class PublicIPPrefixSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Name of a public IP prefix SKU. + """ + + STANDARD = "Standard" + +class PublicIPPrefixSkuTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a public IP prefix SKU. + """ + + REGIONAL = "Regional" + GLOBAL_ENUM = "Global" + +class ResourceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes + both an implicitly created identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + NONE = "None" + +class RouteFilterRuleType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The rule type of the rule. + """ + + COMMUNITY = "Community" + +class RouteNextHopType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of Azure hop the packet should be sent to. + """ + + VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" + VNET_LOCAL = "VnetLocal" + INTERNET = "Internet" + VIRTUAL_APPLIANCE = "VirtualAppliance" + NONE = "None" + +class RoutingState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The current routing state of the VirtualHub. + """ + + NONE = "None" + PROVISIONED = "Provisioned" + PROVISIONING = "Provisioning" + FAILED = "Failed" + +class SecurityPartnerProviderConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the connection with Security Partner Provider. + """ + + UNKNOWN = "Unknown" + PARTIALLY_CONNECTED = "PartiallyConnected" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class SecurityProviderName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The Security Providers. + """ + + Z_SCALER = "ZScaler" + I_BOSS = "IBoss" + CHECKPOINT = "Checkpoint" + +class SecurityRuleAccess(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Whether network traffic is allowed or denied. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class SecurityRuleDirection(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The direction of the rule. The direction specifies if rule will be evaluated on incoming or + outgoing traffic. + """ + + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class SecurityRuleProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Network protocol this rule applies to. + """ + + TCP = "Tcp" + UDP = "Udp" + ICMP = "Icmp" + ESP = "Esp" + ASTERISK = "*" + AH = "Ah" + +class ServiceProviderProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The ServiceProviderProvisioningState state of the resource. + """ + + NOT_PROVISIONED = "NotProvisioned" + PROVISIONING = "Provisioning" + PROVISIONED = "Provisioned" + DEPROVISIONING = "Deprovisioning" + +class Severity(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The severity of the issue. + """ + + ERROR = "Error" + WARNING = "Warning" + +class SyncRemoteAddressSpace(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + TRUE = "true" + +class TransportProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The transport protocol for the endpoint. + """ + + UDP = "Udp" + TCP = "Tcp" + ALL = "All" + +class TunnelConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the tunnel. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class UsageUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """An enum describing the unit of measurement. + """ + + COUNT = "Count" + +class VerbosityLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Verbosity level. + """ + + NORMAL = "Normal" + MINIMUM = "Minimum" + FULL = "Full" + +class VirtualNetworkEncryptionEnforcement(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """If the encrypted VNet allows VM that does not support encryption + """ + + DROP_UNENCRYPTED = "DropUnencrypted" + ALLOW_UNENCRYPTED = "AllowUnencrypted" + +class VirtualNetworkGatewayConnectionMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Gateway connection type. + """ + + DEFAULT = "Default" + RESPONDER_ONLY = "ResponderOnly" + INITIATOR_ONLY = "InitiatorOnly" + +class VirtualNetworkGatewayConnectionProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Gateway connection protocol. + """ + + IK_EV2 = "IKEv2" + IK_EV1 = "IKEv1" + +class VirtualNetworkGatewayConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Virtual Network Gateway connection status. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class VirtualNetworkGatewayConnectionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Gateway connection type. + """ + + I_PSEC = "IPsec" + VNET2_VNET = "Vnet2Vnet" + EXPRESS_ROUTE = "ExpressRoute" + VPN_CLIENT = "VPNClient" + +class VirtualNetworkGatewaySkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Gateway SKU name. + """ + + BASIC = "Basic" + HIGH_PERFORMANCE = "HighPerformance" + STANDARD = "Standard" + ULTRA_PERFORMANCE = "UltraPerformance" + VPN_GW1 = "VpnGw1" + VPN_GW2 = "VpnGw2" + VPN_GW3 = "VpnGw3" + VPN_GW4 = "VpnGw4" + VPN_GW5 = "VpnGw5" + VPN_GW1_AZ = "VpnGw1AZ" + VPN_GW2_AZ = "VpnGw2AZ" + VPN_GW3_AZ = "VpnGw3AZ" + VPN_GW4_AZ = "VpnGw4AZ" + VPN_GW5_AZ = "VpnGw5AZ" + ER_GW1_AZ = "ErGw1AZ" + ER_GW2_AZ = "ErGw2AZ" + ER_GW3_AZ = "ErGw3AZ" + +class VirtualNetworkGatewaySkuTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Gateway SKU tier. + """ + + BASIC = "Basic" + HIGH_PERFORMANCE = "HighPerformance" + STANDARD = "Standard" + ULTRA_PERFORMANCE = "UltraPerformance" + VPN_GW1 = "VpnGw1" + VPN_GW2 = "VpnGw2" + VPN_GW3 = "VpnGw3" + VPN_GW4 = "VpnGw4" + VPN_GW5 = "VpnGw5" + VPN_GW1_AZ = "VpnGw1AZ" + VPN_GW2_AZ = "VpnGw2AZ" + VPN_GW3_AZ = "VpnGw3AZ" + VPN_GW4_AZ = "VpnGw4AZ" + VPN_GW5_AZ = "VpnGw5AZ" + ER_GW1_AZ = "ErGw1AZ" + ER_GW2_AZ = "ErGw2AZ" + ER_GW3_AZ = "ErGw3AZ" + +class VirtualNetworkGatewayType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of this virtual network gateway. + """ + + VPN = "Vpn" + EXPRESS_ROUTE = "ExpressRoute" + LOCAL_GATEWAY = "LocalGateway" + +class VirtualNetworkPeeringLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The peering sync status of the virtual network peering. + """ + + FULLY_IN_SYNC = "FullyInSync" + REMOTE_NOT_IN_SYNC = "RemoteNotInSync" + LOCAL_NOT_IN_SYNC = "LocalNotInSync" + LOCAL_AND_REMOTE_NOT_IN_SYNC = "LocalAndRemoteNotInSync" + +class VirtualNetworkPeeringState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status of the virtual network peering. + """ + + INITIATED = "Initiated" + CONNECTED = "Connected" + DISCONNECTED = "Disconnected" + +class VirtualNetworkPrivateEndpointNetworkPolicies(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enable or Disable apply network policies on private end point in the subnet. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class VirtualNetworkPrivateLinkServiceNetworkPolicies(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enable or Disable apply network policies on private link service in the subnet. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class VirtualWanSecurityProviderType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The virtual wan security provider type. + """ + + EXTERNAL = "External" + NATIVE = "Native" + +class VpnAuthenticationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """VPN authentication types enabled for the virtual network gateway. + """ + + CERTIFICATE = "Certificate" + RADIUS = "Radius" + AAD = "AAD" + +class VpnClientProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """VPN client protocol enabled for the virtual network gateway. + """ + + IKE_V2 = "IkeV2" + SSTP = "SSTP" + OPEN_VPN = "OpenVPN" + +class VpnConnectionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the vpn connection. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class VpnGatewayGeneration(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. + """ + + NONE = "None" + GENERATION1 = "Generation1" + GENERATION2 = "Generation2" + +class VpnGatewayTunnelingProtocol(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """VPN protocol enabled for the VpnServerConfiguration. + """ + + IKE_V2 = "IkeV2" + OPEN_VPN = "OpenVPN" + +class VpnLinkConnectionMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Vpn link connection mode. + """ + + DEFAULT = "Default" + RESPONDER_ONLY = "ResponderOnly" + INITIATOR_ONLY = "InitiatorOnly" + +class VpnNatRuleMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The Source NAT direction of a VPN NAT. + """ + + EGRESS_SNAT = "EgressSnat" + INGRESS_SNAT = "IngressSnat" + +class VpnNatRuleType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of NAT rule for VPN NAT. + """ + + STATIC = "Static" + DYNAMIC = "Dynamic" + +class VpnPolicyMemberAttributeType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The Vpn Policy member attribute type. + """ + + CERTIFICATE_GROUP_ID = "CertificateGroupId" + AAD_GROUP_ID = "AADGroupId" + RADIUS_AZURE_GROUP_ID = "RadiusAzureGroupId" + +class VpnType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The type of this virtual network gateway. + """ + + POLICY_BASED = "PolicyBased" + ROUTE_BASED = "RouteBased" + +class WebApplicationFirewallAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of Actions. + """ + + ALLOW = "Allow" + BLOCK = "Block" + LOG = "Log" + +class WebApplicationFirewallEnabledState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The state of the policy. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class WebApplicationFirewallMatchVariable(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Match Variable. + """ + + REMOTE_ADDR = "RemoteAddr" + REQUEST_METHOD = "RequestMethod" + QUERY_STRING = "QueryString" + POST_ARGS = "PostArgs" + REQUEST_URI = "RequestUri" + REQUEST_HEADERS = "RequestHeaders" + REQUEST_BODY = "RequestBody" + REQUEST_COOKIES = "RequestCookies" + +class WebApplicationFirewallMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The mode of the policy. + """ + + PREVENTION = "Prevention" + DETECTION = "Detection" + +class WebApplicationFirewallOperator(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The operator to be matched. + """ + + IP_MATCH = "IPMatch" + EQUAL = "Equal" + CONTAINS = "Contains" + LESS_THAN = "LessThan" + GREATER_THAN = "GreaterThan" + LESS_THAN_OR_EQUAL = "LessThanOrEqual" + GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + BEGINS_WITH = "BeginsWith" + ENDS_WITH = "EndsWith" + REGEX = "Regex" + GEO_MATCH = "GeoMatch" + +class WebApplicationFirewallPolicyResourceState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Resource status of the policy. + """ + + CREATING = "Creating" + ENABLING = "Enabling" + ENABLED = "Enabled" + DISABLING = "Disabling" + DISABLED = "Disabled" + DELETING = "Deleting" + +class WebApplicationFirewallRuleType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The rule type. + """ + + MATCH_RULE = "MatchRule" + INVALID = "Invalid" + +class WebApplicationFirewallTransform(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Transforms applied before matching. + """ + + LOWERCASE = "Lowercase" + TRIM = "Trim" + URL_DECODE = "UrlDecode" + URL_ENCODE = "UrlEncode" + REMOVE_NULLS = "RemoveNulls" + HTML_ENTITY_DECODE = "HtmlEntityDecode" diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/operations/__init__.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/operations/__init__.py new file mode 100644 index 00000000000..f71d0fb7e6d --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/operations/__init__.py @@ -0,0 +1,241 @@ +# 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 ._operations import ApplicationGatewaysOperations +from ._operations import ApplicationGatewayPrivateLinkResourcesOperations +from ._operations import ApplicationGatewayPrivateEndpointConnectionsOperations +from ._operations import ApplicationSecurityGroupsOperations +from ._operations import AvailableDelegationsOperations +from ._operations import AvailableResourceGroupDelegationsOperations +from ._operations import AvailableServiceAliasesOperations +from ._operations import AzureFirewallsOperations +from ._operations import AzureFirewallFqdnTagsOperations +from ._operations import WebCategoriesOperations +from ._operations import BastionHostsOperations +from ._operations import NetworkManagementClientOperationsMixin +from ._operations import NetworkInterfacesOperations +from ._operations import PublicIPAddressesOperations +from ._operations import CustomIPPrefixesOperations +from ._operations import DdosCustomPoliciesOperations +from ._operations import DdosProtectionPlansOperations +from ._operations import DscpConfigurationOperations +from ._operations import AvailableEndpointServicesOperations +from ._operations import ExpressRouteCircuitAuthorizationsOperations +from ._operations import ExpressRouteCircuitPeeringsOperations +from ._operations import ExpressRouteCircuitConnectionsOperations +from ._operations import PeerExpressRouteCircuitConnectionsOperations +from ._operations import ExpressRouteCircuitsOperations +from ._operations import ExpressRouteServiceProvidersOperations +from ._operations import ExpressRouteCrossConnectionsOperations +from ._operations import ExpressRouteCrossConnectionPeeringsOperations +from ._operations import ExpressRoutePortsLocationsOperations +from ._operations import ExpressRoutePortsOperations +from ._operations import ExpressRouteLinksOperations +from ._operations import ExpressRoutePortAuthorizationsOperations +from ._operations import FirewallPoliciesOperations +from ._operations import FirewallPolicyRuleCollectionGroupsOperations +from ._operations import FirewallPolicyIdpsSignaturesOperations +from ._operations import FirewallPolicyIdpsSignaturesOverridesOperations +from ._operations import FirewallPolicyIdpsSignaturesFilterValuesOperations +from ._operations import IpAllocationsOperations +from ._operations import IpGroupsOperations +from ._operations import LoadBalancersOperations +from ._operations import LoadBalancerBackendAddressPoolsOperations +from ._operations import LoadBalancerFrontendIPConfigurationsOperations +from ._operations import InboundNatRulesOperations +from ._operations import LoadBalancerLoadBalancingRulesOperations +from ._operations import LoadBalancerOutboundRulesOperations +from ._operations import LoadBalancerNetworkInterfacesOperations +from ._operations import LoadBalancerProbesOperations +from ._operations import NatGatewaysOperations +from ._operations import NetworkInterfaceIPConfigurationsOperations +from ._operations import NetworkInterfaceLoadBalancersOperations +from ._operations import NetworkInterfaceTapConfigurationsOperations +from ._operations import NetworkProfilesOperations +from ._operations import NetworkSecurityGroupsOperations +from ._operations import SecurityRulesOperations +from ._operations import DefaultSecurityRulesOperations +from ._operations import NetworkVirtualAppliancesOperations +from ._operations import VirtualApplianceSitesOperations +from ._operations import VirtualApplianceSkusOperations +from ._operations import InboundSecurityRuleOperations +from ._operations import NetworkWatchersOperations +from ._operations import PacketCapturesOperations +from ._operations import ConnectionMonitorsOperations +from ._operations import FlowLogsOperations +from ._operations import Operations +from ._operations import PrivateEndpointsOperations +from ._operations import AvailablePrivateEndpointTypesOperations +from ._operations import PrivateDnsZoneGroupsOperations +from ._operations import PrivateLinkServicesOperations +from ._operations import PublicIPPrefixesOperations +from ._operations import RouteFiltersOperations +from ._operations import RouteFilterRulesOperations +from ._operations import RouteTablesOperations +from ._operations import RoutesOperations +from ._operations import SecurityPartnerProvidersOperations +from ._operations import BgpServiceCommunitiesOperations +from ._operations import ServiceEndpointPoliciesOperations +from ._operations import ServiceEndpointPolicyDefinitionsOperations +from ._operations import ServiceTagsOperations +from ._operations import ServiceTagInformationOperations +from ._operations import UsagesOperations +from ._operations import VirtualNetworksOperations +from ._operations import SubnetsOperations +from ._operations import ResourceNavigationLinksOperations +from ._operations import ServiceAssociationLinksOperations +from ._operations import VirtualNetworkPeeringsOperations +from ._operations import VirtualNetworkGatewaysOperations +from ._operations import VirtualNetworkGatewayConnectionsOperations +from ._operations import LocalNetworkGatewaysOperations +from ._operations import VirtualNetworkGatewayNatRulesOperations +from ._operations import VirtualNetworkTapsOperations +from ._operations import VirtualRoutersOperations +from ._operations import VirtualRouterPeeringsOperations +from ._operations import VirtualWansOperations +from ._operations import VpnSitesOperations +from ._operations import VpnSiteLinksOperations +from ._operations import VpnSitesConfigurationOperations +from ._operations import VpnServerConfigurationsOperations +from ._operations import ConfigurationPolicyGroupsOperations +from ._operations import VirtualHubsOperations +from ._operations import HubVirtualNetworkConnectionsOperations +from ._operations import VpnGatewaysOperations +from ._operations import VpnLinkConnectionsOperations +from ._operations import VpnConnectionsOperations +from ._operations import VpnSiteLinkConnectionsOperations +from ._operations import NatRulesOperations +from ._operations import P2SVpnGatewaysOperations +from ._operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations +from ._operations import VirtualHubRouteTableV2SOperations +from ._operations import ExpressRouteGatewaysOperations +from ._operations import ExpressRouteConnectionsOperations +from ._operations import VirtualHubBgpConnectionOperations +from ._operations import VirtualHubBgpConnectionsOperations +from ._operations import VirtualHubIpConfigurationOperations +from ._operations import HubRouteTablesOperations +from ._operations import RoutingIntentOperations +from ._operations import WebApplicationFirewallPoliciesOperations + +__all__ = [ + 'ApplicationGatewaysOperations', + 'ApplicationGatewayPrivateLinkResourcesOperations', + 'ApplicationGatewayPrivateEndpointConnectionsOperations', + 'ApplicationSecurityGroupsOperations', + 'AvailableDelegationsOperations', + 'AvailableResourceGroupDelegationsOperations', + 'AvailableServiceAliasesOperations', + 'AzureFirewallsOperations', + 'AzureFirewallFqdnTagsOperations', + 'WebCategoriesOperations', + 'BastionHostsOperations', + 'NetworkManagementClientOperationsMixin', + 'NetworkInterfacesOperations', + 'PublicIPAddressesOperations', + 'CustomIPPrefixesOperations', + 'DdosCustomPoliciesOperations', + 'DdosProtectionPlansOperations', + 'DscpConfigurationOperations', + 'AvailableEndpointServicesOperations', + 'ExpressRouteCircuitAuthorizationsOperations', + 'ExpressRouteCircuitPeeringsOperations', + 'ExpressRouteCircuitConnectionsOperations', + 'PeerExpressRouteCircuitConnectionsOperations', + 'ExpressRouteCircuitsOperations', + 'ExpressRouteServiceProvidersOperations', + 'ExpressRouteCrossConnectionsOperations', + 'ExpressRouteCrossConnectionPeeringsOperations', + 'ExpressRoutePortsLocationsOperations', + 'ExpressRoutePortsOperations', + 'ExpressRouteLinksOperations', + 'ExpressRoutePortAuthorizationsOperations', + 'FirewallPoliciesOperations', + 'FirewallPolicyRuleCollectionGroupsOperations', + 'FirewallPolicyIdpsSignaturesOperations', + 'FirewallPolicyIdpsSignaturesOverridesOperations', + 'FirewallPolicyIdpsSignaturesFilterValuesOperations', + 'IpAllocationsOperations', + 'IpGroupsOperations', + 'LoadBalancersOperations', + 'LoadBalancerBackendAddressPoolsOperations', + 'LoadBalancerFrontendIPConfigurationsOperations', + 'InboundNatRulesOperations', + 'LoadBalancerLoadBalancingRulesOperations', + 'LoadBalancerOutboundRulesOperations', + 'LoadBalancerNetworkInterfacesOperations', + 'LoadBalancerProbesOperations', + 'NatGatewaysOperations', + 'NetworkInterfaceIPConfigurationsOperations', + 'NetworkInterfaceLoadBalancersOperations', + 'NetworkInterfaceTapConfigurationsOperations', + 'NetworkProfilesOperations', + 'NetworkSecurityGroupsOperations', + 'SecurityRulesOperations', + 'DefaultSecurityRulesOperations', + 'NetworkVirtualAppliancesOperations', + 'VirtualApplianceSitesOperations', + 'VirtualApplianceSkusOperations', + 'InboundSecurityRuleOperations', + 'NetworkWatchersOperations', + 'PacketCapturesOperations', + 'ConnectionMonitorsOperations', + 'FlowLogsOperations', + 'Operations', + 'PrivateEndpointsOperations', + 'AvailablePrivateEndpointTypesOperations', + 'PrivateDnsZoneGroupsOperations', + 'PrivateLinkServicesOperations', + 'PublicIPPrefixesOperations', + 'RouteFiltersOperations', + 'RouteFilterRulesOperations', + 'RouteTablesOperations', + 'RoutesOperations', + 'SecurityPartnerProvidersOperations', + 'BgpServiceCommunitiesOperations', + 'ServiceEndpointPoliciesOperations', + 'ServiceEndpointPolicyDefinitionsOperations', + 'ServiceTagsOperations', + 'ServiceTagInformationOperations', + 'UsagesOperations', + 'VirtualNetworksOperations', + 'SubnetsOperations', + 'ResourceNavigationLinksOperations', + 'ServiceAssociationLinksOperations', + 'VirtualNetworkPeeringsOperations', + 'VirtualNetworkGatewaysOperations', + 'VirtualNetworkGatewayConnectionsOperations', + 'LocalNetworkGatewaysOperations', + 'VirtualNetworkGatewayNatRulesOperations', + 'VirtualNetworkTapsOperations', + 'VirtualRoutersOperations', + 'VirtualRouterPeeringsOperations', + 'VirtualWansOperations', + 'VpnSitesOperations', + 'VpnSiteLinksOperations', + 'VpnSitesConfigurationOperations', + 'VpnServerConfigurationsOperations', + 'ConfigurationPolicyGroupsOperations', + 'VirtualHubsOperations', + 'HubVirtualNetworkConnectionsOperations', + 'VpnGatewaysOperations', + 'VpnLinkConnectionsOperations', + 'VpnConnectionsOperations', + 'VpnSiteLinkConnectionsOperations', + 'NatRulesOperations', + 'P2SVpnGatewaysOperations', + 'VpnServerConfigurationsAssociatedWithVirtualWanOperations', + 'VirtualHubRouteTableV2SOperations', + 'ExpressRouteGatewaysOperations', + 'ExpressRouteConnectionsOperations', + 'VirtualHubBgpConnectionOperations', + 'VirtualHubBgpConnectionsOperations', + 'VirtualHubIpConfigurationOperations', + 'HubRouteTablesOperations', + 'RoutingIntentOperations', + 'WebApplicationFirewallPoliciesOperations', +] diff --git a/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/operations/_operations.py b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/operations/_operations.py new file mode 100644 index 00000000000..50e7ef4349c --- /dev/null +++ b/src/azure-firewall/azext_firewall/vendored_sdks/v2021_08_01/v2021_08_01/operations/_operations.py @@ -0,0 +1,75744 @@ +# pylint: disable=too-many-lines +# 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 typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_application_gateways_delete_request_initial( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_get_request( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_create_or_update_request_initial( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_application_gateways_update_tags_request( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_application_gateways_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_start_request_initial( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_stop_request_initial( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_backend_health_request_initial( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_backend_health_on_demand_request_initial( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_application_gateways_list_available_server_variables_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_list_available_request_headers_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_list_available_response_headers_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_list_available_waf_rule_sets_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_list_available_ssl_options_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_list_available_ssl_predefined_policies_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateways_get_ssl_predefined_policy_request( + subscription_id: str, + predefined_policy_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "predefinedPolicyName": _SERIALIZER.url("predefined_policy_name", predefined_policy_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateway_private_link_resources_list_request( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateway_private_endpoint_connections_delete_request_initial( + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateway_private_endpoint_connections_update_request_initial( + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_application_gateway_private_endpoint_connections_get_request( + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_gateway_private_endpoint_connections_list_request( + resource_group_name: str, + application_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationGatewayName": _SERIALIZER.url("application_gateway_name", application_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_security_groups_delete_request_initial( + resource_group_name: str, + application_security_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationSecurityGroupName": _SERIALIZER.url("application_security_group_name", application_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_security_groups_get_request( + resource_group_name: str, + application_security_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationSecurityGroupName": _SERIALIZER.url("application_security_group_name", application_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_security_groups_create_or_update_request_initial( + resource_group_name: str, + application_security_group_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationSecurityGroupName": _SERIALIZER.url("application_security_group_name", application_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_application_security_groups_update_tags_request( + resource_group_name: str, + application_security_group_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "applicationSecurityGroupName": _SERIALIZER.url("application_security_group_name", application_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_application_security_groups_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_application_security_groups_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_available_delegations_list_request( + location: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_available_resource_group_delegations_list_request( + location: str, + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_available_service_aliases_list_request( + location: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_available_service_aliases_list_by_resource_group_request( + resource_group_name: str, + location: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_azure_firewalls_delete_request_initial( + resource_group_name: str, + azure_firewall_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "azureFirewallName": _SERIALIZER.url("azure_firewall_name", azure_firewall_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_azure_firewalls_get_request( + resource_group_name: str, + azure_firewall_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "azureFirewallName": _SERIALIZER.url("azure_firewall_name", azure_firewall_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_azure_firewalls_create_or_update_request_initial( + resource_group_name: str, + azure_firewall_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "azureFirewallName": _SERIALIZER.url("azure_firewall_name", azure_firewall_name, 'str', max_length=56, min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_azure_firewalls_update_tags_request_initial( + resource_group_name: str, + azure_firewall_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "azureFirewallName": _SERIALIZER.url("azure_firewall_name", azure_firewall_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_azure_firewalls_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_azure_firewalls_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_azure_firewall_fqdn_tags_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_web_categories_get_request( + name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}") # pylint: disable=line-too-long + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_web_categories_list_by_subscription_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_bastion_hosts_delete_request_initial( + resource_group_name: str, + bastion_host_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_bastion_hosts_get_request( + resource_group_name: str, + bastion_host_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_bastion_hosts_create_or_update_request_initial( + resource_group_name: str, + bastion_host_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_bastion_hosts_update_tags_request_initial( + subscription_id: str, + resource_group_name: str, + bastion_host_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_bastion_hosts_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_bastion_hosts_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_put_bastion_shareable_link_request_initial( + resource_group_name: str, + bastion_host_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_bastion_shareable_link_request_initial( + resource_group_name: str, + bastion_host_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_get_bastion_shareable_link_request( + resource_group_name: str, + bastion_host_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_get_active_sessions_request_initial( + resource_group_name: str, + bastion_host_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_disconnect_active_sessions_request( + resource_group_name: str, + bastion_host_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "bastionHostName": _SERIALIZER.url("bastion_host_name", bastion_host_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_check_dns_name_availability_request( + location: str, + subscription_id: str, + *, + domain_name_label: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['domainNameLabel'] = _SERIALIZER.query("domain_name_label", domain_name_label, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_supported_security_providers_request( + subscription_id: str, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualWANName": _SERIALIZER.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_generatevirtualwanvpnserverconfigurationvpnprofile_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_wan_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualWANName": _SERIALIZER.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_interfaces_list_cloud_service_role_instance_network_interfaces_request( + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "cloudServiceName": _SERIALIZER.url("cloud_service_name", cloud_service_name, 'str'), + "roleInstanceName": _SERIALIZER.url("role_instance_name", role_instance_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_list_cloud_service_network_interfaces_request( + resource_group_name: str, + cloud_service_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "cloudServiceName": _SERIALIZER.url("cloud_service_name", cloud_service_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_get_cloud_service_network_interface_request( + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "cloudServiceName": _SERIALIZER.url("cloud_service_name", cloud_service_name, 'str'), + "roleInstanceName": _SERIALIZER.url("role_instance_name", role_instance_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_delete_request_initial( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_get_request( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_create_or_update_request_initial( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_interfaces_update_tags_request( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_interfaces_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_get_effective_route_table_request_initial( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_list_effective_network_security_groups_request_initial( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_list_virtual_machine_scale_set_vm_network_interfaces_request( + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineScaleSetName": _SERIALIZER.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + "virtualmachineIndex": _SERIALIZER.url("virtualmachine_index", virtualmachine_index, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_list_virtual_machine_scale_set_network_interfaces_request( + resource_group_name: str, + virtual_machine_scale_set_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineScaleSetName": _SERIALIZER.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_get_virtual_machine_scale_set_network_interface_request( + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineScaleSetName": _SERIALIZER.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + "virtualmachineIndex": _SERIALIZER.url("virtualmachine_index", virtualmachine_index, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_list_virtual_machine_scale_set_ip_configurations_request( + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineScaleSetName": _SERIALIZER.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + "virtualmachineIndex": _SERIALIZER.url("virtualmachine_index", virtualmachine_index, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interfaces_get_virtual_machine_scale_set_ip_configuration_request( + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineScaleSetName": _SERIALIZER.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + "virtualmachineIndex": _SERIALIZER.url("virtualmachine_index", virtualmachine_index, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "ipConfigurationName": _SERIALIZER.url("ip_configuration_name", ip_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_list_cloud_service_public_ip_addresses_request( + resource_group_name: str, + cloud_service_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "cloudServiceName": _SERIALIZER.url("cloud_service_name", cloud_service_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_list_cloud_service_role_instance_public_ip_addresses_request( + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + ip_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "cloudServiceName": _SERIALIZER.url("cloud_service_name", cloud_service_name, 'str'), + "roleInstanceName": _SERIALIZER.url("role_instance_name", role_instance_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "ipConfigurationName": _SERIALIZER.url("ip_configuration_name", ip_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_get_cloud_service_public_ip_address_request( + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + ip_configuration_name: str, + public_ip_address_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "cloudServiceName": _SERIALIZER.url("cloud_service_name", cloud_service_name, 'str'), + "roleInstanceName": _SERIALIZER.url("role_instance_name", role_instance_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "ipConfigurationName": _SERIALIZER.url("ip_configuration_name", ip_configuration_name, 'str'), + "publicIpAddressName": _SERIALIZER.url("public_ip_address_name", public_ip_address_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_delete_request_initial( + resource_group_name: str, + public_ip_address_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "publicIpAddressName": _SERIALIZER.url("public_ip_address_name", public_ip_address_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_get_request( + resource_group_name: str, + public_ip_address_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "publicIpAddressName": _SERIALIZER.url("public_ip_address_name", public_ip_address_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_create_or_update_request_initial( + resource_group_name: str, + public_ip_address_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "publicIpAddressName": _SERIALIZER.url("public_ip_address_name", public_ip_address_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_public_ip_addresses_update_tags_request( + resource_group_name: str, + public_ip_address_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "publicIpAddressName": _SERIALIZER.url("public_ip_address_name", public_ip_address_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_public_ip_addresses_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_list_virtual_machine_scale_set_public_ip_addresses_request( + resource_group_name: str, + virtual_machine_scale_set_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineScaleSetName": _SERIALIZER.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_list_virtual_machine_scale_set_vm_public_ip_addresses_request( + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineScaleSetName": _SERIALIZER.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + "virtualmachineIndex": _SERIALIZER.url("virtualmachine_index", virtualmachine_index, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "ipConfigurationName": _SERIALIZER.url("ip_configuration_name", ip_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_addresses_get_virtual_machine_scale_set_public_ip_address_request( + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + public_ip_address_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualMachineScaleSetName": _SERIALIZER.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), + "virtualmachineIndex": _SERIALIZER.url("virtualmachine_index", virtualmachine_index, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "ipConfigurationName": _SERIALIZER.url("ip_configuration_name", ip_configuration_name, 'str'), + "publicIpAddressName": _SERIALIZER.url("public_ip_address_name", public_ip_address_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_custom_ip_prefixes_delete_request_initial( + resource_group_name: str, + custom_ip_prefix_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "customIpPrefixName": _SERIALIZER.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_custom_ip_prefixes_get_request( + resource_group_name: str, + custom_ip_prefix_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "customIpPrefixName": _SERIALIZER.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_custom_ip_prefixes_create_or_update_request_initial( + resource_group_name: str, + custom_ip_prefix_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "customIpPrefixName": _SERIALIZER.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_custom_ip_prefixes_update_tags_request( + resource_group_name: str, + custom_ip_prefix_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "customIpPrefixName": _SERIALIZER.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_custom_ip_prefixes_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_custom_ip_prefixes_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ddos_custom_policies_delete_request_initial( + resource_group_name: str, + ddos_custom_policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ddosCustomPolicyName": _SERIALIZER.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ddos_custom_policies_get_request( + resource_group_name: str, + ddos_custom_policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ddosCustomPolicyName": _SERIALIZER.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ddos_custom_policies_create_or_update_request_initial( + resource_group_name: str, + ddos_custom_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ddosCustomPolicyName": _SERIALIZER.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ddos_custom_policies_update_tags_request( + resource_group_name: str, + ddos_custom_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ddosCustomPolicyName": _SERIALIZER.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ddos_protection_plans_delete_request_initial( + resource_group_name: str, + ddos_protection_plan_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ddosProtectionPlanName": _SERIALIZER.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ddos_protection_plans_get_request( + resource_group_name: str, + ddos_protection_plan_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ddosProtectionPlanName": _SERIALIZER.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ddos_protection_plans_create_or_update_request_initial( + resource_group_name: str, + ddos_protection_plan_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ddosProtectionPlanName": _SERIALIZER.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ddos_protection_plans_update_tags_request( + resource_group_name: str, + ddos_protection_plan_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ddosProtectionPlanName": _SERIALIZER.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ddos_protection_plans_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ddos_protection_plans_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_dscp_configuration_create_or_update_request_initial( + resource_group_name: str, + dscp_configuration_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "dscpConfigurationName": _SERIALIZER.url("dscp_configuration_name", dscp_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_dscp_configuration_delete_request_initial( + resource_group_name: str, + dscp_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "dscpConfigurationName": _SERIALIZER.url("dscp_configuration_name", dscp_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_dscp_configuration_get_request( + resource_group_name: str, + dscp_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "dscpConfigurationName": _SERIALIZER.url("dscp_configuration_name", dscp_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_dscp_configuration_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_dscp_configuration_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_available_endpoint_services_list_request( + location: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_authorizations_delete_request_initial( + resource_group_name: str, + circuit_name: str, + authorization_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "authorizationName": _SERIALIZER.url("authorization_name", authorization_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_authorizations_get_request( + resource_group_name: str, + circuit_name: str, + authorization_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "authorizationName": _SERIALIZER.url("authorization_name", authorization_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_authorizations_create_or_update_request_initial( + resource_group_name: str, + circuit_name: str, + authorization_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "authorizationName": _SERIALIZER.url("authorization_name", authorization_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_circuit_authorizations_list_request( + resource_group_name: str, + circuit_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_peerings_delete_request_initial( + resource_group_name: str, + circuit_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_peerings_get_request( + resource_group_name: str, + circuit_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_peerings_create_or_update_request_initial( + resource_group_name: str, + circuit_name: str, + peering_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_circuit_peerings_list_request( + resource_group_name: str, + circuit_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_connections_delete_request_initial( + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_connections_get_request( + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuit_connections_create_or_update_request_initial( + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_circuit_connections_list_request( + resource_group_name: str, + circuit_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_peer_express_route_circuit_connections_get_request( + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_peer_express_route_circuit_connections_list_request( + resource_group_name: str, + circuit_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_delete_request_initial( + resource_group_name: str, + circuit_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_get_request( + resource_group_name: str, + circuit_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_create_or_update_request_initial( + resource_group_name: str, + circuit_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_circuits_update_tags_request( + resource_group_name: str, + circuit_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_circuits_list_arp_table_request_initial( + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "devicePath": _SERIALIZER.url("device_path", device_path, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_list_routes_table_request_initial( + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "devicePath": _SERIALIZER.url("device_path", device_path, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_list_routes_table_summary_request_initial( + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "devicePath": _SERIALIZER.url("device_path", device_path, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_get_stats_request( + resource_group_name: str, + circuit_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_get_peering_stats_request( + resource_group_name: str, + circuit_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "circuitName": _SERIALIZER.url("circuit_name", circuit_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_circuits_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_service_providers_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connections_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connections_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connections_get_request( + resource_group_name: str, + cross_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connections_create_or_update_request_initial( + resource_group_name: str, + cross_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_cross_connections_update_tags_request( + resource_group_name: str, + cross_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_cross_connections_list_arp_table_request_initial( + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "devicePath": _SERIALIZER.url("device_path", device_path, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connections_list_routes_table_summary_request_initial( + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "devicePath": _SERIALIZER.url("device_path", device_path, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connections_list_routes_table_request_initial( + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "devicePath": _SERIALIZER.url("device_path", device_path, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connection_peerings_list_request( + resource_group_name: str, + cross_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connection_peerings_delete_request_initial( + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connection_peerings_get_request( + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_cross_connection_peerings_create_or_update_request_initial( + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "crossConnectionName": _SERIALIZER.url("cross_connection_name", cross_connection_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_ports_locations_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_ports_locations_get_request( + subscription_id: str, + location_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "locationName": _SERIALIZER.url("location_name", location_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_ports_delete_request_initial( + subscription_id: str, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_ports_get_request( + subscription_id: str, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_ports_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + express_route_port_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_ports_update_tags_request( + subscription_id: str, + resource_group_name: str, + express_route_port_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_ports_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_ports_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_ports_generate_loa_request( + subscription_id: str, + resource_group_name: str, + express_route_port_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/generateLoa") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_links_get_request( + subscription_id: str, + resource_group_name: str, + express_route_port_name: str, + link_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + "linkName": _SERIALIZER.url("link_name", link_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_links_list_request( + subscription_id: str, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_port_authorizations_delete_request_initial( + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + "authorizationName": _SERIALIZER.url("authorization_name", authorization_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_port_authorizations_get_request( + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + "authorizationName": _SERIALIZER.url("authorization_name", authorization_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_port_authorizations_create_or_update_request_initial( + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + "authorizationName": _SERIALIZER.url("authorization_name", authorization_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_port_authorizations_list_request( + resource_group_name: str, + express_route_port_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRoutePortName": _SERIALIZER.url("express_route_port_name", express_route_port_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policies_delete_request_initial( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policies_get_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policies_create_or_update_request_initial( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_firewall_policies_update_tags_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_firewall_policies_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policies_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policy_rule_collection_groups_delete_request_initial( + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "ruleCollectionGroupName": _SERIALIZER.url("rule_collection_group_name", rule_collection_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policy_rule_collection_groups_get_request( + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "ruleCollectionGroupName": _SERIALIZER.url("rule_collection_group_name", rule_collection_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policy_rule_collection_groups_create_or_update_request_initial( + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "ruleCollectionGroupName": _SERIALIZER.url("rule_collection_group_name", rule_collection_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_firewall_policy_rule_collection_groups_list_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policy_idps_signatures_list_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_firewall_policy_idps_signatures_overrides_patch_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_firewall_policy_idps_signatures_overrides_put_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_firewall_policy_idps_signatures_overrides_get_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policy_idps_signatures_overrides_list_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_firewall_policy_idps_signatures_filter_values_list_request( + resource_group_name: str, + firewall_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "firewallPolicyName": _SERIALIZER.url("firewall_policy_name", firewall_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ip_allocations_delete_request_initial( + resource_group_name: str, + ip_allocation_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ipAllocationName": _SERIALIZER.url("ip_allocation_name", ip_allocation_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ip_allocations_get_request( + resource_group_name: str, + ip_allocation_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ipAllocationName": _SERIALIZER.url("ip_allocation_name", ip_allocation_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ip_allocations_create_or_update_request_initial( + resource_group_name: str, + ip_allocation_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ipAllocationName": _SERIALIZER.url("ip_allocation_name", ip_allocation_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ip_allocations_update_tags_request( + resource_group_name: str, + ip_allocation_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ipAllocationName": _SERIALIZER.url("ip_allocation_name", ip_allocation_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ip_allocations_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ip_allocations_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ip_groups_get_request( + resource_group_name: str, + ip_groups_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ipGroupsName": _SERIALIZER.url("ip_groups_name", ip_groups_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ip_groups_create_or_update_request_initial( + resource_group_name: str, + ip_groups_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ipGroupsName": _SERIALIZER.url("ip_groups_name", ip_groups_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ip_groups_update_groups_request( + resource_group_name: str, + ip_groups_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ipGroupsName": _SERIALIZER.url("ip_groups_name", ip_groups_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_ip_groups_delete_request_initial( + resource_group_name: str, + ip_groups_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "ipGroupsName": _SERIALIZER.url("ip_groups_name", ip_groups_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ip_groups_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_ip_groups_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancers_delete_request_initial( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancers_get_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancers_create_or_update_request_initial( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_load_balancers_update_tags_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_load_balancers_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancers_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancers_swap_public_ip_addresses_request_initial( + location: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_load_balancers_list_inbound_nat_rule_port_mappings_request_initial( + group_name: str, + load_balancer_name: str, + backend_pool_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping") # pylint: disable=line-too-long + path_format_arguments = { + "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "backendPoolName": _SERIALIZER.url("backend_pool_name", backend_pool_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_load_balancer_backend_address_pools_list_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_backend_address_pools_get_request( + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "backendAddressPoolName": _SERIALIZER.url("backend_address_pool_name", backend_address_pool_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_backend_address_pools_create_or_update_request_initial( + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "backendAddressPoolName": _SERIALIZER.url("backend_address_pool_name", backend_address_pool_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_load_balancer_backend_address_pools_delete_request_initial( + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "backendAddressPoolName": _SERIALIZER.url("backend_address_pool_name", backend_address_pool_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_frontend_ip_configurations_list_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_frontend_ip_configurations_get_request( + resource_group_name: str, + load_balancer_name: str, + frontend_ip_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "frontendIPConfigurationName": _SERIALIZER.url("frontend_ip_configuration_name", frontend_ip_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_inbound_nat_rules_list_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_inbound_nat_rules_delete_request_initial( + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "inboundNatRuleName": _SERIALIZER.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_inbound_nat_rules_get_request( + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "inboundNatRuleName": _SERIALIZER.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_inbound_nat_rules_create_or_update_request_initial( + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "inboundNatRuleName": _SERIALIZER.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_load_balancer_load_balancing_rules_list_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_load_balancing_rules_get_request( + resource_group_name: str, + load_balancer_name: str, + load_balancing_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "loadBalancingRuleName": _SERIALIZER.url("load_balancing_rule_name", load_balancing_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_outbound_rules_list_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_outbound_rules_get_request( + resource_group_name: str, + load_balancer_name: str, + outbound_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "outboundRuleName": _SERIALIZER.url("outbound_rule_name", outbound_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_network_interfaces_list_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_probes_list_request( + resource_group_name: str, + load_balancer_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_load_balancer_probes_get_request( + resource_group_name: str, + load_balancer_name: str, + probe_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, 'str'), + "probeName": _SERIALIZER.url("probe_name", probe_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_nat_gateways_delete_request_initial( + resource_group_name: str, + nat_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "natGatewayName": _SERIALIZER.url("nat_gateway_name", nat_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_nat_gateways_get_request( + resource_group_name: str, + nat_gateway_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "natGatewayName": _SERIALIZER.url("nat_gateway_name", nat_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_nat_gateways_create_or_update_request_initial( + resource_group_name: str, + nat_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "natGatewayName": _SERIALIZER.url("nat_gateway_name", nat_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_nat_gateways_update_tags_request( + resource_group_name: str, + nat_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "natGatewayName": _SERIALIZER.url("nat_gateway_name", nat_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_nat_gateways_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_nat_gateways_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interface_ip_configurations_list_request( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interface_ip_configurations_get_request( + resource_group_name: str, + network_interface_name: str, + ip_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "ipConfigurationName": _SERIALIZER.url("ip_configuration_name", ip_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interface_load_balancers_list_request( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interface_tap_configurations_delete_request_initial( + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "tapConfigurationName": _SERIALIZER.url("tap_configuration_name", tap_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interface_tap_configurations_get_request( + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "tapConfigurationName": _SERIALIZER.url("tap_configuration_name", tap_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_interface_tap_configurations_create_or_update_request_initial( + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "tapConfigurationName": _SERIALIZER.url("tap_configuration_name", tap_configuration_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_interface_tap_configurations_list_request( + resource_group_name: str, + network_interface_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkInterfaceName": _SERIALIZER.url("network_interface_name", network_interface_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_profiles_delete_request_initial( + resource_group_name: str, + network_profile_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkProfileName": _SERIALIZER.url("network_profile_name", network_profile_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_profiles_get_request( + resource_group_name: str, + network_profile_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkProfileName": _SERIALIZER.url("network_profile_name", network_profile_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_profiles_create_or_update_request( + resource_group_name: str, + network_profile_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkProfileName": _SERIALIZER.url("network_profile_name", network_profile_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_profiles_update_tags_request( + resource_group_name: str, + network_profile_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkProfileName": _SERIALIZER.url("network_profile_name", network_profile_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_profiles_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_profiles_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_security_groups_delete_request_initial( + resource_group_name: str, + network_security_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_security_groups_get_request( + resource_group_name: str, + network_security_group_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_security_groups_create_or_update_request_initial( + resource_group_name: str, + network_security_group_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_security_groups_update_tags_request( + resource_group_name: str, + network_security_group_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_security_groups_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_security_groups_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_security_rules_delete_request_initial( + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "securityRuleName": _SERIALIZER.url("security_rule_name", security_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_security_rules_get_request( + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "securityRuleName": _SERIALIZER.url("security_rule_name", security_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_security_rules_create_or_update_request_initial( + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "securityRuleName": _SERIALIZER.url("security_rule_name", security_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_security_rules_list_request( + resource_group_name: str, + network_security_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_default_security_rules_list_request( + resource_group_name: str, + network_security_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_default_security_rules_get_request( + resource_group_name: str, + network_security_group_name: str, + default_security_rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkSecurityGroupName": _SERIALIZER.url("network_security_group_name", network_security_group_name, 'str'), + "defaultSecurityRuleName": _SERIALIZER.url("default_security_rule_name", default_security_rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_virtual_appliances_delete_request_initial( + resource_group_name: str, + network_virtual_appliance_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_virtual_appliances_get_request( + resource_group_name: str, + network_virtual_appliance_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_virtual_appliances_update_tags_request( + subscription_id: str, + resource_group_name: str, + network_virtual_appliance_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_virtual_appliances_create_or_update_request_initial( + resource_group_name: str, + network_virtual_appliance_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_virtual_appliances_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_virtual_appliances_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_appliance_sites_delete_request_initial( + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + "siteName": _SERIALIZER.url("site_name", site_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_appliance_sites_get_request( + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + "siteName": _SERIALIZER.url("site_name", site_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_appliance_sites_create_or_update_request_initial( + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + "siteName": _SERIALIZER.url("site_name", site_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_appliance_sites_list_request( + resource_group_name: str, + network_virtual_appliance_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_appliance_skus_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_appliance_skus_get_request( + subscription_id: str, + sku_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "skuName": _SERIALIZER.url("sku_name", sku_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_inbound_security_rule_create_or_update_request_initial( + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkVirtualApplianceName": _SERIALIZER.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + "ruleCollectionName": _SERIALIZER.url("rule_collection_name", rule_collection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_create_or_update_request( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_get_request( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_watchers_delete_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_watchers_update_tags_request( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_watchers_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_network_watchers_get_topology_request( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_verify_ip_flow_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_get_next_hop_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_get_vm_security_rules_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_get_troubleshooting_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_get_troubleshooting_result_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_set_flow_log_configuration_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_get_flow_log_status_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_check_connectivity_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_get_azure_reachability_report_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_list_available_providers_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_network_watchers_get_network_configuration_diagnostic_request_initial( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_packet_captures_create_request_initial( + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "packetCaptureName": _SERIALIZER.url("packet_capture_name", packet_capture_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_packet_captures_get_request( + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "packetCaptureName": _SERIALIZER.url("packet_capture_name", packet_capture_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_packet_captures_delete_request_initial( + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "packetCaptureName": _SERIALIZER.url("packet_capture_name", packet_capture_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_packet_captures_stop_request_initial( + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "packetCaptureName": _SERIALIZER.url("packet_capture_name", packet_capture_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_packet_captures_get_status_request_initial( + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "packetCaptureName": _SERIALIZER.url("packet_capture_name", packet_capture_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_packet_captures_list_request( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_connection_monitors_create_or_update_request_initial( + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + migrate: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "connectionMonitorName": _SERIALIZER.url("connection_monitor_name", connection_monitor_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if migrate is not None: + _query_parameters['migrate'] = _SERIALIZER.query("migrate", migrate, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_connection_monitors_get_request( + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "connectionMonitorName": _SERIALIZER.url("connection_monitor_name", connection_monitor_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_connection_monitors_delete_request_initial( + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "connectionMonitorName": _SERIALIZER.url("connection_monitor_name", connection_monitor_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_connection_monitors_update_tags_request( + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "connectionMonitorName": _SERIALIZER.url("connection_monitor_name", connection_monitor_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_connection_monitors_stop_request_initial( + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "connectionMonitorName": _SERIALIZER.url("connection_monitor_name", connection_monitor_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_connection_monitors_start_request_initial( + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "connectionMonitorName": _SERIALIZER.url("connection_monitor_name", connection_monitor_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_connection_monitors_query_request_initial( + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "connectionMonitorName": _SERIALIZER.url("connection_monitor_name", connection_monitor_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_connection_monitors_list_request( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_flow_logs_create_or_update_request_initial( + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "flowLogName": _SERIALIZER.url("flow_log_name", flow_log_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_flow_logs_update_tags_request( + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "flowLogName": _SERIALIZER.url("flow_log_name", flow_log_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_flow_logs_get_request( + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "flowLogName": _SERIALIZER.url("flow_log_name", flow_log_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_flow_logs_delete_request_initial( + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "flowLogName": _SERIALIZER.url("flow_log_name", flow_log_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_flow_logs_list_request( + resource_group_name: str, + network_watcher_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "networkWatcherName": _SERIALIZER.url("network_watcher_name", network_watcher_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_operations_list_request( + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Network/operations") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_endpoints_delete_request_initial( + resource_group_name: str, + private_endpoint_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "privateEndpointName": _SERIALIZER.url("private_endpoint_name", private_endpoint_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_endpoints_get_request( + resource_group_name: str, + private_endpoint_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "privateEndpointName": _SERIALIZER.url("private_endpoint_name", private_endpoint_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_endpoints_create_or_update_request_initial( + resource_group_name: str, + private_endpoint_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "privateEndpointName": _SERIALIZER.url("private_endpoint_name", private_endpoint_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_private_endpoints_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_endpoints_list_by_subscription_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_available_private_endpoint_types_list_request( + location: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_available_private_endpoint_types_list_by_resource_group_request( + location: str, + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_dns_zone_groups_delete_request_initial( + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "privateEndpointName": _SERIALIZER.url("private_endpoint_name", private_endpoint_name, 'str'), + "privateDnsZoneGroupName": _SERIALIZER.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_dns_zone_groups_get_request( + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "privateEndpointName": _SERIALIZER.url("private_endpoint_name", private_endpoint_name, 'str'), + "privateDnsZoneGroupName": _SERIALIZER.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_dns_zone_groups_create_or_update_request_initial( + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "privateEndpointName": _SERIALIZER.url("private_endpoint_name", private_endpoint_name, 'str'), + "privateDnsZoneGroupName": _SERIALIZER.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_private_dns_zone_groups_list_request( + private_endpoint_name: str, + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups") # pylint: disable=line-too-long + path_format_arguments = { + "privateEndpointName": _SERIALIZER.url("private_endpoint_name", private_endpoint_name, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_delete_request_initial( + resource_group_name: str, + service_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceName": _SERIALIZER.url("service_name", service_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_get_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceName": _SERIALIZER.url("service_name", service_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_create_or_update_request_initial( + resource_group_name: str, + service_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceName": _SERIALIZER.url("service_name", service_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_private_link_services_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_list_by_subscription_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_get_private_endpoint_connection_request( + resource_group_name: str, + service_name: str, + pe_connection_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceName": _SERIALIZER.url("service_name", service_name, 'str'), + "peConnectionName": _SERIALIZER.url("pe_connection_name", pe_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_update_private_endpoint_connection_request( + resource_group_name: str, + service_name: str, + pe_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceName": _SERIALIZER.url("service_name", service_name, 'str'), + "peConnectionName": _SERIALIZER.url("pe_connection_name", pe_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_private_link_services_delete_private_endpoint_connection_request_initial( + resource_group_name: str, + service_name: str, + pe_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceName": _SERIALIZER.url("service_name", service_name, 'str'), + "peConnectionName": _SERIALIZER.url("pe_connection_name", pe_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_list_private_endpoint_connections_request( + resource_group_name: str, + service_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceName": _SERIALIZER.url("service_name", service_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_check_private_link_service_visibility_request_initial( + location: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_private_link_services_check_private_link_service_visibility_by_resource_group_request_initial( + location: str, + resource_group_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_private_link_services_list_auto_approved_private_link_services_request( + location: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_private_link_services_list_auto_approved_private_link_services_by_resource_group_request( + location: str, + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_prefixes_delete_request_initial( + resource_group_name: str, + public_ip_prefix_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "publicIpPrefixName": _SERIALIZER.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_prefixes_get_request( + resource_group_name: str, + public_ip_prefix_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "publicIpPrefixName": _SERIALIZER.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_prefixes_create_or_update_request_initial( + resource_group_name: str, + public_ip_prefix_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "publicIpPrefixName": _SERIALIZER.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_public_ip_prefixes_update_tags_request( + resource_group_name: str, + public_ip_prefix_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "publicIpPrefixName": _SERIALIZER.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_public_ip_prefixes_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_public_ip_prefixes_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_filters_delete_request_initial( + resource_group_name: str, + route_filter_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeFilterName": _SERIALIZER.url("route_filter_name", route_filter_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_filters_get_request( + resource_group_name: str, + route_filter_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeFilterName": _SERIALIZER.url("route_filter_name", route_filter_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_filters_create_or_update_request_initial( + resource_group_name: str, + route_filter_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeFilterName": _SERIALIZER.url("route_filter_name", route_filter_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_route_filters_update_tags_request( + resource_group_name: str, + route_filter_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeFilterName": _SERIALIZER.url("route_filter_name", route_filter_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_route_filters_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_filters_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_filter_rules_delete_request_initial( + resource_group_name: str, + route_filter_name: str, + rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeFilterName": _SERIALIZER.url("route_filter_name", route_filter_name, 'str'), + "ruleName": _SERIALIZER.url("rule_name", rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_filter_rules_get_request( + resource_group_name: str, + route_filter_name: str, + rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeFilterName": _SERIALIZER.url("route_filter_name", route_filter_name, 'str'), + "ruleName": _SERIALIZER.url("rule_name", rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_filter_rules_create_or_update_request_initial( + resource_group_name: str, + route_filter_name: str, + rule_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeFilterName": _SERIALIZER.url("route_filter_name", route_filter_name, 'str'), + "ruleName": _SERIALIZER.url("rule_name", rule_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_route_filter_rules_list_by_route_filter_request( + resource_group_name: str, + route_filter_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeFilterName": _SERIALIZER.url("route_filter_name", route_filter_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_tables_delete_request_initial( + resource_group_name: str, + route_table_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_tables_get_request( + resource_group_name: str, + route_table_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_tables_create_or_update_request_initial( + resource_group_name: str, + route_table_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_route_tables_update_tags_request( + resource_group_name: str, + route_table_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_route_tables_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_route_tables_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_routes_delete_request_initial( + resource_group_name: str, + route_table_name: str, + route_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + "routeName": _SERIALIZER.url("route_name", route_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_routes_get_request( + resource_group_name: str, + route_table_name: str, + route_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + "routeName": _SERIALIZER.url("route_name", route_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_routes_create_or_update_request_initial( + resource_group_name: str, + route_table_name: str, + route_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + "routeName": _SERIALIZER.url("route_name", route_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_routes_list_request( + resource_group_name: str, + route_table_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_security_partner_providers_delete_request_initial( + resource_group_name: str, + security_partner_provider_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "securityPartnerProviderName": _SERIALIZER.url("security_partner_provider_name", security_partner_provider_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_security_partner_providers_get_request( + resource_group_name: str, + security_partner_provider_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "securityPartnerProviderName": _SERIALIZER.url("security_partner_provider_name", security_partner_provider_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_security_partner_providers_create_or_update_request_initial( + resource_group_name: str, + security_partner_provider_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "securityPartnerProviderName": _SERIALIZER.url("security_partner_provider_name", security_partner_provider_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_security_partner_providers_update_tags_request( + resource_group_name: str, + security_partner_provider_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "securityPartnerProviderName": _SERIALIZER.url("security_partner_provider_name", security_partner_provider_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_security_partner_providers_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_security_partner_providers_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_bgp_service_communities_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_endpoint_policies_delete_request_initial( + resource_group_name: str, + service_endpoint_policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceEndpointPolicyName": _SERIALIZER.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_endpoint_policies_get_request( + resource_group_name: str, + service_endpoint_policy_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceEndpointPolicyName": _SERIALIZER.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_endpoint_policies_create_or_update_request_initial( + resource_group_name: str, + service_endpoint_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceEndpointPolicyName": _SERIALIZER.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_service_endpoint_policies_update_tags_request( + resource_group_name: str, + service_endpoint_policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceEndpointPolicyName": _SERIALIZER.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_service_endpoint_policies_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_endpoint_policies_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_endpoint_policy_definitions_delete_request_initial( + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceEndpointPolicyName": _SERIALIZER.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + "serviceEndpointPolicyDefinitionName": _SERIALIZER.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_endpoint_policy_definitions_get_request( + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceEndpointPolicyName": _SERIALIZER.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + "serviceEndpointPolicyDefinitionName": _SERIALIZER.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_endpoint_policy_definitions_create_or_update_request_initial( + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceEndpointPolicyName": _SERIALIZER.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + "serviceEndpointPolicyDefinitionName": _SERIALIZER.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_service_endpoint_policy_definitions_list_by_resource_group_request( + resource_group_name: str, + service_endpoint_policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "serviceEndpointPolicyName": _SERIALIZER.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_tags_list_request( + location: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_tag_information_list_request( + location: str, + subscription_id: str, + *, + no_address_prefixes: Optional[bool] = None, + tag_name: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if no_address_prefixes is not None: + _query_parameters['noAddressPrefixes'] = _SERIALIZER.query("no_address_prefixes", no_address_prefixes, 'bool') + if tag_name is not None: + _query_parameters['tagName'] = _SERIALIZER.query("tag_name", tag_name, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_usages_list_request( + location: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages") # pylint: disable=line-too-long + path_format_arguments = { + "location": _SERIALIZER.url("location", location, 'str', pattern=r'^[-\w\._ ]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_networks_delete_request_initial( + resource_group_name: str, + virtual_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_networks_get_request( + resource_group_name: str, + virtual_network_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_networks_create_or_update_request_initial( + resource_group_name: str, + virtual_network_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_networks_update_tags_request( + resource_group_name: str, + virtual_network_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_networks_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_networks_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_networks_check_ip_address_availability_request( + resource_group_name: str, + virtual_network_name: str, + subscription_id: str, + *, + ip_address: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['ipAddress'] = _SERIALIZER.query("ip_address", ip_address, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_networks_list_usage_request( + resource_group_name: str, + virtual_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_subnets_delete_request_initial( + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subnetName": _SERIALIZER.url("subnet_name", subnet_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_subnets_get_request( + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subnetName": _SERIALIZER.url("subnet_name", subnet_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_subnets_create_or_update_request_initial( + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subnetName": _SERIALIZER.url("subnet_name", subnet_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_subnets_prepare_network_policies_request_initial( + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subnetName": _SERIALIZER.url("subnet_name", subnet_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_subnets_unprepare_network_policies_request_initial( + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subnetName": _SERIALIZER.url("subnet_name", subnet_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_subnets_list_request( + resource_group_name: str, + virtual_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_resource_navigation_links_list_request( + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subnetName": _SERIALIZER.url("subnet_name", subnet_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_service_association_links_list_request( + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subnetName": _SERIALIZER.url("subnet_name", subnet_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_peerings_delete_request_initial( + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "virtualNetworkPeeringName": _SERIALIZER.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_peerings_get_request( + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "virtualNetworkPeeringName": _SERIALIZER.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_peerings_create_or_update_request_initial( + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + sync_remote_address_space: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "virtualNetworkPeeringName": _SERIALIZER.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if sync_remote_address_space is not None: + _query_parameters['syncRemoteAddressSpace'] = _SERIALIZER.query("sync_remote_address_space", sync_remote_address_space, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_peerings_list_request( + resource_group_name: str, + virtual_network_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_create_or_update_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateways_get_request( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_delete_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_update_tags_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateways_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_list_connections_request( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_reset_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + gateway_vip: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if gateway_vip is not None: + _query_parameters['gatewayVip'] = _SERIALIZER.query("gateway_vip", gateway_vip, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_reset_vpn_client_shared_key_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_generatevpnclientpackage_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateways_generate_vpn_profile_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateways_get_vpn_profile_package_url_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_get_bgp_peer_status_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + peer: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if peer is not None: + _query_parameters['peer'] = _SERIALIZER.query("peer", peer, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_supported_vpn_devices_request( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_get_learned_routes_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_get_advertised_routes_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + peer: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['peer'] = _SERIALIZER.query("peer", peer, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_set_vpnclient_ipsec_parameters_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateways_get_vpnclient_ipsec_parameters_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_vpn_device_configuration_script_request( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateways_start_packet_capture_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateways_stop_packet_capture_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateways_get_vpnclient_connection_health_request_initial( + resource_group_name: str, + virtual_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateways_disconnect_virtual_network_gateway_vpn_connections_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_network_gateway_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateway_connections_create_or_update_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateway_connections_get_request( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateway_connections_delete_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateway_connections_update_tags_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateway_connections_set_shared_key_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateway_connections_get_shared_key_request( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateway_connections_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateway_connections_reset_shared_key_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateway_connections_start_packet_capture_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateway_connections_stop_packet_capture_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateway_connections_get_ike_sas_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateway_connections_reset_connection_request_initial( + resource_group_name: str, + virtual_network_gateway_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayConnectionName": _SERIALIZER.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_local_network_gateways_create_or_update_request_initial( + resource_group_name: str, + local_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "localNetworkGatewayName": _SERIALIZER.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_local_network_gateways_get_request( + resource_group_name: str, + local_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "localNetworkGatewayName": _SERIALIZER.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_local_network_gateways_delete_request_initial( + resource_group_name: str, + local_network_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "localNetworkGatewayName": _SERIALIZER.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_local_network_gateways_update_tags_request( + resource_group_name: str, + local_network_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "localNetworkGatewayName": _SERIALIZER.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_local_network_gateways_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateway_nat_rules_get_request( + subscription_id: str, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "natRuleName": _SERIALIZER.url("nat_rule_name", nat_rule_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateway_nat_rules_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "natRuleName": _SERIALIZER.url("nat_rule_name", nat_rule_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_gateway_nat_rules_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + "natRuleName": _SERIALIZER.url("nat_rule_name", nat_rule_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway_request( + subscription_id: str, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualNetworkGatewayName": _SERIALIZER.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_taps_delete_request_initial( + resource_group_name: str, + tap_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "tapName": _SERIALIZER.url("tap_name", tap_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_taps_get_request( + resource_group_name: str, + tap_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "tapName": _SERIALIZER.url("tap_name", tap_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_taps_create_or_update_request_initial( + resource_group_name: str, + tap_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "tapName": _SERIALIZER.url("tap_name", tap_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_taps_update_tags_request( + resource_group_name: str, + tap_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "tapName": _SERIALIZER.url("tap_name", tap_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_network_taps_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_network_taps_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_routers_delete_request_initial( + resource_group_name: str, + virtual_router_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualRouterName": _SERIALIZER.url("virtual_router_name", virtual_router_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_routers_get_request( + resource_group_name: str, + virtual_router_name: str, + subscription_id: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualRouterName": _SERIALIZER.url("virtual_router_name", virtual_router_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if expand is not None: + _query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_routers_create_or_update_request_initial( + resource_group_name: str, + virtual_router_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualRouterName": _SERIALIZER.url("virtual_router_name", virtual_router_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_routers_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_routers_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_router_peerings_delete_request_initial( + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualRouterName": _SERIALIZER.url("virtual_router_name", virtual_router_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_router_peerings_get_request( + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualRouterName": _SERIALIZER.url("virtual_router_name", virtual_router_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_router_peerings_create_or_update_request_initial( + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualRouterName": _SERIALIZER.url("virtual_router_name", virtual_router_name, 'str'), + "peeringName": _SERIALIZER.url("peering_name", peering_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_router_peerings_list_request( + resource_group_name: str, + virtual_router_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualRouterName": _SERIALIZER.url("virtual_router_name", virtual_router_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_wans_get_request( + resource_group_name: str, + virtual_wan_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "VirtualWANName": _SERIALIZER.url("virtual_wan_name", virtual_wan_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_wans_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_wan_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "VirtualWANName": _SERIALIZER.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_wans_update_tags_request( + subscription_id: str, + resource_group_name: str, + virtual_wan_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "VirtualWANName": _SERIALIZER.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_wans_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "VirtualWANName": _SERIALIZER.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_wans_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_wans_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_sites_get_request( + subscription_id: str, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnSiteName": _SERIALIZER.url("vpn_site_name", vpn_site_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_sites_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + vpn_site_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnSiteName": _SERIALIZER.url("vpn_site_name", vpn_site_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_sites_update_tags_request( + subscription_id: str, + resource_group_name: str, + vpn_site_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnSiteName": _SERIALIZER.url("vpn_site_name", vpn_site_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_sites_delete_request_initial( + subscription_id: str, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnSiteName": _SERIALIZER.url("vpn_site_name", vpn_site_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_sites_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_sites_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_site_links_get_request( + subscription_id: str, + resource_group_name: str, + vpn_site_name: str, + vpn_site_link_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnSiteName": _SERIALIZER.url("vpn_site_name", vpn_site_name, 'str'), + "vpnSiteLinkName": _SERIALIZER.url("vpn_site_link_name", vpn_site_link_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_site_links_list_by_vpn_site_request( + subscription_id: str, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnSiteName": _SERIALIZER.url("vpn_site_name", vpn_site_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_sites_configuration_download_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_wan_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualWANName": _SERIALIZER.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_server_configurations_get_request( + subscription_id: str, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnServerConfigurationName": _SERIALIZER.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_server_configurations_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + vpn_server_configuration_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnServerConfigurationName": _SERIALIZER.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_server_configurations_update_tags_request( + subscription_id: str, + resource_group_name: str, + vpn_server_configuration_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnServerConfigurationName": _SERIALIZER.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_server_configurations_delete_request_initial( + subscription_id: str, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnServerConfigurationName": _SERIALIZER.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_server_configurations_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_server_configurations_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_configuration_policy_groups_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnServerConfigurationName": _SERIALIZER.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + "configurationPolicyGroupName": _SERIALIZER.url("configuration_policy_group_name", configuration_policy_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_configuration_policy_groups_delete_request_initial( + subscription_id: str, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnServerConfigurationName": _SERIALIZER.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + "configurationPolicyGroupName": _SERIALIZER.url("configuration_policy_group_name", configuration_policy_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_configuration_policy_groups_get_request( + subscription_id: str, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnServerConfigurationName": _SERIALIZER.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + "configurationPolicyGroupName": _SERIALIZER.url("configuration_policy_group_name", configuration_policy_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_configuration_policy_groups_list_by_vpn_server_configuration_request( + subscription_id: str, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "vpnServerConfigurationName": _SERIALIZER.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hubs_get_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hubs_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_hubs_update_tags_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_hubs_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hubs_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hubs_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hubs_get_effective_virtual_hub_routes_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_hub_virtual_network_connections_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_hub_virtual_network_connections_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_hub_virtual_network_connections_get_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_hub_virtual_network_connections_list_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_gateways_get_request( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_gateways_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_gateways_update_tags_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_gateways_delete_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_gateways_reset_request_initial( + resource_group_name: str, + gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_gateways_start_packet_capture_request_initial( + resource_group_name: str, + gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_gateways_stop_packet_capture_request_initial( + resource_group_name: str, + gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_gateways_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_gateways_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_link_connections_reset_connection_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "linkConnectionName": _SERIALIZER.url("link_connection_name", link_connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_link_connections_get_ike_sas_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "linkConnectionName": _SERIALIZER.url("link_connection_name", link_connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_link_connections_list_by_vpn_connection_request( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_connections_get_request( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_connections_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + connection_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_connections_delete_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_connections_start_packet_capture_request_initial( + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "vpnConnectionName": _SERIALIZER.url("vpn_connection_name", vpn_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_connections_stop_packet_capture_request_initial( + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "vpnConnectionName": _SERIALIZER.url("vpn_connection_name", vpn_connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_connections_list_by_vpn_gateway_request( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_vpn_site_link_connections_get_request( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "linkConnectionName": _SERIALIZER.url("link_connection_name", link_connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_nat_rules_get_request( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "natRuleName": _SERIALIZER.url("nat_rule_name", nat_rule_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_nat_rules_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "natRuleName": _SERIALIZER.url("nat_rule_name", nat_rule_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_nat_rules_delete_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "natRuleName": _SERIALIZER.url("nat_rule_name", nat_rule_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_nat_rules_list_by_vpn_gateway_request( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_p2_svpn_gateways_get_request( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_p2_svpn_gateways_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_p2_svpn_gateways_update_tags_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_p2_svpn_gateways_delete_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_p2_svpn_gateways_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_p2_svpn_gateways_list_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_p2_svpn_gateways_reset_request_initial( + resource_group_name: str, + gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_p2_svpn_gateways_generate_vpn_profile_request_initial( + resource_group_name: str, + gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_p2_svpn_gateways_get_p2_s_vpn_connection_health_request_initial( + resource_group_name: str, + gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_p2_svpn_gateways_get_p2_s_vpn_connection_health_detailed_request_initial( + subscription_id: str, + resource_group_name: str, + gateway_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "gatewayName": _SERIALIZER.url("gateway_name", gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_p2_svpn_gateways_disconnect_p2_s_vpn_connections_request_initial( + subscription_id: str, + resource_group_name: str, + p2_s_vpn_gateway_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "p2sVpnGatewayName": _SERIALIZER.url("p2_s_vpn_gateway_name", p2_s_vpn_gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_vpn_server_configurations_associated_with_virtual_wan_list_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualWANName": _SERIALIZER.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_route_table_v2_s_get_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_route_table_v2_s_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_hub_route_table_v2_s_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_route_table_v2_s_list_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_gateways_list_by_subscription_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_gateways_list_by_resource_group_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_gateways_create_or_update_request_initial( + resource_group_name: str, + express_route_gateway_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRouteGatewayName": _SERIALIZER.url("express_route_gateway_name", express_route_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_gateways_update_tags_request_initial( + subscription_id: str, + resource_group_name: str, + express_route_gateway_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRouteGatewayName": _SERIALIZER.url("express_route_gateway_name", express_route_gateway_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_gateways_get_request( + resource_group_name: str, + express_route_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRouteGatewayName": _SERIALIZER.url("express_route_gateway_name", express_route_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_gateways_delete_request_initial( + resource_group_name: str, + express_route_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRouteGatewayName": _SERIALIZER.url("express_route_gateway_name", express_route_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_connections_create_or_update_request_initial( + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRouteGatewayName": _SERIALIZER.url("express_route_gateway_name", express_route_gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_express_route_connections_get_request( + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRouteGatewayName": _SERIALIZER.url("express_route_gateway_name", express_route_gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_connections_delete_request_initial( + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRouteGatewayName": _SERIALIZER.url("express_route_gateway_name", express_route_gateway_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_express_route_connections_list_request( + resource_group_name: str, + express_route_gateway_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "expressRouteGatewayName": _SERIALIZER.url("express_route_gateway_name", express_route_gateway_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_bgp_connection_get_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_bgp_connection_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_hub_bgp_connection_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_bgp_connections_list_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_bgp_connections_list_learned_routes_request_initial( + resource_group_name: str, + hub_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "hubName": _SERIALIZER.url("hub_name", hub_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_bgp_connections_list_advertised_routes_request_initial( + resource_group_name: str, + hub_name: str, + connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "hubName": _SERIALIZER.url("hub_name", hub_name, 'str'), + "connectionName": _SERIALIZER.url("connection_name", connection_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_ip_configuration_get_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "ipConfigName": _SERIALIZER.url("ip_config_name", ip_config_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_ip_configuration_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "ipConfigName": _SERIALIZER.url("ip_config_name", ip_config_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_virtual_hub_ip_configuration_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "ipConfigName": _SERIALIZER.url("ip_config_name", ip_config_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_virtual_hub_ip_configuration_list_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_hub_route_tables_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_hub_route_tables_get_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_hub_route_tables_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routeTableName": _SERIALIZER.url("route_table_name", route_table_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_hub_route_tables_list_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_routing_intent_create_or_update_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routingIntentName": _SERIALIZER.url("routing_intent_name", routing_intent_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_routing_intent_get_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routingIntentName": _SERIALIZER.url("routing_intent_name", routing_intent_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_routing_intent_delete_request_initial( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + "routingIntentName": _SERIALIZER.url("routing_intent_name", routing_intent_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_routing_intent_list_request( + subscription_id: str, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "virtualHubName": _SERIALIZER.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_web_application_firewall_policies_list_request( + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_web_application_firewall_policies_list_all_request( + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_web_application_firewall_policies_get_request( + resource_group_name: str, + policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "policyName": _SERIALIZER.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_web_application_firewall_policies_create_or_update_request( + resource_group_name: str, + policy_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "policyName": _SERIALIZER.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_web_application_firewall_policies_delete_request_initial( + resource_group_name: str, + policy_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "policyName": _SERIALIZER.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class ApplicationGatewaysOperations(object): # pylint: disable=too-many-public-methods + """ApplicationGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_delete_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> "_models.ApplicationGateway": + """Gets the specified application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_get_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + application_gateway_name: str, + parameters: "_models.ApplicationGateway", + **kwargs: Any + ) -> "_models.ApplicationGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ApplicationGateway') + + request = build_application_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + application_gateway_name: str, + parameters: "_models.ApplicationGateway", + **kwargs: Any + ) -> LROPoller["_models.ApplicationGateway"]: + """Creates or updates the specified application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param parameters: Parameters supplied to the create or update application gateway operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ApplicationGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ApplicationGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + application_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ApplicationGateway": + """Updates the specified application gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param parameters: Parameters supplied to update application gateway tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_application_gateways_update_tags_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ApplicationGatewayListResult"]: + """Lists all application gateways in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.ApplicationGatewayListResult"]: + """Gets all the application gateways in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways"} # type: ignore + + def _start_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_start_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._start_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start"} # type: ignore + + + @distributed_trace + def begin_start( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Starts the specified application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start"} # type: ignore + + def _stop_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_stop_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop"} # type: ignore + + + @distributed_trace + def begin_stop( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Stops the specified application gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop"} # type: ignore + + def _backend_health_initial( + self, + resource_group_name: str, + application_gateway_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.ApplicationGatewayBackendHealth"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_backend_health_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self._backend_health_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _backend_health_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth"} # type: ignore + + + @distributed_trace + def begin_backend_health( + self, + resource_group_name: str, + application_gateway_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.ApplicationGatewayBackendHealth"]: + """Gets the backend health of the specified application gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ApplicationGatewayBackendHealth or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealth] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealth"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._backend_health_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + expand=expand, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_backend_health.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth"} # type: ignore + + def _backend_health_on_demand_initial( + self, + resource_group_name: str, + application_gateway_name: str, + probe_request: "_models.ApplicationGatewayOnDemandProbe", + expand: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.ApplicationGatewayBackendHealthOnDemand"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealthOnDemand"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(probe_request, 'ApplicationGatewayOnDemandProbe') + + request = build_application_gateways_backend_health_on_demand_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + expand=expand, + template_url=self._backend_health_on_demand_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _backend_health_on_demand_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand"} # type: ignore + + + @distributed_trace + def begin_backend_health_on_demand( + self, + resource_group_name: str, + application_gateway_name: str, + probe_request: "_models.ApplicationGatewayOnDemandProbe", + expand: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.ApplicationGatewayBackendHealthOnDemand"]: + """Gets the backend health for given combination of backend pool and http setting of the specified + application gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param probe_request: Request body for on-demand test probe operation. + :type probe_request: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayOnDemandProbe + :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ApplicationGatewayBackendHealthOnDemand + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayBackendHealthOnDemand] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealthOnDemand"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._backend_health_on_demand_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + probe_request=probe_request, + expand=expand, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_backend_health_on_demand.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand"} # type: ignore + + @distributed_trace + def list_available_server_variables( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available server variables. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_server_variables_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_server_variables.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_server_variables.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables"} # type: ignore + + + @distributed_trace + def list_available_request_headers( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available request headers. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_request_headers_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_request_headers.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_request_headers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders"} # type: ignore + + + @distributed_trace + def list_available_response_headers( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available response headers. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_response_headers_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_response_headers.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_response_headers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders"} # type: ignore + + + @distributed_trace + def list_available_waf_rule_sets( + self, + **kwargs: Any + ) -> "_models.ApplicationGatewayAvailableWafRuleSetsResult": + """Lists all available web application firewall rule sets. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewayAvailableWafRuleSetsResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAvailableWafRuleSetsResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableWafRuleSetsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_waf_rule_sets_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_waf_rule_sets.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewayAvailableWafRuleSetsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_waf_rule_sets.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets"} # type: ignore + + + @distributed_trace + def list_available_ssl_options( + self, + **kwargs: Any + ) -> "_models.ApplicationGatewayAvailableSslOptions": + """Lists available Ssl options for configuring Ssl policy. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewayAvailableSslOptions, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAvailableSslOptions + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslOptions"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_list_available_ssl_options_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_ssl_options.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewayAvailableSslOptions', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_available_ssl_options.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default"} # type: ignore + + + @distributed_trace + def list_available_ssl_predefined_policies( + self, + **kwargs: Any + ) -> Iterable["_models.ApplicationGatewayAvailableSslPredefinedPolicies"]: + """Lists all SSL predefined policies for configuring Ssl policy. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayAvailableSslPredefinedPolicies + or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateways_list_available_ssl_predefined_policies_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_available_ssl_predefined_policies.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateways_list_available_ssl_predefined_policies_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayAvailableSslPredefinedPolicies", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_available_ssl_predefined_policies.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies"} # type: ignore + + @distributed_trace + def get_ssl_predefined_policy( + self, + predefined_policy_name: str, + **kwargs: Any + ) -> "_models.ApplicationGatewaySslPredefinedPolicy": + """Gets Ssl predefined policy with the specified policy name. + + :param predefined_policy_name: Name of Ssl predefined policy. + :type predefined_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewaySslPredefinedPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewaySslPredefinedPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewaySslPredefinedPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateways_get_ssl_predefined_policy_request( + subscription_id=self._config.subscription_id, + predefined_policy_name=predefined_policy_name, + api_version=api_version, + template_url=self.get_ssl_predefined_policy.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewaySslPredefinedPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_ssl_predefined_policy.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}"} # type: ignore + +class ApplicationGatewayPrivateLinkResourcesOperations(object): + """ApplicationGatewayPrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> Iterable["_models.ApplicationGatewayPrivateLinkResourceListResult"]: + """Lists all private link resources on an application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayPrivateLinkResourceListResult or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateway_private_link_resources_list_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateway_private_link_resources_list_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayPrivateLinkResourceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources"} # type: ignore +class ApplicationGatewayPrivateEndpointConnectionsOperations(object): + """ApplicationGatewayPrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateway_private_endpoint_connections_delete_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + def _update_initial( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + parameters: "_models.ApplicationGatewayPrivateEndpointConnection", + **kwargs: Any + ) -> Optional["_models.ApplicationGatewayPrivateEndpointConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayPrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ApplicationGatewayPrivateEndpointConnection') + + request = build_application_gateway_private_endpoint_connections_update_request_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + parameters: "_models.ApplicationGatewayPrivateEndpointConnection", + **kwargs: Any + ) -> LROPoller["_models.ApplicationGatewayPrivateEndpointConnection"]: + """Updates the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :param parameters: Parameters supplied to update application gateway private endpoint + connection operation. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either + ApplicationGatewayPrivateEndpointConnection or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.ApplicationGatewayPrivateEndpointConnection": + """Gets the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewayPrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_gateway_private_endpoint_connections_get_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> Iterable["_models.ApplicationGatewayPrivateEndpointConnectionListResult"]: + """Lists all private endpoint connections on an application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either + ApplicationGatewayPrivateEndpointConnectionListResult or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationGatewayPrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_gateway_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_gateway_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationGatewayPrivateEndpointConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections"} # type: ignore +class ApplicationSecurityGroupsOperations(object): + """ApplicationSecurityGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_security_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_security_groups_delete_request_initial( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + application_security_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified application security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + application_security_group_name: str, + **kwargs: Any + ) -> "_models.ApplicationSecurityGroup": + """Gets information about the specified application security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_application_security_groups_get_request( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + application_security_group_name: str, + parameters: "_models.ApplicationSecurityGroup", + **kwargs: Any + ) -> "_models.ApplicationSecurityGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ApplicationSecurityGroup') + + request = build_application_security_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + application_security_group_name: str, + parameters: "_models.ApplicationSecurityGroup", + **kwargs: Any + ) -> LROPoller["_models.ApplicationSecurityGroup"]: + """Creates or updates an application security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :param parameters: Parameters supplied to the create or update ApplicationSecurityGroup + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ApplicationSecurityGroup or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + application_security_group_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ApplicationSecurityGroup": + """Updates an application security group's tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :param parameters: Parameters supplied to update application security group tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_application_security_groups_update_tags_request( + resource_group_name=resource_group_name, + application_security_group_name=application_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.ApplicationSecurityGroupListResult"]: + """Gets all application security groups in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_security_groups_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_security_groups_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationSecurityGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ApplicationSecurityGroupListResult"]: + """Gets all the application security groups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ApplicationSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_application_security_groups_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_application_security_groups_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ApplicationSecurityGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups"} # type: ignore +class AvailableDelegationsOperations(object): + """AvailableDelegationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> Iterable["_models.AvailableDelegationsResult"]: + """Gets all of the available subnet delegations for this subscription in this region. + + :param location: The location of the subnet. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableDelegationsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailableDelegationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableDelegationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_delegations_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_delegations_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AvailableDelegationsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations"} # type: ignore +class AvailableResourceGroupDelegationsOperations(object): + """AvailableResourceGroupDelegationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.AvailableDelegationsResult"]: + """Gets all of the available subnet delegations for this resource group in this region. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableDelegationsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailableDelegationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableDelegationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_resource_group_delegations_list_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_resource_group_delegations_list_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AvailableDelegationsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations"} # type: ignore +class AvailableServiceAliasesOperations(object): + """AvailableServiceAliasesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> Iterable["_models.AvailableServiceAliasesResult"]: + """Gets all available service aliases for this subscription in this region. + + :param location: The location. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableServiceAliasesResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailableServiceAliasesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableServiceAliasesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_service_aliases_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_service_aliases_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AvailableServiceAliasesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> Iterable["_models.AvailableServiceAliasesResult"]: + """Gets all available service aliases for this resource group in this region. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param location: The location. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableServiceAliasesResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailableServiceAliasesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableServiceAliasesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_service_aliases_list_by_resource_group_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_service_aliases_list_by_resource_group_request( + resource_group_name=resource_group_name, + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AvailableServiceAliasesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases"} # type: ignore +class AzureFirewallsOperations(object): + """AzureFirewallsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + azure_firewall_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_azure_firewalls_delete_request_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + azure_firewall_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified Azure Firewall. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + azure_firewall_name: str, + **kwargs: Any + ) -> "_models.AzureFirewall": + """Gets the specified Azure Firewall. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureFirewall, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.AzureFirewall + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_azure_firewalls_get_request( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureFirewall', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + azure_firewall_name: str, + parameters: "_models.AzureFirewall", + **kwargs: Any + ) -> "_models.AzureFirewall": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'AzureFirewall') + + request = build_azure_firewalls_create_or_update_request_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AzureFirewall', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AzureFirewall', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + azure_firewall_name: str, + parameters: "_models.AzureFirewall", + **kwargs: Any + ) -> LROPoller["_models.AzureFirewall"]: + """Creates or updates the specified Azure Firewall. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :param parameters: Parameters supplied to the create or update Azure Firewall operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.AzureFirewall + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AzureFirewall or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.AzureFirewall] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('AzureFirewall', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + def _update_tags_initial( + self, + resource_group_name: str, + azure_firewall_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.AzureFirewall"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AzureFirewall"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_azure_firewalls_update_tags_request_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureFirewall', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + + @distributed_trace + def begin_update_tags( + self, + resource_group_name: str, + azure_firewall_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> LROPoller["_models.AzureFirewall"]: + """Updates tags of an Azure Firewall resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :param parameters: Parameters supplied to update azure firewall tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AzureFirewall or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.AzureFirewall] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + azure_firewall_name=azure_firewall_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('AzureFirewall', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.AzureFirewallListResult"]: + """Lists all Azure Firewalls in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureFirewallListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AzureFirewallListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_azure_firewalls_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_azure_firewalls_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AzureFirewallListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.AzureFirewallListResult"]: + """Gets all the Azure Firewalls in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureFirewallListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AzureFirewallListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_azure_firewalls_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_azure_firewalls_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AzureFirewallListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls"} # type: ignore +class AzureFirewallFqdnTagsOperations(object): + """AzureFirewallFqdnTagsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.AzureFirewallFqdnTagListResult"]: + """Gets all the Azure Firewall FQDN Tags in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureFirewallFqdnTagListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AzureFirewallFqdnTagListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallFqdnTagListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_azure_firewall_fqdn_tags_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_azure_firewall_fqdn_tags_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AzureFirewallFqdnTagListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags"} # type: ignore +class WebCategoriesOperations(object): + """WebCategoriesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.AzureWebCategory": + """Gets the specified Azure Web Category. + + :param name: The name of the azureWebCategory. + :type name: str + :param expand: Expands resourceIds back referenced by the azureWebCategory resource. Default + value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureWebCategory, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.AzureWebCategory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureWebCategory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_web_categories_get_request( + name=name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureWebCategory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}"} # type: ignore + + + @distributed_trace + def list_by_subscription( + self, + **kwargs: Any + ) -> Iterable["_models.AzureWebCategoryListResult"]: + """Gets all the Azure Web Categories in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureWebCategoryListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AzureWebCategoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureWebCategoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_web_categories_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_web_categories_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AzureWebCategoryListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories"} # type: ignore +class BastionHostsOperations(object): + """BastionHostsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_bastion_hosts_delete_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified Bastion Host. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> "_models.BastionHost": + """Gets the specified Bastion Host. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BastionHost, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.BastionHost + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_bastion_hosts_get_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BastionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + bastion_host_name: str, + parameters: "_models.BastionHost", + **kwargs: Any + ) -> "_models.BastionHost": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BastionHost') + + request = build_bastion_hosts_create_or_update_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BastionHost', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BastionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + bastion_host_name: str, + parameters: "_models.BastionHost", + **kwargs: Any + ) -> LROPoller["_models.BastionHost"]: + """Creates or updates the specified Bastion Host. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param parameters: Parameters supplied to the create or update Bastion Host operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.BastionHost + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BastionHost or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.BastionHost] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BastionHost', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + def _update_tags_initial( + self, + resource_group_name: str, + bastion_host_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.BastionHost"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionHost"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_bastion_hosts_update_tags_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + + @distributed_trace + def begin_update_tags( + self, + resource_group_name: str, + bastion_host_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> LROPoller["_models.BastionHost"]: + """Updates Tags for BastionHost resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param parameters: Parameters supplied to update BastionHost tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BastionHost or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.BastionHost] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BastionHost', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.BastionHostListResult"]: + """Lists all Bastion Hosts in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionHostListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionHostListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHostListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_bastion_hosts_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_bastion_hosts_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BastionHostListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.BastionHostListResult"]: + """Lists all Bastion Hosts in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionHostListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionHostListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHostListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_bastion_hosts_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_bastion_hosts_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BastionHostListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts"} # type: ignore +class NetworkManagementClientOperationsMixin(object): + + def _put_bastion_shareable_link_initial( + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> Optional["_models.BastionShareableLinkListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionShareableLinkListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_put_bastion_shareable_link_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._put_bastion_shareable_link_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionShareableLinkListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _put_bastion_shareable_link_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks"} # type: ignore + + + @distributed_trace + def begin_put_bastion_shareable_link( + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> LROPoller[ItemPaged["_models.BastionShareableLinkListResult"]]: + """Creates a Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + BastionShareableLinkListResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListResult]] + :raises: ~azure.core.exceptions.HttpResponseError + """ + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_put_bastion_shareable_link_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.begin_put_bastion_shareable_link.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_put_bastion_shareable_link_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BastionShareableLinkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._put_bastion_shareable_link_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + bsl_request=bsl_request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return get_next(next_link) + + return ItemPaged( + internal_get_next, extract_data + ) + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_put_bastion_shareable_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks"} # type: ignore + + + def _delete_bastion_shareable_link_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_delete_bastion_shareable_link_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._delete_bastion_shareable_link_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_bastion_shareable_link_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks"} # type: ignore + + + @distributed_trace + def begin_delete_bastion_shareable_link( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_bastion_shareable_link_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + bsl_request=bsl_request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete_bastion_shareable_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks"} # type: ignore + + @distributed_trace + def get_bastion_shareable_link( + self, + resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", + **kwargs: Any + ) -> Iterable["_models.BastionShareableLinkListResult"]: + """Return the Bastion Shareable Links for all the VMs specified in the request. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionShareableLinkListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionShareableLinkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_get_bastion_shareable_link_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get_bastion_shareable_link.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + _json = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + + request = build_get_bastion_shareable_link_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BastionShareableLinkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + get_bastion_shareable_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks"} # type: ignore + + def _get_active_sessions_initial( + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> Optional["_models.BastionActiveSessionListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionActiveSessionListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_get_active_sessions_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_active_sessions_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionActiveSessionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_active_sessions_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions"} # type: ignore + + + @distributed_trace + def begin_get_active_sessions( + self, + resource_group_name: str, + bastion_host_name: str, + **kwargs: Any + ) -> LROPoller[ItemPaged["_models.BastionActiveSessionListResult"]]: + """Returns the list of currently active sessions on the Bastion. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns an iterator like instance of either + BastionActiveSessionListResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionActiveSessionListResult]] + :raises: ~azure.core.exceptions.HttpResponseError + """ + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionActiveSessionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_get_active_sessions_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.begin_get_active_sessions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_get_active_sessions_request_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BastionActiveSessionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionActiveSessionListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_active_sessions_initial( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + return get_next(next_link) + + return ItemPaged( + internal_get_next, extract_data + ) + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_active_sessions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions"} # type: ignore + + + @distributed_trace + def disconnect_active_sessions( + self, + resource_group_name: str, + bastion_host_name: str, + session_ids: "_models.SessionIds", + **kwargs: Any + ) -> Iterable["_models.BastionSessionDeleteResult"]: + """Returns the list of currently active sessions on the Bastion. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param session_ids: The list of sessionids to disconnect. + :type session_ids: ~azure.mgmt.network.v2021_08_01.models.SessionIds + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BastionSessionDeleteResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BastionSessionDeleteResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionSessionDeleteResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(session_ids, 'SessionIds') + + request = build_disconnect_active_sessions_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.disconnect_active_sessions.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + _json = self._serialize.body(session_ids, 'SessionIds') + + request = build_disconnect_active_sessions_request( + resource_group_name=resource_group_name, + bastion_host_name=bastion_host_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BastionSessionDeleteResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + disconnect_active_sessions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions"} # type: ignore + + @distributed_trace + def check_dns_name_availability( + self, + location: str, + domain_name_label: str, + **kwargs: Any + ) -> "_models.DnsNameAvailabilityResult": + """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + + :param location: The location of the domain name. + :type location: str + :param domain_name_label: The domain name to be verified. It must conform to the following + regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + :type domain_name_label: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DnsNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DnsNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_check_dns_name_availability_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + domain_name_label=domain_name_label, + template_url=self.check_dns_name_availability.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + check_dns_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability"} # type: ignore + + + @distributed_trace + def supported_security_providers( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> "_models.VirtualWanSecurityProviders": + """Gives the supported security providers for the virtual wan. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN for which supported security providers are + needed. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWanSecurityProviders, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWanSecurityProviders + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWanSecurityProviders"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_supported_security_providers_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + template_url=self.supported_security_providers.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWanSecurityProviders', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + supported_security_providers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders"} # type: ignore + + + def _generatevirtualwanvpnserverconfigurationvpnprofile_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + vpn_client_params: "_models.VirtualWanVpnProfileParameters", + **kwargs: Any + ) -> Optional["_models.VpnProfileResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnProfileResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_client_params, 'VirtualWanVpnProfileParameters') + + request = build_generatevirtualwanvpnserverconfigurationvpnprofile_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._generatevirtualwanvpnserverconfigurationvpnprofile_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _generatevirtualwanvpnserverconfigurationvpnprofile_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile"} # type: ignore + + + @distributed_trace + def begin_generatevirtualwanvpnserverconfigurationvpnprofile( + self, + resource_group_name: str, + virtual_wan_name: str, + vpn_client_params: "_models.VirtualWanVpnProfileParameters", + **kwargs: Any + ) -> LROPoller["_models.VpnProfileResponse"]: + """Generates a unique VPN profile for P2S clients for VirtualWan and associated + VpnServerConfiguration combination in the specified resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation + operation. + :type vpn_client_params: ~azure.mgmt.network.v2021_08_01.models.VirtualWanVpnProfileParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnProfileResponse or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnProfileResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnProfileResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._generatevirtualwanvpnserverconfigurationvpnprofile_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + vpn_client_params=vpn_client_params, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_generatevirtualwanvpnserverconfigurationvpnprofile.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile"} # type: ignore +class NetworkInterfacesOperations(object): + """NetworkInterfacesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_cloud_service_role_instance_network_interfaces( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceListResult"]: + """Gets information about all network interfaces in a role instance in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_cloud_service_role_instance_network_interfaces_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_cloud_service_role_instance_network_interfaces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_cloud_service_role_instance_network_interfaces_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_cloud_service_role_instance_network_interfaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces"} # type: ignore + + @distributed_trace + def list_cloud_service_network_interfaces( + self, + resource_group_name: str, + cloud_service_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_cloud_service_network_interfaces_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_cloud_service_network_interfaces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_cloud_service_network_interfaces_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_cloud_service_network_interfaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces"} # type: ignore + + @distributed_trace + def get_cloud_service_network_interface( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterface": + """Get the specified network interface in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_get_cloud_service_network_interface_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_cloud_service_network_interface.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cloud_service_network_interface.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_delete_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterface": + """Gets information about the specified network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_get_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + network_interface_name: str, + parameters: "_models.NetworkInterface", + **kwargs: Any + ) -> "_models.NetworkInterface": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkInterface') + + request = build_network_interfaces_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + parameters: "_models.NetworkInterface", + **kwargs: Any + ) -> LROPoller["_models.NetworkInterface"]: + """Creates or updates a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param parameters: Parameters supplied to the create or update network interface operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NetworkInterface or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkInterface] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkInterface', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_interface_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkInterface": + """Updates a network interface tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param parameters: Parameters supplied to update network interface tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_interfaces_update_tags_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces"} # type: ignore + + def _get_effective_route_table_initial( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> Optional["_models.EffectiveRouteListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveRouteListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_get_effective_route_table_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_effective_route_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_effective_route_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable"} # type: ignore + + + @distributed_trace + def begin_get_effective_route_table( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> LROPoller["_models.EffectiveRouteListResult"]: + """Gets all route tables applied to a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either EffectiveRouteListResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.EffectiveRouteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveRouteListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_effective_route_table_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_effective_route_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable"} # type: ignore + + def _list_effective_network_security_groups_initial( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> Optional["_models.EffectiveNetworkSecurityGroupListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveNetworkSecurityGroupListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interfaces_list_effective_network_security_groups_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_effective_network_security_groups_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_effective_network_security_groups_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups"} # type: ignore + + + @distributed_trace + def begin_list_effective_network_security_groups( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> LROPoller["_models.EffectiveNetworkSecurityGroupListResult"]: + """Gets all network security groups applied to a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either EffectiveNetworkSecurityGroupListResult + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.EffectiveNetworkSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveNetworkSecurityGroupListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_effective_network_security_groups_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_effective_network_security_groups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups"} # type: ignore + + @distributed_trace + def list_virtual_machine_scale_set_vm_network_interfaces( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceListResult"]: + """Gets information about all network interfaces in a virtual machine in a virtual machine scale + set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_virtual_machine_scale_set_vm_network_interfaces_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_virtual_machine_scale_set_vm_network_interfaces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_virtual_machine_scale_set_vm_network_interfaces_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_vm_network_interfaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces"} # type: ignore + + @distributed_trace + def list_virtual_machine_scale_set_network_interfaces( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_virtual_machine_scale_set_network_interfaces_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_virtual_machine_scale_set_network_interfaces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_virtual_machine_scale_set_network_interfaces_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_network_interfaces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces"} # type: ignore + + @distributed_trace + def get_virtual_machine_scale_set_network_interface( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterface": + """Get the specified network interface in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + + request = build_network_interfaces_get_virtual_machine_scale_set_network_interface_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_virtual_machine_scale_set_network_interface.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_virtual_machine_scale_set_network_interface.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}"} # type: ignore + + + @distributed_trace + def list_virtual_machine_scale_set_ip_configurations( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceIPConfigurationListResult"]: + """Get the specified network interface ip configuration in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interfaces_list_virtual_machine_scale_set_ip_configurations_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.list_virtual_machine_scale_set_ip_configurations.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interfaces_list_virtual_machine_scale_set_ip_configurations_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceIPConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_ip_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations"} # type: ignore + + @distributed_trace + def get_virtual_machine_scale_set_ip_configuration( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterfaceIPConfiguration": + """Get the specified network interface ip configuration in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the ip configuration. + :type ip_configuration_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterfaceIPConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + + request = build_network_interfaces_get_virtual_machine_scale_set_ip_configuration_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_virtual_machine_scale_set_ip_configuration.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_virtual_machine_scale_set_ip_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}"} # type: ignore + +class PublicIPAddressesOperations(object): + """PublicIPAddressesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_cloud_service_public_ip_addresses( + self, + resource_group_name: str, + cloud_service_name: str, + **kwargs: Any + ) -> Iterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses on a cloud service level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_cloud_service_public_ip_addresses_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_cloud_service_public_ip_addresses.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_cloud_service_public_ip_addresses_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_cloud_service_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses"} # type: ignore + + @distributed_trace + def list_cloud_service_role_instance_public_ip_addresses( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + ip_configuration_name: str, + **kwargs: Any + ) -> Iterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses in a role instance IP configuration in a cloud + service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :param network_interface_name: The network interface name. + :type network_interface_name: str + :param ip_configuration_name: The IP configuration name. + :type ip_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_cloud_service_role_instance_public_ip_addresses_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_cloud_service_role_instance_public_ip_addresses.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_cloud_service_role_instance_public_ip_addresses_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_cloud_service_role_instance_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses"} # type: ignore + + @distributed_trace + def get_cloud_service_public_ip_address( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + ip_configuration_name: str, + public_ip_address_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Get the specified public IP address in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The role instance name. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the IP configuration. + :type ip_configuration_name: str + :param public_ip_address_name: The name of the public IP Address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_addresses_get_cloud_service_public_ip_address_request( + resource_group_name=resource_group_name, + cloud_service_name=cloud_service_name, + role_instance_name=role_instance_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_cloud_service_public_ip_address.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_cloud_service_public_ip_address.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + public_ip_address_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_addresses_delete_request_initial( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + public_ip_address_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified public IP address. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + public_ip_address_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Gets the specified public IP address in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_addresses_get_request( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + public_ip_address_name: str, + parameters: "_models.PublicIPAddress", + **kwargs: Any + ) -> "_models.PublicIPAddress": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PublicIPAddress') + + request = build_public_ip_addresses_create_or_update_request_initial( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + public_ip_address_name: str, + parameters: "_models.PublicIPAddress", + **kwargs: Any + ) -> LROPoller["_models.PublicIPAddress"]: + """Creates or updates a static or dynamic public IP address. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :param parameters: Parameters supplied to the create or update public IP address operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PublicIPAddress or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PublicIPAddress] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + public_ip_address_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Updates public IP address tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :param parameters: Parameters supplied to update public IP address tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_public_ip_addresses_update_tags_request( + resource_group_name=resource_group_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.PublicIPAddressListResult"]: + """Gets all the public IP addresses in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.PublicIPAddressListResult"]: + """Gets all public IP addresses in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses"} # type: ignore + + @distributed_trace + def list_virtual_machine_scale_set_public_ip_addresses( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + **kwargs: Any + ) -> Iterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses on a virtual machine scale set level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_virtual_machine_scale_set_public_ip_addresses_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_virtual_machine_scale_set_public_ip_addresses.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_virtual_machine_scale_set_public_ip_addresses_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses"} # type: ignore + + @distributed_trace + def list_virtual_machine_scale_set_vm_public_ip_addresses( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + **kwargs: Any + ) -> Iterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses in a virtual machine IP configuration in a + virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The network interface name. + :type network_interface_name: str + :param ip_configuration_name: The IP configuration name. + :type ip_configuration_name: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_addresses_list_virtual_machine_scale_set_vm_public_ip_addresses_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_virtual_machine_scale_set_vm_public_ip_addresses.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_addresses_list_virtual_machine_scale_set_vm_public_ip_addresses_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPAddressListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_virtual_machine_scale_set_vm_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses"} # type: ignore + + @distributed_trace + def get_virtual_machine_scale_set_public_ip_address( + self, + resource_group_name: str, + virtual_machine_scale_set_name: str, + virtualmachine_index: str, + network_interface_name: str, + ip_configuration_name: str, + public_ip_address_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Get the specified public IP address in a virtual machine scale set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_machine_scale_set_name: The name of the virtual machine scale set. + :type virtual_machine_scale_set_name: str + :param virtualmachine_index: The virtual machine index. + :type virtualmachine_index: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the IP configuration. + :type ip_configuration_name: str + :param public_ip_address_name: The name of the public IP Address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2018-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2018-10-01") # type: str + + + request = build_public_ip_addresses_get_virtual_machine_scale_set_public_ip_address_request( + resource_group_name=resource_group_name, + virtual_machine_scale_set_name=virtual_machine_scale_set_name, + virtualmachine_index=virtualmachine_index, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + public_ip_address_name=public_ip_address_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_virtual_machine_scale_set_public_ip_address.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_virtual_machine_scale_set_public_ip_address.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}"} # type: ignore + +class CustomIPPrefixesOperations(object): + """CustomIPPrefixesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + custom_ip_prefix_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_custom_ip_prefixes_delete_request_initial( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + custom_ip_prefix_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified custom IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the CustomIpPrefix. + :type custom_ip_prefix_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + custom_ip_prefix_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.CustomIpPrefix": + """Gets the specified custom IP prefix in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomIpPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_custom_ip_prefixes_get_request( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + custom_ip_prefix_name: str, + parameters: "_models.CustomIpPrefix", + **kwargs: Any + ) -> "_models.CustomIpPrefix": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CustomIpPrefix') + + request = build_custom_ip_prefixes_create_or_update_request_initial( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + custom_ip_prefix_name: str, + parameters: "_models.CustomIpPrefix", + **kwargs: Any + ) -> LROPoller["_models.CustomIpPrefix"]: + """Creates or updates a custom IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param parameters: Parameters supplied to the create or update custom IP prefix operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either CustomIpPrefix or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + custom_ip_prefix_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.CustomIpPrefix": + """Updates custom IP prefix tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param parameters: Parameters supplied to update custom IP prefix tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomIpPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.CustomIpPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_custom_ip_prefixes_update_tags_request( + resource_group_name=resource_group_name, + custom_ip_prefix_name=custom_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.CustomIpPrefixListResult"]: + """Gets all the custom IP prefixes in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CustomIpPrefixListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.CustomIpPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_custom_ip_prefixes_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_custom_ip_prefixes_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("CustomIpPrefixListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.CustomIpPrefixListResult"]: + """Gets all custom IP prefixes in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CustomIpPrefixListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.CustomIpPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_custom_ip_prefixes_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_custom_ip_prefixes_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("CustomIpPrefixListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes"} # type: ignore +class DdosCustomPoliciesOperations(object): + """DdosCustomPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ddos_custom_policies_delete_request_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + """Gets information about the specified DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosCustomPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ddos_custom_policies_get_request( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.DdosCustomPolicy", + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'DdosCustomPolicy') + + request = build_ddos_custom_policies_create_or_update_request_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.DdosCustomPolicy", + **kwargs: Any + ) -> LROPoller["_models.DdosCustomPolicy"]: + """Creates or updates a DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :param parameters: Parameters supplied to the create or update operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicy + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DdosCustomPolicy or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicy] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + """Update a DDoS custom policy tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :param parameters: Parameters supplied to update DDoS custom policy resource tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosCustomPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DdosCustomPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_ddos_custom_policies_update_tags_request( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}"} # type: ignore + +class DdosProtectionPlansOperations(object): + """DdosProtectionPlansOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ddos_protection_plans_delete_request_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + """Gets information about the specified DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosProtectionPlan, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ddos_protection_plans_get_request( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.DdosProtectionPlan", + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'DdosProtectionPlan') + + request = build_ddos_protection_plans_create_or_update_request_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.DdosProtectionPlan", + **kwargs: Any + ) -> LROPoller["_models.DdosProtectionPlan"]: + """Creates or updates a DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :param parameters: Parameters supplied to the create or update operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DdosProtectionPlan or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + """Update a DDoS protection plan tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :param parameters: Parameters supplied to the update DDoS protection plan resource tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosProtectionPlan, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_ddos_protection_plans_update_tags_request( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.DdosProtectionPlanListResult"]: + """Gets all DDoS protection plans in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DdosProtectionPlanListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ddos_protection_plans_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ddos_protection_plans_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DdosProtectionPlanListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.DdosProtectionPlanListResult"]: + """Gets all the DDoS protection plans in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DdosProtectionPlanListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.DdosProtectionPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ddos_protection_plans_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ddos_protection_plans_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DdosProtectionPlanListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans"} # type: ignore +class DscpConfigurationOperations(object): + """DscpConfigurationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + dscp_configuration_name: str, + parameters: "_models.DscpConfiguration", + **kwargs: Any + ) -> "_models.DscpConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'DscpConfiguration') + + request = build_dscp_configuration_create_or_update_request_initial( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + dscp_configuration_name: str, + parameters: "_models.DscpConfiguration", + **kwargs: Any + ) -> LROPoller["_models.DscpConfiguration"]: + """Creates or updates a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :param parameters: Parameters supplied to the create or update dscp configuration operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.DscpConfiguration + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DscpConfiguration or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.DscpConfiguration] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + dscp_configuration_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_dscp_configuration_delete_request_initial( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + dscp_configuration_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + dscp_configuration_name: str, + **kwargs: Any + ) -> "_models.DscpConfiguration": + """Gets a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DscpConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.DscpConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_dscp_configuration_get_request( + resource_group_name=resource_group_name, + dscp_configuration_name=dscp_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.DscpConfigurationListResult"]: + """Gets a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DscpConfigurationListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.DscpConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_dscp_configuration_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_dscp_configuration_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DscpConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.DscpConfigurationListResult"]: + """Gets all dscp configurations in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DscpConfigurationListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.DscpConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_dscp_configuration_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_dscp_configuration_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DscpConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations"} # type: ignore +class AvailableEndpointServicesOperations(object): + """AvailableEndpointServicesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> Iterable["_models.EndpointServicesListResult"]: + """List what values of endpoint services are available for use. + + :param location: The location to check available endpoint services. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EndpointServicesListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.EndpointServicesListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointServicesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_endpoint_services_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_endpoint_services_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("EndpointServicesListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices"} # type: ignore +class ExpressRouteCircuitAuthorizationsOperations(object): + """ExpressRouteCircuitAuthorizationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_authorizations_delete_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified authorization from the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitAuthorization": + """Gets the specified authorization from the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitAuthorization, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_authorizations_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + authorization_parameters: "_models.ExpressRouteCircuitAuthorization", + **kwargs: Any + ) -> "_models.ExpressRouteCircuitAuthorization": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(authorization_parameters, 'ExpressRouteCircuitAuthorization') + + request = build_express_route_circuit_authorizations_create_or_update_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + circuit_name: str, + authorization_name: str, + authorization_parameters: "_models.ExpressRouteCircuitAuthorization", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuitAuthorization"]: + """Creates or updates an authorization in the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :param authorization_parameters: Parameters supplied to the create or update express route + circuit authorization operation. + :type authorization_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCircuitAuthorization or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitAuthorization] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + authorization_name=authorization_name, + authorization_parameters=authorization_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> Iterable["_models.AuthorizationListResult"]: + """Gets all authorizations in an express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AuthorizationListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AuthorizationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuit_authorizations_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuit_authorizations_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AuthorizationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations"} # type: ignore +class ExpressRouteCircuitPeeringsOperations(object): + """ExpressRouteCircuitPeeringsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_peerings_delete_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified peering from the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitPeering": + """Gets the specified peering for the express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_peerings_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + peering_parameters: "_models.ExpressRouteCircuitPeering", + **kwargs: Any + ) -> "_models.ExpressRouteCircuitPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(peering_parameters, 'ExpressRouteCircuitPeering') + + request = build_express_route_circuit_peerings_create_or_update_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + peering_parameters: "_models.ExpressRouteCircuitPeering", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuitPeering"]: + """Creates or updates a peering in the specified express route circuits. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param peering_parameters: Parameters supplied to the create or update express route circuit + peering operation. + :type peering_parameters: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCircuitPeering or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeering] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + peering_parameters=peering_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteCircuitPeeringListResult"]: + """Gets all peerings in a specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCircuitPeeringListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitPeeringListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeeringListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuit_peerings_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuit_peerings_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCircuitPeeringListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings"} # type: ignore +class ExpressRouteCircuitConnectionsOperations(object): + """ExpressRouteCircuitConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_connections_delete_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified Express Route Circuit Connection from the specified express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitConnection": + """Gets the specified Express Route Circuit Connection from the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuit_connections_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + express_route_circuit_connection_parameters: "_models.ExpressRouteCircuitConnection", + **kwargs: Any + ) -> "_models.ExpressRouteCircuitConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(express_route_circuit_connection_parameters, 'ExpressRouteCircuitConnection') + + request = build_express_route_circuit_connections_create_or_update_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + express_route_circuit_connection_parameters: "_models.ExpressRouteCircuitConnection", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuitConnection"]: + """Creates or updates a Express Route Circuit Connection in the specified express route circuits. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str + :param express_route_circuit_connection_parameters: Parameters supplied to the create or update + express route circuit connection operation. + :type express_route_circuit_connection_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCircuitConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + express_route_circuit_connection_parameters=express_route_circuit_connection_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteCircuitConnectionListResult"]: + """Gets all global reach connections associated with a private peering in an express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCircuitConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuit_connections_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuit_connections_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCircuitConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections"} # type: ignore +class PeerExpressRouteCircuitConnectionsOperations(object): + """PeerExpressRouteCircuitConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.PeerExpressRouteCircuitConnection": + """Gets the specified Peer Express Route Circuit Connection from the specified express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the peer express route circuit connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PeerExpressRouteCircuitConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PeerExpressRouteCircuitConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerExpressRouteCircuitConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_peer_express_route_circuit_connections_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PeerExpressRouteCircuitConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> Iterable["_models.PeerExpressRouteCircuitConnectionListResult"]: + """Gets all global reach peer connections associated with a private peering in an express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PeerExpressRouteCircuitConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PeerExpressRouteCircuitConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerExpressRouteCircuitConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_peer_express_route_circuit_connections_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_peer_express_route_circuit_connections_list_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PeerExpressRouteCircuitConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections"} # type: ignore +class ExpressRouteCircuitsOperations(object): + """ExpressRouteCircuitsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_delete_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuit": + """Gets information about the specified express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of express route circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_get_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + circuit_name: str, + parameters: "_models.ExpressRouteCircuit", + **kwargs: Any + ) -> "_models.ExpressRouteCircuit": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ExpressRouteCircuit') + + request = build_express_route_circuits_create_or_update_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + circuit_name: str, + parameters: "_models.ExpressRouteCircuit", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuit"]: + """Creates or updates an express route circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param parameters: Parameters supplied to the create or update express route circuit operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCircuit or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + circuit_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ExpressRouteCircuit": + """Updates an express route circuit tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param parameters: Parameters supplied to update express route circuit tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuit + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_express_route_circuits_update_tags_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}"} # type: ignore + + + def _list_arp_table_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsArpTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsArpTableListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_list_arp_table_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_arp_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_arp_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}"} # type: ignore + + + @distributed_trace + def begin_list_arp_table( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuitsArpTableListResult"]: + """Gets the currently advertised ARP table associated with the express route circuit in a resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCircuitsArpTableListResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsArpTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsArpTableListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_arp_table_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_arp_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}"} # type: ignore + + def _list_routes_table_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_list_routes_table_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_routes_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_routes_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}"} # type: ignore + + + @distributed_trace + def begin_list_routes_table( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"]: + """Gets the currently advertised routes table associated with the express route circuit in a + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableListResult + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsRoutesTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_routes_table_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_routes_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}"} # type: ignore + + def _list_routes_table_summary_initial( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_list_routes_table_summary_request_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_routes_table_summary_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_routes_table_summary_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}"} # type: ignore + + + @distributed_trace + def begin_list_routes_table_summary( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]: + """Gets the currently advertised routes table summary associated with the express route circuit in + a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either + ExpressRouteCircuitsRoutesTableSummaryListResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_routes_table_summary_initial( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_routes_table_summary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}"} # type: ignore + + @distributed_trace + def get_stats( + self, + resource_group_name: str, + circuit_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitStats": + """Gets all the stats from an express route circuit in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitStats, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitStats + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_get_stats_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_stats.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_stats.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats"} # type: ignore + + + @distributed_trace + def get_peering_stats( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCircuitStats": + """Gets all stats from an express route circuit in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuitStats, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitStats + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_circuits_get_peering_stats_request( + resource_group_name=resource_group_name, + circuit_name=circuit_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_peering_stats.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_peering_stats.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteCircuitListResult"]: + """Gets all the express route circuits in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuits_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuits_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCircuitListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteCircuitListResult"]: + """Gets all the express route circuits in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_circuits_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_circuits_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCircuitListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits"} # type: ignore +class ExpressRouteServiceProvidersOperations(object): + """ExpressRouteServiceProvidersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteServiceProviderListResult"]: + """Gets all the available express route service providers. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteServiceProviderListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteServiceProviderListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteServiceProviderListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_service_providers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_service_providers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteServiceProviderListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders"} # type: ignore +class ExpressRouteCrossConnectionsOperations(object): + """ExpressRouteCrossConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteCrossConnectionListResult"]: + """Retrieves all the ExpressRouteCrossConnections in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_cross_connections_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_cross_connections_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCrossConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteCrossConnectionListResult"]: + """Retrieves all the ExpressRouteCrossConnections in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_cross_connections_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_cross_connections_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCrossConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + cross_connection_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnection": + """Gets details about the specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group (peering location of the circuit). + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection (service key of the + circuit). + :type cross_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCrossConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connections_get_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + cross_connection_name: str, + parameters: "_models.ExpressRouteCrossConnection", + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ExpressRouteCrossConnection') + + request = build_express_route_cross_connections_create_or_update_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cross_connection_name: str, + parameters: "_models.ExpressRouteCrossConnection", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCrossConnection"]: + """Update the specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param parameters: Parameters supplied to the update express route crossConnection operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCrossConnection or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + cross_connection_name: str, + cross_connection_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnection": + """Updates an express route cross connection tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the cross connection. + :type cross_connection_name: str + :param cross_connection_parameters: Parameters supplied to update express route cross + connection tags. + :type cross_connection_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCrossConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(cross_connection_parameters, 'TagsObject') + + request = build_express_route_cross_connections_update_tags_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}"} # type: ignore + + + def _list_arp_table_initial( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsArpTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsArpTableListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connections_list_arp_table_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_arp_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_arp_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}"} # type: ignore + + + @distributed_trace + def begin_list_arp_table( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuitsArpTableListResult"]: + """Gets the currently advertised ARP table associated with the express route cross connection in a + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCircuitsArpTableListResult or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsArpTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsArpTableListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_arp_table_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_arp_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}"} # type: ignore + + def _list_routes_table_summary_initial( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connections_list_routes_table_summary_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_routes_table_summary_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCrossConnectionsRoutesTableSummaryListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_routes_table_summary_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}"} # type: ignore + + + @distributed_trace + def begin_list_routes_table_summary( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]: + """Gets the route table summary associated with the express route cross connection in a resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either + ExpressRouteCrossConnectionsRoutesTableSummaryListResult or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_routes_table_summary_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCrossConnectionsRoutesTableSummaryListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_routes_table_summary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}"} # type: ignore + + def _list_routes_table_initial( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connections_list_routes_table_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_routes_table_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_routes_table_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}"} # type: ignore + + + @distributed_trace + def begin_list_routes_table( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + device_path: str, + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"]: + """Gets the currently advertised routes table associated with the express route cross connection + in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param device_path: The path of the device. + :type device_path: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableListResult + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCircuitsRoutesTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_routes_table_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + device_path=device_path, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_routes_table.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}"} # type: ignore +class ExpressRouteCrossConnectionPeeringsOperations(object): + """ExpressRouteCrossConnectionPeeringsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + cross_connection_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteCrossConnectionPeeringList"]: + """Gets all peerings in a specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionPeeringList or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeeringList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeeringList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_cross_connection_peerings_list_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_cross_connection_peerings_list_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteCrossConnectionPeeringList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connection_peerings_delete_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified peering from the ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnectionPeering": + """Gets the specified peering for the ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCrossConnectionPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_cross_connection_peerings_get_request( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + peering_parameters: "_models.ExpressRouteCrossConnectionPeering", + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnectionPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(peering_parameters, 'ExpressRouteCrossConnectionPeering') + + request = build_express_route_cross_connection_peerings_create_or_update_request_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + cross_connection_name: str, + peering_name: str, + peering_parameters: "_models.ExpressRouteCrossConnectionPeering", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteCrossConnectionPeering"]: + """Creates or updates a peering in the specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param peering_parameters: Parameters supplied to the create or update + ExpressRouteCrossConnection peering operation. + :type peering_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteCrossConnectionPeering or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteCrossConnectionPeering] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cross_connection_name=cross_connection_name, + peering_name=peering_name, + peering_parameters=peering_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}"} # type: ignore +class ExpressRoutePortsLocationsOperations(object): + """ExpressRoutePortsLocationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ExpressRoutePortsLocationListResult"]: + """Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each + location. Available bandwidths can only be obtained when retrieving a specific peering + location. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortsLocationListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsLocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortsLocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_ports_locations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_ports_locations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRoutePortsLocationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations"} # type: ignore + + @distributed_trace + def get( + self, + location_name: str, + **kwargs: Any + ) -> "_models.ExpressRoutePortsLocation": + """Retrieves a single ExpressRoutePort peering location, including the list of available + bandwidths available at said peering location. + + :param location_name: Name of the requested ExpressRoutePort peering location. + :type location_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePortsLocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortsLocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortsLocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_ports_locations_get_request( + subscription_id=self._config.subscription_id, + location_name=location_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePortsLocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}"} # type: ignore + +class ExpressRoutePortsOperations(object): + """ExpressRoutePortsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_ports_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> "_models.ExpressRoutePort": + """Retrieves the requested ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePort, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_ports_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + express_route_port_name: str, + parameters: "_models.ExpressRoutePort", + **kwargs: Any + ) -> "_models.ExpressRoutePort": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ExpressRoutePort') + + request = build_express_route_ports_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + express_route_port_name: str, + parameters: "_models.ExpressRoutePort", + **kwargs: Any + ) -> LROPoller["_models.ExpressRoutePort"]: + """Creates or updates the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to the create ExpressRoutePort operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRoutePort or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + express_route_port_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ExpressRoutePort": + """Update ExpressRoutePort tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to update ExpressRoutePort resource tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePort, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePort + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_express_route_ports_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}"} # type: ignore + + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressRoutePortListResult"]: + """List all the ExpressRoutePort resources in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_ports_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_ports_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRoutePortListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ExpressRoutePortListResult"]: + """List all the ExpressRoutePort resources in the specified subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_ports_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_ports_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRoutePortListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts"} # type: ignore + + @distributed_trace + def generate_loa( + self, + resource_group_name: str, + express_route_port_name: str, + request: "_models.GenerateExpressRoutePortsLOARequest", + **kwargs: Any + ) -> "_models.GenerateExpressRoutePortsLOAResult": + """Generate a letter of authorization for the requested ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_name: str + :param request: Request parameters supplied to generate a letter of authorization. + :type request: ~azure.mgmt.network.v2021_08_01.models.GenerateExpressRoutePortsLOARequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GenerateExpressRoutePortsLOAResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.GenerateExpressRoutePortsLOAResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GenerateExpressRoutePortsLOAResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'GenerateExpressRoutePortsLOARequest') + + request = build_express_route_ports_generate_loa_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.generate_loa.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GenerateExpressRoutePortsLOAResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + generate_loa.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/generateLoa"} # type: ignore + +class ExpressRouteLinksOperations(object): + """ExpressRouteLinksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + express_route_port_name: str, + link_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteLink": + """Retrieves the specified ExpressRouteLink resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param link_name: The name of the ExpressRouteLink resource. + :type link_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteLink, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_links_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + link_name=link_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressRouteLinkListResult"]: + """Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteLinkListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRouteLinkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_links_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_links_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRouteLinkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links"} # type: ignore +class ExpressRoutePortAuthorizationsOperations(object): + """ExpressRoutePortAuthorizationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_port_authorizations_delete_request_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified authorization from the specified express route port. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the express route port. + :type express_route_port_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + **kwargs: Any + ) -> "_models.ExpressRoutePortAuthorization": + """Gets the specified authorization from the specified express route port. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the express route port. + :type express_route_port_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePortAuthorization, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorization + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortAuthorization"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_port_authorizations_get_request( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePortAuthorization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + authorization_parameters: "_models.ExpressRoutePortAuthorization", + **kwargs: Any + ) -> "_models.ExpressRoutePortAuthorization": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortAuthorization"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(authorization_parameters, 'ExpressRoutePortAuthorization') + + request = build_express_route_port_authorizations_create_or_update_request_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRoutePortAuthorization', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRoutePortAuthorization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + express_route_port_name: str, + authorization_name: str, + authorization_parameters: "_models.ExpressRoutePortAuthorization", + **kwargs: Any + ) -> LROPoller["_models.ExpressRoutePortAuthorization"]: + """Creates or updates an authorization in the specified express route port. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the express route port. + :type express_route_port_name: str + :param authorization_name: The name of the authorization. + :type authorization_name: str + :param authorization_parameters: Parameters supplied to the create or update express route port + authorization operation. + :type authorization_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorization + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRoutePortAuthorization or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorization] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortAuthorization"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + authorization_name=authorization_name, + authorization_parameters=authorization_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRoutePortAuthorization', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressRoutePortAuthorizationListResult"]: + """Gets all authorizations in an express route port. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the express route port. + :type express_route_port_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortAuthorizationListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ExpressRoutePortAuthorizationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortAuthorizationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_express_route_port_authorizations_list_request( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_express_route_port_authorizations_list_request( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressRoutePortAuthorizationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations"} # type: ignore +class FirewallPoliciesOperations(object): + """FirewallPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policies_delete_request_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified Firewall Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + firewall_policy_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.FirewallPolicy": + """Gets the specified Firewall Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policies_get_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.FirewallPolicy", + **kwargs: Any + ) -> "_models.FirewallPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FirewallPolicy') + + request = build_firewall_policies_create_or_update_request_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.FirewallPolicy", + **kwargs: Any + ) -> LROPoller["_models.FirewallPolicy"]: + """Creates or updates the specified Firewall Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Parameters supplied to the create or update Firewall Policy operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicy + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either FirewallPolicy or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.FirewallPolicy] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.FirewallPolicy": + """Updates tags of a Azure Firewall Policy resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Parameters supplied to update Azure Firewall Policy tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_firewall_policies_update_tags_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.FirewallPolicyListResult"]: + """Lists all Firewall Policies in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FirewallPolicyListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_firewall_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_firewall_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("FirewallPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.FirewallPolicyListResult"]: + """Gets all the Firewall Policies in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FirewallPolicyListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_firewall_policies_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_firewall_policies_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("FirewallPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies"} # type: ignore +class FirewallPolicyRuleCollectionGroupsOperations(object): + """FirewallPolicyRuleCollectionGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policy_rule_collection_groups_delete_request_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified FirewallPolicyRuleCollectionGroup. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + **kwargs: Any + ) -> "_models.FirewallPolicyRuleCollectionGroup": + """Gets the specified FirewallPolicyRuleCollectionGroup. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FirewallPolicyRuleCollectionGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policy_rule_collection_groups_get_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + parameters: "_models.FirewallPolicyRuleCollectionGroup", + **kwargs: Any + ) -> "_models.FirewallPolicyRuleCollectionGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FirewallPolicyRuleCollectionGroup') + + request = build_firewall_policy_rule_collection_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, + parameters: "_models.FirewallPolicyRuleCollectionGroup", + **kwargs: Any + ) -> LROPoller["_models.FirewallPolicyRuleCollectionGroup"]: + """Creates or updates the specified FirewallPolicyRuleCollectionGroup. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str + :param parameters: Parameters supplied to the create or update + FirewallPolicyRuleCollectionGroup operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either FirewallPolicyRuleCollectionGroup or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> Iterable["_models.FirewallPolicyRuleCollectionGroupListResult"]: + """Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FirewallPolicyRuleCollectionGroupListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.FirewallPolicyRuleCollectionGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_firewall_policy_rule_collection_groups_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_firewall_policy_rule_collection_groups_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("FirewallPolicyRuleCollectionGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups"} # type: ignore +class FirewallPolicyIdpsSignaturesOperations(object): + """FirewallPolicyIdpsSignaturesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.IDPSQueryObject", + **kwargs: Any + ) -> "_models.QueryResults": + """Retrieves the current status of IDPS signatures for the relevant policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: + :type parameters: ~azure.mgmt.network.v2021_08_01.models.IDPSQueryObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QueryResults, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.QueryResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'IDPSQueryObject') + + request = build_firewall_policy_idps_signatures_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('QueryResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures"} # type: ignore + +class FirewallPolicyIdpsSignaturesOverridesOperations(object): + """FirewallPolicyIdpsSignaturesOverridesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def patch( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignaturesOverrides", + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Will update the status of policy's signature overrides for IDPS. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Will contain all properties of the object to put. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SignaturesOverrides') + + request = build_firewall_policy_idps_signatures_overrides_patch_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.patch.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + patch.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default"} # type: ignore + + + @distributed_trace + def put( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignaturesOverrides", + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Will override/create a new signature overrides for the policy's IDPS. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Will contain all properties of the object to put. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SignaturesOverrides') + + request = build_firewall_policy_idps_signatures_overrides_put_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.put.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + put.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default"} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Returns all signatures overrides for a specific policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policy_idps_signatures_overrides_get_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> "_models.SignaturesOverridesList": + """Returns all signatures overrides objects for a specific policy as a list containing a single + value. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverridesList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignaturesOverridesList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverridesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_firewall_policy_idps_signatures_overrides_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverridesList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides"} # type: ignore + +class FirewallPolicyIdpsSignaturesFilterValuesOperations(object): + """FirewallPolicyIdpsSignaturesFilterValuesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignatureOverridesFilterValuesQuery", + **kwargs: Any + ) -> "_models.SignatureOverridesFilterValuesResponse": + """Retrieves the current filter values for the signatures overrides. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SignatureOverridesFilterValuesQuery + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignatureOverridesFilterValuesResponse, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SignatureOverridesFilterValuesResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignatureOverridesFilterValuesResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SignatureOverridesFilterValuesQuery') + + request = build_firewall_policy_idps_signatures_filter_values_list_request( + resource_group_name=resource_group_name, + firewall_policy_name=firewall_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignatureOverridesFilterValuesResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions"} # type: ignore + +class IpAllocationsOperations(object): + """IpAllocationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ip_allocation_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ip_allocations_delete_request_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ip_allocation_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified IpAllocation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + ip_allocation_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.IpAllocation": + """Gets the specified IpAllocation by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpAllocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IpAllocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ip_allocations_get_request( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.IpAllocation", + **kwargs: Any + ) -> "_models.IpAllocation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'IpAllocation') + + request = build_ip_allocations_create_or_update_request_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.IpAllocation", + **kwargs: Any + ) -> LROPoller["_models.IpAllocation"]: + """Creates or updates an IpAllocation in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.IpAllocation + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either IpAllocation or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.IpAllocation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IpAllocation', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.IpAllocation": + """Updates a IpAllocation tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpAllocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IpAllocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_ip_allocations_update_tags_request( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.IpAllocationListResult"]: + """Gets all IpAllocations in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpAllocationListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.IpAllocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ip_allocations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ip_allocations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IpAllocationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.IpAllocationListResult"]: + """Gets all IpAllocations in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpAllocationListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.IpAllocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ip_allocations_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ip_allocations_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IpAllocationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations"} # type: ignore +class IpGroupsOperations(object): + """IpGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + ip_groups_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.IpGroup": + """Gets the specified ipGroups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param expand: Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced + by the IpGroups resource. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IpGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ip_groups_get_request( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.IpGroup", + **kwargs: Any + ) -> "_models.IpGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'IpGroup') + + request = build_ip_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IpGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.IpGroup", + **kwargs: Any + ) -> LROPoller["_models.IpGroup"]: + """Creates or updates an ipGroups in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.IpGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either IpGroup or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.IpGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IpGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + @distributed_trace + def update_groups( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.IpGroup": + """Updates tags of an IpGroups resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IpGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_ip_groups_update_groups_request( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_groups.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_groups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ip_groups_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_ip_groups_delete_request_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + ip_groups_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified ipGroups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.IpGroupListResult"]: + """Gets all IpGroups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.IpGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ip_groups_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ip_groups_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IpGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.IpGroupListResult"]: + """Gets all IpGroups in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.IpGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_ip_groups_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_ip_groups_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IpGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups"} # type: ignore +class LoadBalancersOperations(object): + """LoadBalancersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancers_delete_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + load_balancer_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.LoadBalancer": + """Gets the specified load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LoadBalancer, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LoadBalancer + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancers_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LoadBalancer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: "_models.LoadBalancer", + **kwargs: Any + ) -> "_models.LoadBalancer": + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'LoadBalancer') + + request = build_load_balancers_create_or_update_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('LoadBalancer', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('LoadBalancer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: "_models.LoadBalancer", + **kwargs: Any + ) -> LROPoller["_models.LoadBalancer"]: + """Creates or updates a load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param parameters: Parameters supplied to the create or update load balancer operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.LoadBalancer + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either LoadBalancer or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.LoadBalancer] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('LoadBalancer', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + load_balancer_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.LoadBalancer": + """Updates a load balancer tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LoadBalancer, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LoadBalancer + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_load_balancers_update_tags_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LoadBalancer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.LoadBalancerListResult"]: + """Gets all the load balancers in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancers_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancers_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.LoadBalancerListResult"]: + """Gets all the load balancers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancers_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancers_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers"} # type: ignore + + def _swap_public_ip_addresses_initial( # pylint: disable=inconsistent-return-statements + self, + location: str, + parameters: "_models.LoadBalancerVipSwapRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'LoadBalancerVipSwapRequest') + + request = build_load_balancers_swap_public_ip_addresses_request_initial( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._swap_public_ip_addresses_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _swap_public_ip_addresses_initial.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses"} # type: ignore + + + @distributed_trace + def begin_swap_public_ip_addresses( # pylint: disable=inconsistent-return-statements + self, + location: str, + parameters: "_models.LoadBalancerVipSwapRequest", + **kwargs: Any + ) -> LROPoller[None]: + """Swaps VIPs between two load balancers. + + :param location: The region where load balancers are located at. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.LoadBalancerVipSwapRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._swap_public_ip_addresses_initial( + location=location, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_swap_public_ip_addresses.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses"} # type: ignore + + def _list_inbound_nat_rule_port_mappings_initial( + self, + group_name: str, + load_balancer_name: str, + backend_pool_name: str, + parameters: "_models.QueryInboundNatRulePortMappingRequest", + **kwargs: Any + ) -> "_models.BackendAddressInboundNatRulePortMappings": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressInboundNatRulePortMappings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'QueryInboundNatRulePortMappingRequest') + + request = build_load_balancers_list_inbound_nat_rule_port_mappings_request_initial( + group_name=group_name, + load_balancer_name=load_balancer_name, + backend_pool_name=backend_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._list_inbound_nat_rule_port_mappings_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_inbound_nat_rule_port_mappings_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping"} # type: ignore + + + @distributed_trace + def begin_list_inbound_nat_rule_port_mappings( + self, + group_name: str, + load_balancer_name: str, + backend_pool_name: str, + parameters: "_models.QueryInboundNatRulePortMappingRequest", + **kwargs: Any + ) -> LROPoller["_models.BackendAddressInboundNatRulePortMappings"]: + """List of inbound NAT rule port mappings. + + :param group_name: The name of the resource group. + :type group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_pool_name: The name of the load balancer backend address pool. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.QueryInboundNatRulePortMappingRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackendAddressInboundNatRulePortMappings + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.BackendAddressInboundNatRulePortMappings] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressInboundNatRulePortMappings"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_inbound_nat_rule_port_mappings_initial( + group_name=group_name, + load_balancer_name=load_balancer_name, + backend_pool_name=backend_pool_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_inbound_nat_rule_port_mappings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping"} # type: ignore +class LoadBalancerBackendAddressPoolsOperations(object): + """LoadBalancerBackendAddressPoolsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> Iterable["_models.LoadBalancerBackendAddressPoolListResult"]: + """Gets all the load balancer backed address pools. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerBackendAddressPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_backend_address_pools_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_backend_address_pools_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerBackendAddressPoolListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + **kwargs: Any + ) -> "_models.BackendAddressPool": + """Gets load balancer backend address pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackendAddressPool, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.BackendAddressPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_backend_address_pools_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: "_models.BackendAddressPool", + **kwargs: Any + ) -> "_models.BackendAddressPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BackendAddressPool') + + request = build_load_balancer_backend_address_pools_create_or_update_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: "_models.BackendAddressPool", + **kwargs: Any + ) -> LROPoller["_models.BackendAddressPool"]: + """Creates or updates a load balancer backend address pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.BackendAddressPool + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BackendAddressPool or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.BackendAddressPool] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_backend_address_pools_delete_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified load balancer backend address pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + backend_address_pool_name=backend_address_pool_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"} # type: ignore +class LoadBalancerFrontendIPConfigurationsOperations(object): + """LoadBalancerFrontendIPConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> Iterable["_models.LoadBalancerFrontendIPConfigurationListResult"]: + """Gets all the load balancer frontend IP configurations. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerFrontendIPConfigurationListResult or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerFrontendIPConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerFrontendIPConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_frontend_ip_configurations_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_frontend_ip_configurations_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerFrontendIPConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + load_balancer_name: str, + frontend_ip_configuration_name: str, + **kwargs: Any + ) -> "_models.FrontendIPConfiguration": + """Gets load balancer frontend IP configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param frontend_ip_configuration_name: The name of the frontend IP configuration. + :type frontend_ip_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FrontendIPConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FrontendIPConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendIPConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_frontend_ip_configurations_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + frontend_ip_configuration_name=frontend_ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FrontendIPConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}"} # type: ignore + +class InboundNatRulesOperations(object): + """InboundNatRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> Iterable["_models.InboundNatRuleListResult"]: + """Gets all the inbound NAT rules in a load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either InboundNatRuleListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.InboundNatRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_inbound_nat_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_inbound_nat_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("InboundNatRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_inbound_nat_rules_delete_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified load balancer inbound NAT rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. + :type inbound_nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.InboundNatRule": + """Gets the specified load balancer inbound NAT rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. + :type inbound_nat_rule_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: InboundNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.InboundNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_inbound_nat_rules_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('InboundNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: "_models.InboundNatRule", + **kwargs: Any + ) -> "_models.InboundNatRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(inbound_nat_rule_parameters, 'InboundNatRule') + + request = build_inbound_nat_rules_create_or_update_request_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('InboundNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('InboundNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + inbound_nat_rule_name: str, + inbound_nat_rule_parameters: "_models.InboundNatRule", + **kwargs: Any + ) -> LROPoller["_models.InboundNatRule"]: + """Creates or updates a load balancer inbound NAT rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param inbound_nat_rule_name: The name of the inbound NAT rule. + :type inbound_nat_rule_name: str + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT + rule operation. + :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.InboundNatRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either InboundNatRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.InboundNatRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + inbound_nat_rule_name=inbound_nat_rule_name, + inbound_nat_rule_parameters=inbound_nat_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('InboundNatRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}"} # type: ignore +class LoadBalancerLoadBalancingRulesOperations(object): + """LoadBalancerLoadBalancingRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> Iterable["_models.LoadBalancerLoadBalancingRuleListResult"]: + """Gets all the load balancing rules in a load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerLoadBalancingRuleListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerLoadBalancingRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerLoadBalancingRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_load_balancing_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_load_balancing_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerLoadBalancingRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + load_balancer_name: str, + load_balancing_rule_name: str, + **kwargs: Any + ) -> "_models.LoadBalancingRule": + """Gets the specified load balancer load balancing rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param load_balancing_rule_name: The name of the load balancing rule. + :type load_balancing_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LoadBalancingRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LoadBalancingRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancingRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_load_balancing_rules_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + load_balancing_rule_name=load_balancing_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LoadBalancingRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}"} # type: ignore + +class LoadBalancerOutboundRulesOperations(object): + """LoadBalancerOutboundRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> Iterable["_models.LoadBalancerOutboundRuleListResult"]: + """Gets all the outbound rules in a load balancer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerOutboundRuleListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerOutboundRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerOutboundRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_outbound_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_outbound_rules_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerOutboundRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + load_balancer_name: str, + outbound_rule_name: str, + **kwargs: Any + ) -> "_models.OutboundRule": + """Gets the specified load balancer outbound rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param outbound_rule_name: The name of the outbound rule. + :type outbound_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OutboundRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.OutboundRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_outbound_rules_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + outbound_rule_name=outbound_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OutboundRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}"} # type: ignore + +class LoadBalancerNetworkInterfacesOperations(object): + """LoadBalancerNetworkInterfacesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceListResult"]: + """Gets associated load balancer network interfaces. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_network_interfaces_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_network_interfaces_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces"} # type: ignore +class LoadBalancerProbesOperations(object): + """LoadBalancerProbesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + load_balancer_name: str, + **kwargs: Any + ) -> Iterable["_models.LoadBalancerProbeListResult"]: + """Gets all the load balancer probes. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerProbeListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.LoadBalancerProbeListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerProbeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_load_balancer_probes_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_load_balancer_probes_list_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LoadBalancerProbeListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + load_balancer_name: str, + probe_name: str, + **kwargs: Any + ) -> "_models.Probe": + """Gets load balancer probe. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param probe_name: The name of the probe. + :type probe_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Probe, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.Probe + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Probe"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_load_balancer_probes_get_request( + resource_group_name=resource_group_name, + load_balancer_name=load_balancer_name, + probe_name=probe_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Probe', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}"} # type: ignore + +class NatGatewaysOperations(object): + """NatGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + nat_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_nat_gateways_delete_request_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + nat_gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified nat gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + nat_gateway_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NatGateway": + """Gets the specified nat gateway in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NatGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NatGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_nat_gateways_get_request( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.NatGateway", + **kwargs: Any + ) -> Optional["_models.NatGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NatGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NatGateway') + + request = build_nat_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NatGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.NatGateway", + **kwargs: Any + ) -> LROPoller["_models.NatGateway"]: + """Creates or updates a nat gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NatGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NatGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.NatGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NatGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NatGateway": + """Updates nat gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NatGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NatGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_nat_gateways_update_tags_request( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.NatGatewayListResult"]: + """Gets all the Nat Gateways in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NatGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NatGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_nat_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_nat_gateways_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NatGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.NatGatewayListResult"]: + """Gets all nat gateways in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NatGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NatGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_nat_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_nat_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NatGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways"} # type: ignore +class NetworkInterfaceIPConfigurationsOperations(object): + """NetworkInterfaceIPConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceIPConfigurationListResult"]: + """Get all ip configurations in a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interface_ip_configurations_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interface_ip_configurations_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceIPConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_interface_name: str, + ip_configuration_name: str, + **kwargs: Any + ) -> "_models.NetworkInterfaceIPConfiguration": + """Gets the specified network interface ip configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the ip configuration name. + :type ip_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterfaceIPConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceIPConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interface_ip_configurations_get_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + ip_configuration_name=ip_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}"} # type: ignore + +class NetworkInterfaceLoadBalancersOperations(object): + """NetworkInterfaceLoadBalancersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceLoadBalancerListResult"]: + """List all load balancers in a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceLoadBalancerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceLoadBalancerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interface_load_balancers_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interface_load_balancers_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceLoadBalancerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers"} # type: ignore +class NetworkInterfaceTapConfigurationsOperations(object): + """NetworkInterfaceTapConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interface_tap_configurations_delete_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified tap configuration from the NetworkInterface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + **kwargs: Any + ) -> "_models.NetworkInterfaceTapConfiguration": + """Get the specified tap configuration on a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterfaceTapConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_interface_tap_configurations_get_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: "_models.NetworkInterfaceTapConfiguration", + **kwargs: Any + ) -> "_models.NetworkInterfaceTapConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(tap_configuration_parameters, 'NetworkInterfaceTapConfiguration') + + request = build_network_interface_tap_configurations_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: "_models.NetworkInterfaceTapConfiguration", + **kwargs: Any + ) -> LROPoller["_models.NetworkInterfaceTapConfiguration"]: + """Creates or updates a Tap configuration in the specified NetworkInterface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. + :type tap_configuration_parameters: + ~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NetworkInterfaceTapConfiguration or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfiguration] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + tap_configuration_parameters=tap_configuration_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_interface_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkInterfaceTapConfigurationListResult"]: + """Get all Tap configurations in a network interface. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceTapConfigurationListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkInterfaceTapConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_interface_tap_configurations_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_interface_tap_configurations_list_request( + resource_group_name=resource_group_name, + network_interface_name=network_interface_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkInterfaceTapConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations"} # type: ignore +class NetworkProfilesOperations(object): + """NetworkProfilesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_profile_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_profiles_delete_request_initial( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_profile_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified network profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the NetworkProfile. + :type network_profile_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_profile_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkProfile": + """Gets the specified network profile in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the public IP prefix. + :type network_profile_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_profiles_get_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + network_profile_name: str, + parameters: "_models.NetworkProfile", + **kwargs: Any + ) -> "_models.NetworkProfile": + """Creates or updates a network profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkProfile + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkProfile') + + request = build_network_profiles_create_or_update_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_profile_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkProfile": + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_profiles_update_tags_request( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.NetworkProfileListResult"]: + """Gets all the network profiles in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkProfileListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkProfileListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_profiles_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_profiles_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkProfileListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkProfileListResult"]: + """Gets all network profiles in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkProfileListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkProfileListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_profiles_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_profiles_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkProfileListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles"} # type: ignore +class NetworkSecurityGroupsOperations(object): + """NetworkSecurityGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_security_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_security_groups_delete_request_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_security_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_security_group_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkSecurityGroup": + """Gets the specified network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_security_groups_get_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: "_models.NetworkSecurityGroup", + **kwargs: Any + ) -> "_models.NetworkSecurityGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkSecurityGroup') + + request = build_network_security_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: "_models.NetworkSecurityGroup", + **kwargs: Any + ) -> LROPoller["_models.NetworkSecurityGroup"]: + """Creates or updates a network security group in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param parameters: Parameters supplied to the create or update network security group + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_security_group_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkSecurityGroup": + """Updates a network security group tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_security_groups_update_tags_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.NetworkSecurityGroupListResult"]: + """Gets all network security groups in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_security_groups_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_security_groups_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkSecurityGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkSecurityGroupListResult"]: + """Gets all network security groups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkSecurityGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_security_groups_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_security_groups_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkSecurityGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups"} # type: ignore +class SecurityRulesOperations(object): + """SecurityRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_security_rules_delete_request_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified network security rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. + :type security_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + **kwargs: Any + ) -> "_models.SecurityRule": + """Get the specified network security rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. + :type security_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SecurityRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_security_rules_get_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + security_rule_parameters: "_models.SecurityRule", + **kwargs: Any + ) -> "_models.SecurityRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(security_rule_parameters, 'SecurityRule') + + request = build_security_rules_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_security_group_name: str, + security_rule_name: str, + security_rule_parameters: "_models.SecurityRule", + **kwargs: Any + ) -> LROPoller["_models.SecurityRule"]: + """Creates or updates a security rule in the specified network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param security_rule_name: The name of the security rule. + :type security_rule_name: str + :param security_rule_parameters: Parameters supplied to the create or update network security + rule operation. + :type security_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.SecurityRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SecurityRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.SecurityRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + security_rule_name=security_rule_name, + security_rule_parameters=security_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('SecurityRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_security_group_name: str, + **kwargs: Any + ) -> Iterable["_models.SecurityRuleListResult"]: + """Gets all security rules in a network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityRuleListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.SecurityRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_security_rules_list_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_security_rules_list_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules"} # type: ignore +class DefaultSecurityRulesOperations(object): + """DefaultSecurityRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + network_security_group_name: str, + **kwargs: Any + ) -> Iterable["_models.SecurityRuleListResult"]: + """Gets all default security rules in a network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityRuleListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.SecurityRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_default_security_rules_list_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_default_security_rules_list_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_security_group_name: str, + default_security_rule_name: str, + **kwargs: Any + ) -> "_models.SecurityRule": + """Get the specified default network security rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param default_security_rule_name: The name of the default security rule. + :type default_security_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SecurityRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_default_security_rules_get_request( + resource_group_name=resource_group_name, + network_security_group_name=network_security_group_name, + default_security_rule_name=default_security_rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}"} # type: ignore + +class NetworkVirtualAppliancesOperations(object): + """NetworkVirtualAppliancesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_virtual_appliance_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_virtual_appliances_delete_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_virtual_appliance_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + """Gets the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualAppliance, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_virtual_appliances_get_request( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + """Updates a Network Virtual Appliance. + + :param resource_group_name: The resource group name of Network Virtual Appliance. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance being updated. + :type network_virtual_appliance_name: str + :param parameters: Parameters supplied to Update Network Virtual Appliance Tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualAppliance, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_virtual_appliances_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.NetworkVirtualAppliance", + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkVirtualAppliance') + + request = build_network_virtual_appliances_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.NetworkVirtualAppliance", + **kwargs: Any + ) -> LROPoller["_models.NetworkVirtualAppliance"]: + """Creates or updates the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NetworkVirtualAppliance or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualAppliance] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkVirtualApplianceListResult"]: + """Lists all Network Virtual Appliances in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_virtual_appliances_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_virtual_appliances_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkVirtualApplianceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.NetworkVirtualApplianceListResult"]: + """Gets all Network Virtual Appliances in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_virtual_appliances_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_virtual_appliances_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkVirtualApplianceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances"} # type: ignore +class VirtualApplianceSitesOperations(object): + """VirtualApplianceSitesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_appliance_sites_delete_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified site from a Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + **kwargs: Any + ) -> "_models.VirtualApplianceSite": + """Gets the specified Virtual Appliance Site. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualApplianceSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_appliance_sites_get_request( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + parameters: "_models.VirtualApplianceSite", + **kwargs: Any + ) -> "_models.VirtualApplianceSite": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualApplianceSite') + + request = build_virtual_appliance_sites_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + site_name: str, + parameters: "_models.VirtualApplianceSite", + **kwargs: Any + ) -> LROPoller["_models.VirtualApplianceSite"]: + """Creates or updates the specified Network Virtual Appliance Site. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance Site + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSite + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualApplianceSite or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualApplianceSite] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkVirtualApplianceSiteListResult"]: + """Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceSiteListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSiteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSiteListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_appliance_sites_list_request( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_appliance_sites_list_request( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkVirtualApplianceSiteListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites"} # type: ignore +class VirtualApplianceSkusOperations(object): + """VirtualApplianceSkusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.NetworkVirtualApplianceSkuListResult"]: + """List all SKUs available for a virtual appliance. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceSkuListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSkuListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSkuListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_appliance_skus_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_appliance_skus_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkVirtualApplianceSkuListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus"} # type: ignore + + @distributed_trace + def get( + self, + sku_name: str, + **kwargs: Any + ) -> "_models.NetworkVirtualApplianceSku": + """Retrieves a single available sku for network virtual appliance. + + :param sku_name: Name of the Sku. + :type sku_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualApplianceSku, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkVirtualApplianceSku + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSku"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_appliance_skus_get_request( + subscription_id=self._config.subscription_id, + sku_name=sku_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualApplianceSku', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}"} # type: ignore + +class InboundSecurityRuleOperations(object): + """InboundSecurityRuleOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + parameters: "_models.InboundSecurityRule", + **kwargs: Any + ) -> "_models.InboundSecurityRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundSecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'InboundSecurityRule') + + request = build_inbound_security_rule_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + rule_collection_name=rule_collection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + parameters: "_models.InboundSecurityRule", + **kwargs: Any + ) -> LROPoller["_models.InboundSecurityRule"]: + """Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param rule_collection_name: The name of security rule collection. + :type rule_collection_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance + Inbound Security Rules operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.InboundSecurityRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either InboundSecurityRule or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.InboundSecurityRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundSecurityRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + rule_collection_name=rule_collection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}"} # type: ignore +class NetworkWatchersOperations(object): # pylint: disable=too-many-public-methods + """NetworkWatchersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NetworkWatcher", + **kwargs: Any + ) -> "_models.NetworkWatcher": + """Creates or updates a network watcher in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the network watcher resource. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NetworkWatcher + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkWatcher, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkWatcher + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkWatcher') + + request = build_network_watchers_create_or_update_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkWatcher', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkWatcher', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> "_models.NetworkWatcher": + """Gets the specified network watcher by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkWatcher, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkWatcher + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_watchers_get_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkWatcher', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_network_watchers_delete_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified network watcher resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkWatcher": + """Updates a network watcher tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters supplied to update network watcher tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkWatcher, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.NetworkWatcher + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_network_watchers_update_tags_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkWatcher', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.NetworkWatcherListResult"]: + """Gets all network watchers by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkWatcherListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkWatcherListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_watchers_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_watchers_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkWatcherListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.NetworkWatcherListResult"]: + """Gets all network watchers by subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkWatcherListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.NetworkWatcherListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_network_watchers_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_network_watchers_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkWatcherListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers"} # type: ignore + + @distributed_trace + def get_topology( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.TopologyParameters", + **kwargs: Any + ) -> "_models.Topology": + """Gets the current network topology by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the representation of topology. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TopologyParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Topology, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.Topology + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Topology"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TopologyParameters') + + request = build_network_watchers_get_topology_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.get_topology.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Topology', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_topology.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology"} # type: ignore + + + def _verify_ip_flow_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.VerificationIPFlowParameters", + **kwargs: Any + ) -> "_models.VerificationIPFlowResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VerificationIPFlowParameters') + + request = build_network_watchers_verify_ip_flow_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._verify_ip_flow_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _verify_ip_flow_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify"} # type: ignore + + + @distributed_trace + def begin_verify_ip_flow( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.VerificationIPFlowParameters", + **kwargs: Any + ) -> LROPoller["_models.VerificationIPFlowResult"]: + """Verify IP flow from the specified VM to a location given the currently configured NSG rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the IP flow to be verified. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VerificationIPFlowParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VerificationIPFlowResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VerificationIPFlowResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._verify_ip_flow_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_verify_ip_flow.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify"} # type: ignore + + def _get_next_hop_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NextHopParameters", + **kwargs: Any + ) -> "_models.NextHopResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NextHopParameters') + + request = build_network_watchers_get_next_hop_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_next_hop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NextHopResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('NextHopResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_next_hop_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop"} # type: ignore + + + @distributed_trace + def begin_get_next_hop( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NextHopParameters", + **kwargs: Any + ) -> LROPoller["_models.NextHopResult"]: + """Gets the next hop from the specified VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the source and destination endpoint. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.NextHopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NextHopResult or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.NextHopResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_next_hop_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NextHopResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_next_hop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop"} # type: ignore + + def _get_vm_security_rules_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.SecurityGroupViewParameters", + **kwargs: Any + ) -> "_models.SecurityGroupViewResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SecurityGroupViewParameters') + + request = build_network_watchers_get_vm_security_rules_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_vm_security_rules_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_vm_security_rules_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView"} # type: ignore + + + @distributed_trace + def begin_get_vm_security_rules( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.SecurityGroupViewParameters", + **kwargs: Any + ) -> LROPoller["_models.SecurityGroupViewResult"]: + """Gets the configured and effective security group rules on the specified VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters that define the VM to check security groups for. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SecurityGroupViewParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SecurityGroupViewResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.SecurityGroupViewResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_vm_security_rules_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_vm_security_rules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView"} # type: ignore + + def _get_troubleshooting_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.TroubleshootingParameters", + **kwargs: Any + ) -> "_models.TroubleshootingResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TroubleshootingParameters') + + request = build_network_watchers_get_troubleshooting_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_troubleshooting_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_troubleshooting_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot"} # type: ignore + + + @distributed_trace + def begin_get_troubleshooting( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.TroubleshootingParameters", + **kwargs: Any + ) -> LROPoller["_models.TroubleshootingResult"]: + """Initiate troubleshooting on a specified resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that define the resource to troubleshoot. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TroubleshootingParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either TroubleshootingResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.TroubleshootingResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_troubleshooting_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_troubleshooting.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot"} # type: ignore + + def _get_troubleshooting_result_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.QueryTroubleshootingParameters", + **kwargs: Any + ) -> "_models.TroubleshootingResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'QueryTroubleshootingParameters') + + request = build_network_watchers_get_troubleshooting_result_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_troubleshooting_result_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_troubleshooting_result_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult"} # type: ignore + + + @distributed_trace + def begin_get_troubleshooting_result( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.QueryTroubleshootingParameters", + **kwargs: Any + ) -> LROPoller["_models.TroubleshootingResult"]: + """Get the last completed troubleshooting result on a specified resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that define the resource to query the troubleshooting result. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.QueryTroubleshootingParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either TroubleshootingResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.TroubleshootingResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_troubleshooting_result_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('TroubleshootingResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_troubleshooting_result.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult"} # type: ignore + + def _set_flow_log_configuration_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.FlowLogInformation", + **kwargs: Any + ) -> "_models.FlowLogInformation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FlowLogInformation') + + request = build_network_watchers_set_flow_log_configuration_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._set_flow_log_configuration_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _set_flow_log_configuration_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog"} # type: ignore + + + @distributed_trace + def begin_set_flow_log_configuration( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.FlowLogInformation", + **kwargs: Any + ) -> LROPoller["_models.FlowLogInformation"]: + """Configures flow log and traffic analytics (optional) on a specified resource. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that define the configuration of flow log. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FlowLogInformation + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either FlowLogInformation or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.FlowLogInformation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._set_flow_log_configuration_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_set_flow_log_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog"} # type: ignore + + def _get_flow_log_status_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.FlowLogStatusParameters", + **kwargs: Any + ) -> "_models.FlowLogInformation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FlowLogStatusParameters') + + request = build_network_watchers_get_flow_log_status_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_flow_log_status_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_flow_log_status_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus"} # type: ignore + + + @distributed_trace + def begin_get_flow_log_status( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.FlowLogStatusParameters", + **kwargs: Any + ) -> LROPoller["_models.FlowLogInformation"]: + """Queries status of flow log and traffic analytics (optional) on a specified resource. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that define a resource to query flow log and traffic analytics + (optional) status. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FlowLogStatusParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either FlowLogInformation or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.FlowLogInformation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_flow_log_status_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FlowLogInformation', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_flow_log_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus"} # type: ignore + + def _check_connectivity_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.ConnectivityParameters", + **kwargs: Any + ) -> "_models.ConnectivityInformation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ConnectivityParameters') + + request = build_network_watchers_check_connectivity_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._check_connectivity_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectivityInformation', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConnectivityInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _check_connectivity_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck"} # type: ignore + + + @distributed_trace + def begin_check_connectivity( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.ConnectivityParameters", + **kwargs: Any + ) -> LROPoller["_models.ConnectivityInformation"]: + """Verifies the possibility of establishing a direct TCP connection from a virtual machine to a + given endpoint including another VM or an arbitrary remote server. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that determine how the connectivity check will be performed. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ConnectivityParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ConnectivityInformation or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectivityInformation] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._check_connectivity_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectivityInformation', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_check_connectivity.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck"} # type: ignore + + def _get_azure_reachability_report_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.AzureReachabilityReportParameters", + **kwargs: Any + ) -> "_models.AzureReachabilityReport": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureReachabilityReport"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'AzureReachabilityReportParameters') + + request = build_network_watchers_get_azure_reachability_report_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_azure_reachability_report_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_azure_reachability_report_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport"} # type: ignore + + + @distributed_trace + def begin_get_azure_reachability_report( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.AzureReachabilityReportParameters", + **kwargs: Any + ) -> LROPoller["_models.AzureReachabilityReport"]: + """NOTE: This feature is currently in preview and still being tested for stability. Gets the + relative latency score for internet service providers from a specified location to Azure + regions. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that determine Azure reachability report configuration. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReportParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AzureReachabilityReport or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.AzureReachabilityReport] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureReachabilityReport"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_azure_reachability_report_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_azure_reachability_report.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport"} # type: ignore + + def _list_available_providers_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.AvailableProvidersListParameters", + **kwargs: Any + ) -> "_models.AvailableProvidersList": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableProvidersList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'AvailableProvidersListParameters') + + request = build_network_watchers_list_available_providers_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._list_available_providers_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_available_providers_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList"} # type: ignore + + + @distributed_trace + def begin_list_available_providers( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.AvailableProvidersListParameters", + **kwargs: Any + ) -> LROPoller["_models.AvailableProvidersList"]: + """NOTE: This feature is currently in preview and still being tested for stability. Lists all + available internet service providers for a specified Azure region. + + :param resource_group_name: The name of the network watcher resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher resource. + :type network_watcher_name: str + :param parameters: Parameters that scope the list of available providers. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.AvailableProvidersListParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either AvailableProvidersList or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.AvailableProvidersList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableProvidersList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_available_providers_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_available_providers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList"} # type: ignore + + def _get_network_configuration_diagnostic_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NetworkConfigurationDiagnosticParameters", + **kwargs: Any + ) -> "_models.NetworkConfigurationDiagnosticResponse": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkConfigurationDiagnosticResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'NetworkConfigurationDiagnosticParameters') + + request = build_network_watchers_get_network_configuration_diagnostic_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_network_configuration_diagnostic_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_network_configuration_diagnostic_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic"} # type: ignore + + + @distributed_trace + def begin_get_network_configuration_diagnostic( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NetworkConfigurationDiagnosticParameters", + **kwargs: Any + ) -> LROPoller["_models.NetworkConfigurationDiagnosticResponse"]: + """Gets Network Configuration Diagnostic data to help customers understand and debug network + behavior. It provides detailed information on what security rules were applied to a specified + traffic flow and the result of evaluating these rules. Customers must provide details of a flow + like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, + the rules evaluated for the specified flow and the evaluation results. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters to get network configuration diagnostic. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either NetworkConfigurationDiagnosticResponse or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.NetworkConfigurationDiagnosticResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkConfigurationDiagnosticResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_network_configuration_diagnostic_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_network_configuration_diagnostic.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic"} # type: ignore +class PacketCapturesOperations(object): + """PacketCapturesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_initial( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + parameters: "_models.PacketCapture", + **kwargs: Any + ) -> "_models.PacketCaptureResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PacketCapture') + + request = build_packet_captures_create_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + parameters: "_models.PacketCapture", + **kwargs: Any + ) -> LROPoller["_models.PacketCaptureResult"]: + """Create and start a packet capture on the specified VM. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param packet_capture_name: The name of the packet capture session. + :type packet_capture_name: str + :param parameters: Parameters that define the create packet capture operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PacketCapture + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PacketCaptureResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PacketCaptureResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> "_models.PacketCaptureResult": + """Gets a packet capture session by name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param packet_capture_name: The name of the packet capture session. + :type packet_capture_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PacketCaptureResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PacketCaptureResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_packet_captures_get_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_packet_captures_delete_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified packet capture session. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param packet_capture_name: The name of the packet capture session. + :type packet_capture_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}"} # type: ignore + + def _stop_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_packet_captures_stop_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop"} # type: ignore + + + @distributed_trace + def begin_stop( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Stops a specified packet capture session. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param packet_capture_name: The name of the packet capture session. + :type packet_capture_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop"} # type: ignore + + def _get_status_initial( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> "_models.PacketCaptureQueryStatusResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_packet_captures_get_status_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_status_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_status_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus"} # type: ignore + + + @distributed_trace + def begin_get_status( + self, + resource_group_name: str, + network_watcher_name: str, + packet_capture_name: str, + **kwargs: Any + ) -> LROPoller["_models.PacketCaptureQueryStatusResult"]: + """Query the status of a running packet capture session. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param packet_capture_name: The name given to the packet capture session. + :type packet_capture_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PacketCaptureQueryStatusResult or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PacketCaptureQueryStatusResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_status_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + packet_capture_name=packet_capture_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> Iterable["_models.PacketCaptureListResult"]: + """Lists all packet capture sessions within the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PacketCaptureListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PacketCaptureListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_packet_captures_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_packet_captures_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PacketCaptureListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures"} # type: ignore +class ConnectionMonitorsOperations(object): + """ConnectionMonitorsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + parameters: "_models.ConnectionMonitor", + migrate: Optional[str] = None, + **kwargs: Any + ) -> "_models.ConnectionMonitorResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ConnectionMonitor') + + request = build_connection_monitors_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + migrate=migrate, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + parameters: "_models.ConnectionMonitor", + migrate: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.ConnectionMonitorResult"]: + """Create or update a connection monitor. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :param parameters: Parameters that define the operation to create a connection monitor. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitor + :param migrate: Value indicating whether connection monitor V1 should be migrated to V2 format. + Default value is None. + :type migrate: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ConnectionMonitorResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + parameters=parameters, + migrate=migrate, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> "_models.ConnectionMonitorResult": + """Gets a connection monitor by name. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionMonitorResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_get_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_delete_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified connection monitor. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ConnectionMonitorResult": + """Update tags of the specified connection monitor. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :param parameters: Parameters supplied to update connection monitor tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionMonitorResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_connection_monitors_update_tags_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}"} # type: ignore + + + def _stop_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_stop_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._stop_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _stop_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop"} # type: ignore + + + @distributed_trace + def begin_stop( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Stops the specified connection monitor. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop"} # type: ignore + + def _start_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_start_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._start_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _start_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start"} # type: ignore + + + @distributed_trace + def begin_start( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Starts the specified connection monitor. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start"} # type: ignore + + def _query_initial( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> "_models.ConnectionMonitorQueryResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorQueryResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_connection_monitors_query_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._query_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionMonitorQueryResult', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ConnectionMonitorQueryResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _query_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query"} # type: ignore + + + @distributed_trace + def begin_query( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + **kwargs: Any + ) -> LROPoller["_models.ConnectionMonitorQueryResult"]: + """Query a snapshot of the most recent connection states. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :param connection_monitor_name: The name given to the connection monitor. + :type connection_monitor_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ConnectionMonitorQueryResult or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorQueryResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorQueryResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._query_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + connection_monitor_name=connection_monitor_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectionMonitorQueryResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_query.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> Iterable["_models.ConnectionMonitorListResult"]: + """Lists all connection monitors for the specified Network Watcher. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConnectionMonitorListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ConnectionMonitorListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_connection_monitors_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_connection_monitors_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ConnectionMonitorListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors"} # type: ignore +class FlowLogsOperations(object): + """FlowLogsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.FlowLog", + **kwargs: Any + ) -> "_models.FlowLog": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'FlowLog') + + request = build_flow_logs_create_or_update_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('FlowLog', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('FlowLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.FlowLog", + **kwargs: Any + ) -> LROPoller["_models.FlowLog"]: + """Create or update a flow log for the specified network security group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log. + :type flow_log_name: str + :param parameters: Parameters that define the create or update flow log resource. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.FlowLog + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either FlowLog or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.FlowLog] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('FlowLog', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.FlowLog": + """Update tags of the specified flow log. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log. + :type flow_log_name: str + :param parameters: Parameters supplied to update flow log tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FlowLog, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FlowLog + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_flow_logs_update_tags_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FlowLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + + @distributed_trace + def get( + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + **kwargs: Any + ) -> "_models.FlowLog": + """Gets a flow log resource by name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log resource. + :type flow_log_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FlowLog, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.FlowLog + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_flow_logs_get_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FlowLog', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_flow_logs_delete_request_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + network_watcher_name: str, + flow_log_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified flow log resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log resource. + :type flow_log_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + network_watcher_name: str, + **kwargs: Any + ) -> Iterable["_models.FlowLogListResult"]: + """Lists all flow log resources for the specified Network Watcher. + + :param resource_group_name: The name of the resource group containing Network Watcher. + :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either FlowLogListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.FlowLogListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_flow_logs_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_flow_logs_list_request( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("FlowLogListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs"} # type: ignore +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.OperationListResult"]: + """Lists all of the available Network Rest API operations. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_operations_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_operations_list_request( + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/providers/Microsoft.Network/operations"} # type: ignore +class PrivateEndpointsOperations(object): + """PrivateEndpointsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + private_endpoint_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_endpoints_delete_request_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + private_endpoint_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified private endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + private_endpoint_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PrivateEndpoint": + """Gets the specified private endpoint by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpoint, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_endpoints_get_request( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + private_endpoint_name: str, + parameters: "_models.PrivateEndpoint", + **kwargs: Any + ) -> "_models.PrivateEndpoint": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateEndpoint') + + request = build_private_endpoints_create_or_update_request_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + private_endpoint_name: str, + parameters: "_models.PrivateEndpoint", + **kwargs: Any + ) -> LROPoller["_models.PrivateEndpoint"]: + """Creates or updates an private endpoint in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param parameters: Parameters supplied to the create or update private endpoint operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateEndpoint or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateEndpoint] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.PrivateEndpointListResult"]: + """Gets all private endpoints in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_endpoints_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_endpoints_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints"} # type: ignore + + @distributed_trace + def list_by_subscription( + self, + **kwargs: Any + ) -> Iterable["_models.PrivateEndpointListResult"]: + """Gets all private endpoints in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_endpoints_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_endpoints_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints"} # type: ignore +class AvailablePrivateEndpointTypesOperations(object): + """AvailablePrivateEndpointTypesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> Iterable["_models.AvailablePrivateEndpointTypesResult"]: + """Returns all of the resource types that can be linked to a Private Endpoint in this subscription + in this region. + + :param location: The location of the domain name. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailablePrivateEndpointTypesResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailablePrivateEndpointTypesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailablePrivateEndpointTypesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_private_endpoint_types_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_private_endpoint_types_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AvailablePrivateEndpointTypesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + location: str, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.AvailablePrivateEndpointTypesResult"]: + """Returns all of the resource types that can be linked to a Private Endpoint in this subscription + in this region. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailablePrivateEndpointTypesResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AvailablePrivateEndpointTypesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailablePrivateEndpointTypesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_available_private_endpoint_types_list_by_resource_group_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_available_private_endpoint_types_list_by_resource_group_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AvailablePrivateEndpointTypesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes"} # type: ignore +class PrivateDnsZoneGroupsOperations(object): + """PrivateDnsZoneGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_dns_zone_groups_delete_request_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified private dns zone group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> "_models.PrivateDnsZoneGroup": + """Gets the private dns zone group resource by specified private dns zone group name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateDnsZoneGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_dns_zone_groups_get_request( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + parameters: "_models.PrivateDnsZoneGroup", + **kwargs: Any + ) -> "_models.PrivateDnsZoneGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateDnsZoneGroup') + + request = build_private_dns_zone_groups_create_or_update_request_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + parameters: "_models.PrivateDnsZoneGroup", + **kwargs: Any + ) -> LROPoller["_models.PrivateDnsZoneGroup"]: + """Creates or updates a private dns zone group in the specified private endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :param parameters: Parameters supplied to the create or update private dns zone group + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateDnsZoneGroup or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}"} # type: ignore + + @distributed_trace + def list( + self, + private_endpoint_name: str, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.PrivateDnsZoneGroupListResult"]: + """Gets all private dns zone groups in a private endpoint. + + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateDnsZoneGroupListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateDnsZoneGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_dns_zone_groups_list_request( + private_endpoint_name=private_endpoint_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_dns_zone_groups_list_request( + private_endpoint_name=private_endpoint_name, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateDnsZoneGroupListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups"} # type: ignore +class PrivateLinkServicesOperations(object): + """PrivateLinkServicesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_link_services_delete_request_initial( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified private link service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_name=service_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + service_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PrivateLinkService": + """Gets the specified private link service by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkService, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateLinkService + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_link_services_get_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + service_name: str, + parameters: "_models.PrivateLinkService", + **kwargs: Any + ) -> "_models.PrivateLinkService": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateLinkService') + + request = build_private_link_services_create_or_update_request_initial( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkService', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateLinkService', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_name: str, + parameters: "_models.PrivateLinkService", + **kwargs: Any + ) -> LROPoller["_models.PrivateLinkService"]: + """Creates or updates an private link service in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param parameters: Parameters supplied to the create or update private link service operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PrivateLinkService + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateLinkService or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateLinkService] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_name=service_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateLinkService', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.PrivateLinkServiceListResult"]: + """Gets all private link services in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkServiceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateLinkServiceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices"} # type: ignore + + @distributed_trace + def list_by_subscription( + self, + **kwargs: Any + ) -> Iterable["_models.PrivateLinkServiceListResult"]: + """Gets all private link service in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkServiceListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateLinkServiceListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices"} # type: ignore + + @distributed_trace + def get_private_endpoint_connection( + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Get the specific private end point connection by specific private link service in the resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_link_services_get_private_endpoint_connection_request( + resource_group_name=resource_group_name, + service_name=service_name, + pe_connection_name=pe_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get_private_endpoint_connection.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}"} # type: ignore + + + @distributed_trace + def update_private_endpoint_connection( + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Approve or reject private end point connection for a private link service in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :param parameters: Parameters supplied to approve or reject the private end point connection. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PrivateEndpointConnection') + + request = build_private_link_services_update_private_endpoint_connection_request( + resource_group_name=resource_group_name, + service_name=service_name, + pe_connection_name=pe_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_private_endpoint_connection.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}"} # type: ignore + + + def _delete_private_endpoint_connection_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_private_link_services_delete_private_endpoint_connection_request_initial( + resource_group_name=resource_group_name, + service_name=service_name, + pe_connection_name=pe_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_private_endpoint_connection_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}"} # type: ignore + + + @distributed_trace + def begin_delete_private_endpoint_connection( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Delete private end point connection for a private link service in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + service_name=service_name, + pe_connection_name=pe_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}"} # type: ignore + + @distributed_trace + def list_private_endpoint_connections( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> Iterable["_models.PrivateEndpointConnectionListResult"]: + """Gets all private end point connections for a specific private link service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_private_endpoint_connections_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_private_endpoint_connections.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_private_endpoint_connections_request( + resource_group_name=resource_group_name, + service_name=service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PrivateEndpointConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_private_endpoint_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections"} # type: ignore + + def _check_private_link_service_visibility_initial( + self, + location: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", + **kwargs: Any + ) -> Optional["_models.PrivateLinkServiceVisibility"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateLinkServiceVisibility"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CheckPrivateLinkServiceVisibilityRequest') + + request = build_private_link_services_check_private_link_service_visibility_request_initial( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._check_private_link_service_visibility_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _check_private_link_service_visibility_initial.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility"} # type: ignore + + + @distributed_trace + def begin_check_private_link_service_visibility( + self, + location: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", + **kwargs: Any + ) -> LROPoller["_models.PrivateLinkServiceVisibility"]: + """Checks whether the subscription is visible to private link service. + + :param location: The location of the domain name. + :type location: str + :param parameters: The request body of CheckPrivateLinkService API call. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.CheckPrivateLinkServiceVisibilityRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateLinkServiceVisibility or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceVisibility] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceVisibility"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._check_private_link_service_visibility_initial( + location=location, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_check_private_link_service_visibility.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility"} # type: ignore + + def _check_private_link_service_visibility_by_resource_group_initial( + self, + location: str, + resource_group_name: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", + **kwargs: Any + ) -> Optional["_models.PrivateLinkServiceVisibility"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateLinkServiceVisibility"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'CheckPrivateLinkServiceVisibilityRequest') + + request = build_private_link_services_check_private_link_service_visibility_by_resource_group_request_initial( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._check_private_link_service_visibility_by_resource_group_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _check_private_link_service_visibility_by_resource_group_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility"} # type: ignore + + + @distributed_trace + def begin_check_private_link_service_visibility_by_resource_group( + self, + location: str, + resource_group_name: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", + **kwargs: Any + ) -> LROPoller["_models.PrivateLinkServiceVisibility"]: + """Checks whether the subscription is visible to private link service in the specified resource + group. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param parameters: The request body of CheckPrivateLinkService API call. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.CheckPrivateLinkServiceVisibilityRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateLinkServiceVisibility or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PrivateLinkServiceVisibility] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceVisibility"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._check_private_link_service_visibility_by_resource_group_initial( + location=location, + resource_group_name=resource_group_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_check_private_link_service_visibility_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility"} # type: ignore + + @distributed_trace + def list_auto_approved_private_link_services( + self, + location: str, + **kwargs: Any + ) -> Iterable["_models.AutoApprovedPrivateLinkServicesResult"]: + """Returns all of the private link service ids that can be linked to a Private Endpoint with auto + approved in this subscription in this region. + + :param location: The location of the domain name. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AutoApprovedPrivateLinkServicesResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AutoApprovedPrivateLinkServicesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoApprovedPrivateLinkServicesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_auto_approved_private_link_services_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_auto_approved_private_link_services.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_auto_approved_private_link_services_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AutoApprovedPrivateLinkServicesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_auto_approved_private_link_services.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices"} # type: ignore + + @distributed_trace + def list_auto_approved_private_link_services_by_resource_group( + self, + location: str, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.AutoApprovedPrivateLinkServicesResult"]: + """Returns all of the private link service ids that can be linked to a Private Endpoint with auto + approved in this subscription in this region. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AutoApprovedPrivateLinkServicesResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.AutoApprovedPrivateLinkServicesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoApprovedPrivateLinkServicesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_private_link_services_list_auto_approved_private_link_services_by_resource_group_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_auto_approved_private_link_services_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_private_link_services_list_auto_approved_private_link_services_by_resource_group_request( + location=location, + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AutoApprovedPrivateLinkServicesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_auto_approved_private_link_services_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices"} # type: ignore +class PublicIPPrefixesOperations(object): + """PublicIPPrefixesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + public_ip_prefix_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_prefixes_delete_request_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + public_ip_prefix_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified public IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the PublicIpPrefix. + :type public_ip_prefix_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + public_ip_prefix_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPPrefix": + """Gets the specified public IP prefix in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_public_ip_prefixes_get_request( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.PublicIPPrefix", + **kwargs: Any + ) -> "_models.PublicIPPrefix": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'PublicIPPrefix') + + request = build_public_ip_prefixes_create_or_update_request_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.PublicIPPrefix", + **kwargs: Any + ) -> LROPoller["_models.PublicIPPrefix"]: + """Creates or updates a static or dynamic public IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param parameters: Parameters supplied to the create or update public IP prefix operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PublicIPPrefix or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.PublicIPPrefix": + """Updates public IP prefix tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param parameters: Parameters supplied to update public IP prefix tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.PublicIPPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_public_ip_prefixes_update_tags_request( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.PublicIPPrefixListResult"]: + """Gets all the public IP prefixes in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPPrefixListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_prefixes_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_prefixes_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPPrefixListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.PublicIPPrefixListResult"]: + """Gets all public IP prefixes in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPPrefixListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.PublicIPPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_public_ip_prefixes_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_public_ip_prefixes_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("PublicIPPrefixListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes"} # type: ignore +class RouteFiltersOperations(object): + """RouteFiltersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_filter_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_filters_delete_request_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_filter_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + route_filter_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.RouteFilter": + """Gets the specified route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param expand: Expands referenced express route bgp peering resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteFilter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteFilter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_filters_get_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteFilter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + route_filter_name: str, + route_filter_parameters: "_models.RouteFilter", + **kwargs: Any + ) -> "_models.RouteFilter": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(route_filter_parameters, 'RouteFilter') + + request = build_route_filters_create_or_update_request_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RouteFilter', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RouteFilter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + route_filter_name: str, + route_filter_parameters: "_models.RouteFilter", + **kwargs: Any + ) -> LROPoller["_models.RouteFilter"]: + """Creates or updates a route filter in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param route_filter_parameters: Parameters supplied to the create or update route filter + operation. + :type route_filter_parameters: ~azure.mgmt.network.v2021_08_01.models.RouteFilter + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RouteFilter or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.RouteFilter] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + route_filter_parameters=route_filter_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('RouteFilter', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + route_filter_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.RouteFilter": + """Updates tags of a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param parameters: Parameters supplied to update route filter tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteFilter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteFilter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_route_filters_update_tags_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteFilter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}"} # type: ignore + + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.RouteFilterListResult"]: + """Gets all route filters in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteFilterListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteFilterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_filters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_filters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("RouteFilterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.RouteFilterListResult"]: + """Gets all route filters in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteFilterListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteFilterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_filters_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_filters_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("RouteFilterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters"} # type: ignore +class RouteFilterRulesOperations(object): + """RouteFilterRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_filter_rules_delete_request_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified rule from a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.RouteFilterRule": + """Gets the specified rule from a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteFilterRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteFilterRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_filter_rules_get_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + route_filter_rule_parameters: "_models.RouteFilterRule", + **kwargs: Any + ) -> "_models.RouteFilterRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') + + request = build_route_filter_rules_create_or_update_request_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + route_filter_name: str, + rule_name: str, + route_filter_rule_parameters: "_models.RouteFilterRule", + **kwargs: Any + ) -> LROPoller["_models.RouteFilterRule"]: + """Creates or updates a route in the specified route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the route filter rule. + :type rule_name: str + :param route_filter_rule_parameters: Parameters supplied to the create or update route filter + rule operation. + :type route_filter_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.RouteFilterRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RouteFilterRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.RouteFilterRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + route_filter_rule_parameters=route_filter_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}"} # type: ignore + + @distributed_trace + def list_by_route_filter( + self, + resource_group_name: str, + route_filter_name: str, + **kwargs: Any + ) -> Iterable["_models.RouteFilterRuleListResult"]: + """Gets all RouteFilterRules in a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteFilterRuleListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteFilterRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_filter_rules_list_by_route_filter_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_route_filter.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_filter_rules_list_by_route_filter_request( + resource_group_name=resource_group_name, + route_filter_name=route_filter_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("RouteFilterRuleListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_route_filter.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules"} # type: ignore +class RouteTablesOperations(object): + """RouteTablesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_table_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_tables_delete_request_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_table_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + route_table_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.RouteTable": + """Gets the specified route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteTable + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_route_tables_get_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + route_table_name: str, + parameters: "_models.RouteTable", + **kwargs: Any + ) -> "_models.RouteTable": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'RouteTable') + + request = build_route_tables_create_or_update_request_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RouteTable', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + route_table_name: str, + parameters: "_models.RouteTable", + **kwargs: Any + ) -> LROPoller["_models.RouteTable"]: + """Create or updates a route table in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param parameters: Parameters supplied to the create or update route table operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.RouteTable + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RouteTable or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.RouteTable] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('RouteTable', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + route_table_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.RouteTable": + """Updates a route table tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param parameters: Parameters supplied to update route table tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RouteTable + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_route_tables_update_tags_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.RouteTableListResult"]: + """Gets all route tables in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteTableListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_tables_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_tables_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("RouteTableListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.RouteTableListResult"]: + """Gets all route tables in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteTableListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteTableListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_route_tables_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_route_tables_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("RouteTableListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables"} # type: ignore +class RoutesOperations(object): + """RoutesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_routes_delete_request_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified route from a route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param route_name: The name of the route. + :type route_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + **kwargs: Any + ) -> "_models.Route": + """Gets the specified route from a route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param route_name: The name of the route. + :type route_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Route, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.Route + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_routes_get_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Route', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + route_parameters: "_models.Route", + **kwargs: Any + ) -> "_models.Route": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(route_parameters, 'Route') + + request = build_routes_create_or_update_request_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Route', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Route', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + route_table_name: str, + route_name: str, + route_parameters: "_models.Route", + **kwargs: Any + ) -> LROPoller["_models.Route"]: + """Creates or updates a route in the specified route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param route_name: The name of the route. + :type route_name: str + :param route_parameters: Parameters supplied to the create or update route operation. + :type route_parameters: ~azure.mgmt.network.v2021_08_01.models.Route + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either Route or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.Route] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + route_name=route_name, + route_parameters=route_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('Route', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + route_table_name: str, + **kwargs: Any + ) -> Iterable["_models.RouteListResult"]: + """Gets all routes in a route table. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RouteListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.RouteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_routes_list_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_routes_list_request( + resource_group_name=resource_group_name, + route_table_name=route_table_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("RouteListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes"} # type: ignore +class SecurityPartnerProvidersOperations(object): + """SecurityPartnerProvidersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + security_partner_provider_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_security_partner_providers_delete_request_initial( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + security_partner_provider_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified Security Partner Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + security_partner_provider_name: str, + **kwargs: Any + ) -> "_models.SecurityPartnerProvider": + """Gets the specified Security Partner Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityPartnerProvider, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_security_partner_providers_get_request( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + security_partner_provider_name: str, + parameters: "_models.SecurityPartnerProvider", + **kwargs: Any + ) -> "_models.SecurityPartnerProvider": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'SecurityPartnerProvider') + + request = build_security_partner_providers_create_or_update_request_initial( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + security_partner_provider_name: str, + parameters: "_models.SecurityPartnerProvider", + **kwargs: Any + ) -> LROPoller["_models.SecurityPartnerProvider"]: + """Creates or updates the specified Security Partner Provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :param parameters: Parameters supplied to the create or update Security Partner Provider + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either SecurityPartnerProvider or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + security_partner_provider_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.SecurityPartnerProvider": + """Updates tags of a Security Partner Provider resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :param parameters: Parameters supplied to update Security Partner Provider tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityPartnerProvider, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProvider + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_security_partner_providers_update_tags_request( + resource_group_name=resource_group_name, + security_partner_provider_name=security_partner_provider_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}"} # type: ignore + + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.SecurityPartnerProviderListResult"]: + """Lists all Security Partner Providers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityPartnerProviderListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProviderListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProviderListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_security_partner_providers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_security_partner_providers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityPartnerProviderListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.SecurityPartnerProviderListResult"]: + """Gets all the Security Partner Providers in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityPartnerProviderListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.SecurityPartnerProviderListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProviderListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_security_partner_providers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_security_partner_providers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SecurityPartnerProviderListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders"} # type: ignore +class BgpServiceCommunitiesOperations(object): + """BgpServiceCommunitiesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.BgpServiceCommunityListResult"]: + """Gets all the available bgp service communities. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BgpServiceCommunityListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.BgpServiceCommunityListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpServiceCommunityListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_bgp_service_communities_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_bgp_service_communities_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BgpServiceCommunityListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities"} # type: ignore +class ServiceEndpointPoliciesOperations(object): + """ServiceEndpointPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_endpoint_policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_endpoint_policies_delete_request_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_endpoint_policy_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.ServiceEndpointPolicy": + """Gets the specified service Endpoint Policies in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_endpoint_policies_get_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + parameters: "_models.ServiceEndpointPolicy", + **kwargs: Any + ) -> "_models.ServiceEndpointPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ServiceEndpointPolicy') + + request = build_service_endpoint_policies_create_or_update_request_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + parameters: "_models.ServiceEndpointPolicy", + **kwargs: Any + ) -> LROPoller["_models.ServiceEndpointPolicy"]: + """Creates or updates a service Endpoint Policies. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param parameters: Parameters supplied to the create or update service endpoint policy + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ServiceEndpointPolicy or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ServiceEndpointPolicy": + """Updates tags of a service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param parameters: Parameters supplied to update service endpoint policy tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_service_endpoint_policies_update_tags_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}"} # type: ignore + + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ServiceEndpointPolicyListResult"]: + """Gets all the service endpoint policies in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceEndpointPolicyListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_service_endpoint_policies_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_service_endpoint_policies_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ServiceEndpointPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ServiceEndpointPolicyListResult"]: + """Gets all service endpoint Policies in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceEndpointPolicyListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_service_endpoint_policies_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_service_endpoint_policies_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ServiceEndpointPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies"} # type: ignore +class ServiceEndpointPolicyDefinitionsOperations(object): + """ServiceEndpointPolicyDefinitionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_endpoint_policy_definitions_delete_request_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified ServiceEndpoint policy definitions. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the Service Endpoint Policy. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition. + :type service_endpoint_policy_definition_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> "_models.ServiceEndpointPolicyDefinition": + """Get the specified service endpoint policy definitions from service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy name. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition name. + :type service_endpoint_policy_definition_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicyDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_endpoint_policy_definitions_get_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + service_endpoint_policy_definitions: "_models.ServiceEndpointPolicyDefinition", + **kwargs: Any + ) -> "_models.ServiceEndpointPolicyDefinition": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(service_endpoint_policy_definitions, 'ServiceEndpointPolicyDefinition') + + request = build_service_endpoint_policy_definitions_create_or_update_request_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + service_endpoint_policy_definitions: "_models.ServiceEndpointPolicyDefinition", + **kwargs: Any + ) -> LROPoller["_models.ServiceEndpointPolicyDefinition"]: + """Creates or updates a service endpoint policy definition in the specified service endpoint + policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition name. + :type service_endpoint_policy_definition_name: str + :param service_endpoint_policy_definitions: Parameters supplied to the create or update service + endpoint policy operation. + :type service_endpoint_policy_definitions: + ~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ServiceEndpointPolicyDefinition or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinition] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + service_endpoint_policy_definitions=service_endpoint_policy_definitions, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + **kwargs: Any + ) -> Iterable["_models.ServiceEndpointPolicyDefinitionListResult"]: + """Gets all service endpoint policy definitions in a service end point policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy name. + :type service_endpoint_policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceEndpointPolicyDefinitionListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ServiceEndpointPolicyDefinitionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinitionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_service_endpoint_policy_definitions_list_by_resource_group_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_service_endpoint_policy_definitions_list_by_resource_group_request( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ServiceEndpointPolicyDefinitionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions"} # type: ignore +class ServiceTagsOperations(object): + """ServiceTagsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> "_models.ServiceTagsListResult": + """Gets a list of service tag information resources. + + :param location: The location that will be used as a reference for version (not as a filter + based on location, you will get the list of service tags with prefix details across all regions + but limited to the cloud that your subscription belongs to). + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceTagsListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceTagsListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTagsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_tags_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceTagsListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags"} # type: ignore + +class ServiceTagInformationOperations(object): + """ServiceTagInformationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + no_address_prefixes: Optional[bool] = None, + tag_name: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.ServiceTagInformationListResult"]: + """Gets a list of service tag information resources with pagination. + + :param location: The location that will be used as a reference for cloud (not as a filter based + on location, you will get the list of service tags with prefix details across all regions but + limited to the cloud that your subscription belongs to). + :type location: str + :param no_address_prefixes: Do not return address prefixes for the tag(s). Default value is + None. + :type no_address_prefixes: bool + :param tag_name: Return tag information for a particular tag. Default value is None. + :type tag_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceTagInformationListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ServiceTagInformationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTagInformationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_service_tag_information_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + no_address_prefixes=no_address_prefixes, + tag_name=tag_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_service_tag_information_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + no_address_prefixes=no_address_prefixes, + tag_name=tag_name, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ServiceTagInformationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails"} # type: ignore +class UsagesOperations(object): + """UsagesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + location: str, + **kwargs: Any + ) -> Iterable["_models.UsagesListResult"]: + """List network usages for a subscription. + + :param location: The location where resource usage is queried. + :type location: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UsagesListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.UsagesListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_usages_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_usages_list_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("UsagesListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages"} # type: ignore +class VirtualNetworksOperations(object): + """VirtualNetworksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_networks_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_network_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.VirtualNetwork": + """Gets the specified virtual network by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_networks_get_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.VirtualNetwork", + **kwargs: Any + ) -> "_models.VirtualNetwork": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualNetwork') + + request = build_virtual_networks_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.VirtualNetwork", + **kwargs: Any + ) -> LROPoller["_models.VirtualNetwork"]: + """Creates or updates a virtual network in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetwork + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetwork or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetwork] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualNetwork": + """Updates a virtual network tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to update virtual network tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_virtual_networks_update_tags_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetwork', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkListResult"]: + """Gets all virtual networks in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_networks_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_networks_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkListResult"]: + """Gets all virtual networks in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_networks_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_networks_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks"} # type: ignore + + @distributed_trace + def check_ip_address_availability( + self, + resource_group_name: str, + virtual_network_name: str, + ip_address: str, + **kwargs: Any + ) -> "_models.IPAddressAvailabilityResult": + """Checks whether a private IP address is available for use. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param ip_address: The private IP address to be verified. + :type ip_address: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IPAddressAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.IPAddressAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IPAddressAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_networks_check_ip_address_availability_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + ip_address=ip_address, + template_url=self.check_ip_address_availability.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IPAddressAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + check_ip_address_availability.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability"} # type: ignore + + + @distributed_trace + def list_usage( + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkListUsageResult"]: + """Lists usage stats. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkListUsageResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkListUsageResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListUsageResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_networks_list_usage_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_usage.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_networks_list_usage_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkListUsageResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_usage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages"} # type: ignore +class SubnetsOperations(object): + """SubnetsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_subnets_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.Subnet": + """Gets the specified subnet by virtual network and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Subnet, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.Subnet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_subnets_get_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Subnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subnet_parameters: "_models.Subnet", + **kwargs: Any + ) -> "_models.Subnet": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(subnet_parameters, 'Subnet') + + request = build_subnets_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Subnet', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Subnet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + subnet_parameters: "_models.Subnet", + **kwargs: Any + ) -> LROPoller["_models.Subnet"]: + """Creates or updates a subnet in the specified virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param subnet_parameters: Parameters supplied to the create or update subnet operation. + :type subnet_parameters: ~azure.mgmt.network.v2021_08_01.models.Subnet + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either Subnet or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.Subnet] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subnet_parameters=subnet_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('Subnet', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}"} # type: ignore + + def _prepare_network_policies_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + prepare_network_policies_request_parameters: "_models.PrepareNetworkPoliciesRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(prepare_network_policies_request_parameters, 'PrepareNetworkPoliciesRequest') + + request = build_subnets_prepare_network_policies_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._prepare_network_policies_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _prepare_network_policies_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies"} # type: ignore + + + @distributed_trace + def begin_prepare_network_policies( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + prepare_network_policies_request_parameters: "_models.PrepareNetworkPoliciesRequest", + **kwargs: Any + ) -> LROPoller[None]: + """Prepares a subnet by applying network intent policies. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param prepare_network_policies_request_parameters: Parameters supplied to prepare subnet by + applying network intent policies. + :type prepare_network_policies_request_parameters: + ~azure.mgmt.network.v2021_08_01.models.PrepareNetworkPoliciesRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._prepare_network_policies_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + prepare_network_policies_request_parameters=prepare_network_policies_request_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_prepare_network_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies"} # type: ignore + + def _unprepare_network_policies_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + unprepare_network_policies_request_parameters: "_models.UnprepareNetworkPoliciesRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(unprepare_network_policies_request_parameters, 'UnprepareNetworkPoliciesRequest') + + request = build_subnets_unprepare_network_policies_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._unprepare_network_policies_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _unprepare_network_policies_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies"} # type: ignore + + + @distributed_trace + def begin_unprepare_network_policies( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + unprepare_network_policies_request_parameters: "_models.UnprepareNetworkPoliciesRequest", + **kwargs: Any + ) -> LROPoller[None]: + """Unprepares a subnet by removing network intent policies. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param unprepare_network_policies_request_parameters: Parameters supplied to unprepare subnet + to remove network intent policies. + :type unprepare_network_policies_request_parameters: + ~azure.mgmt.network.v2021_08_01.models.UnprepareNetworkPoliciesRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._unprepare_network_policies_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + unprepare_network_policies_request_parameters=unprepare_network_policies_request_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_unprepare_network_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> Iterable["_models.SubnetListResult"]: + """Gets all subnets in a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SubnetListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.SubnetListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_subnets_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_subnets_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("SubnetListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets"} # type: ignore +class ResourceNavigationLinksOperations(object): + """ResourceNavigationLinksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> "_models.ResourceNavigationLinksListResult": + """Gets a list of resource navigation links for a subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceNavigationLinksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ResourceNavigationLinksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceNavigationLinksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_resource_navigation_links_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceNavigationLinksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks"} # type: ignore + +class ServiceAssociationLinksOperations(object): + """ServiceAssociationLinksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> "_models.ServiceAssociationLinksListResult": + """Gets a list of service association links for a subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceAssociationLinksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ServiceAssociationLinksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceAssociationLinksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_service_association_links_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceAssociationLinksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks"} # type: ignore + +class VirtualNetworkPeeringsOperations(object): + """VirtualNetworkPeeringsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_peerings_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified virtual network peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param virtual_network_peering_name: The name of the virtual network peering. + :type virtual_network_peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkPeering": + """Gets the specified virtual network peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param virtual_network_peering_name: The name of the virtual network peering. + :type virtual_network_peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_peerings_get_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + virtual_network_peering_parameters: "_models.VirtualNetworkPeering", + sync_remote_address_space: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] = None, + **kwargs: Any + ) -> "_models.VirtualNetworkPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(virtual_network_peering_parameters, 'VirtualNetworkPeering') + + request = build_virtual_network_peerings_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + sync_remote_address_space=sync_remote_address_space, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_name: str, + virtual_network_peering_name: str, + virtual_network_peering_parameters: "_models.VirtualNetworkPeering", + sync_remote_address_space: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] = None, + **kwargs: Any + ) -> LROPoller["_models.VirtualNetworkPeering"]: + """Creates or updates a peering in the specified virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param virtual_network_peering_name: The name of the peering. + :type virtual_network_peering_name: str + :param virtual_network_peering_parameters: Parameters supplied to the create or update virtual + network peering operation. + :type virtual_network_peering_parameters: + ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering + :param sync_remote_address_space: Parameter indicates the intention to sync the peering with + the current address space on the remote vNet after it's updated. Default value is None. + :type sync_remote_address_space: str or + ~azure.mgmt.network.v2021_08_01.models.SyncRemoteAddressSpace + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetworkPeering or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeering] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + virtual_network_peering_name=virtual_network_peering_name, + virtual_network_peering_parameters=virtual_network_peering_parameters, + sync_remote_address_space=sync_remote_address_space, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_network_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkPeeringListResult"]: + """Gets all virtual network peerings in a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkPeeringListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkPeeringListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeeringListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_peerings_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_peerings_list_request( + resource_group_name=resource_group_name, + virtual_network_name=virtual_network_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkPeeringListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings"} # type: ignore +class VirtualNetworkGatewaysOperations(object): # pylint: disable=too-many-public-methods + """VirtualNetworkGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VirtualNetworkGateway", + **kwargs: Any + ) -> "_models.VirtualNetworkGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualNetworkGateway') + + request = build_virtual_network_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VirtualNetworkGateway", + **kwargs: Any + ) -> LROPoller["_models.VirtualNetworkGateway"]: + """Creates or updates a virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Parameters supplied to create or update virtual network gateway operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkGateway": + """Gets the specified virtual network gateway by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified virtual network gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + def _update_tags_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.VirtualNetworkGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_virtual_network_gateways_update_tags_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + + @distributed_trace + def begin_update_tags( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> LROPoller["_models.VirtualNetworkGateway"]: + """Updates a virtual network gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Parameters supplied to update virtual network gateway tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkGatewayListResult"]: + """Gets all virtual network gateways by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways"} # type: ignore + + @distributed_trace + def list_connections( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkGatewayListConnectionsResult"]: + """Gets all the connections in a virtual network gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkGatewayListConnectionsResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayListConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_gateways_list_connections_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_connections.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_gateways_list_connections_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkGatewayListConnectionsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections"} # type: ignore + + def _reset_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + gateway_vip: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.VirtualNetworkGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_reset_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + gateway_vip=gateway_vip, + template_url=self._reset_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _reset_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset"} # type: ignore + + + @distributed_trace + def begin_reset( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + gateway_vip: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.VirtualNetworkGateway"]: + """Resets the primary of the virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param gateway_vip: Virtual network gateway vip address supplied to the begin reset of the + active-active feature enabled gateway. Default value is None. + :type gateway_vip: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + gateway_vip=gateway_vip, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset"} # type: ignore + + def _reset_vpn_client_shared_key_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_reset_vpn_client_shared_key_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reset_vpn_client_shared_key_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_vpn_client_shared_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey"} # type: ignore + + + @distributed_trace + def begin_reset_vpn_client_shared_key( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Resets the VPN client shared key of the virtual network gateway in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_vpn_client_shared_key_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset_vpn_client_shared_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey"} # type: ignore + + def _generatevpnclientpackage_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnClientParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnClientParameters') + + request = build_virtual_network_gateways_generatevpnclientpackage_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._generatevpnclientpackage_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _generatevpnclientpackage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage"} # type: ignore + + + @distributed_trace + def begin_generatevpnclientpackage( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnClientParameters", + **kwargs: Any + ) -> LROPoller[str]: + """Generates VPN client package for P2S client of the virtual network gateway in the specified + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Parameters supplied to the generate virtual network gateway VPN client + package operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnClientParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._generatevpnclientpackage_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_generatevpnclientpackage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage"} # type: ignore + + def _generate_vpn_profile_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnClientParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnClientParameters') + + request = build_virtual_network_gateways_generate_vpn_profile_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._generate_vpn_profile_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _generate_vpn_profile_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile"} # type: ignore + + + @distributed_trace + def begin_generate_vpn_profile( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnClientParameters", + **kwargs: Any + ) -> LROPoller[str]: + """Generates VPN profile for P2S client of the virtual network gateway in the specified resource + group. Used for IKEV2 and radius based authentication. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Parameters supplied to the generate virtual network gateway VPN client + package operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnClientParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._generate_vpn_profile_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_generate_vpn_profile.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile"} # type: ignore + + def _get_vpn_profile_package_url_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_vpn_profile_package_url_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_vpn_profile_package_url_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_vpn_profile_package_url_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl"} # type: ignore + + + @distributed_trace + def begin_get_vpn_profile_package_url( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> LROPoller[str]: + """Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified + resource group. The profile needs to be generated first using generateVpnProfile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_vpn_profile_package_url_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_vpn_profile_package_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl"} # type: ignore + + def _get_bgp_peer_status_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + peer: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.BgpPeerStatusListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BgpPeerStatusListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_bgp_peer_status_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + peer=peer, + template_url=self._get_bgp_peer_status_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_bgp_peer_status_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus"} # type: ignore + + + @distributed_trace + def begin_get_bgp_peer_status( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + peer: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.BgpPeerStatusListResult"]: + """The GetBgpPeerStatus operation retrieves the status of all BGP peers. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param peer: The IP address of the peer to retrieve the status of. Default value is None. + :type peer: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BgpPeerStatusListResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.BgpPeerStatusListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpPeerStatusListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_bgp_peer_status_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + peer=peer, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_bgp_peer_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus"} # type: ignore + + @distributed_trace + def supported_vpn_devices( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> str: + """Gets a xml format representation for supported vpn devices. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_supported_vpn_devices_request( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.supported_vpn_devices.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + supported_vpn_devices.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices"} # type: ignore + + + def _get_learned_routes_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Optional["_models.GatewayRouteListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_learned_routes_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_learned_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_learned_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes"} # type: ignore + + + @distributed_trace + def begin_get_learned_routes( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> LROPoller["_models.GatewayRouteListResult"]: + """This operation retrieves a list of routes the virtual network gateway has learned, including + routes learned from BGP peers. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GatewayRouteListResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.GatewayRouteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_learned_routes_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_learned_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes"} # type: ignore + + def _get_advertised_routes_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + peer: str, + **kwargs: Any + ) -> Optional["_models.GatewayRouteListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_advertised_routes_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + peer=peer, + template_url=self._get_advertised_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_advertised_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes"} # type: ignore + + + @distributed_trace + def begin_get_advertised_routes( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + peer: str, + **kwargs: Any + ) -> LROPoller["_models.GatewayRouteListResult"]: + """This operation retrieves a list of routes the virtual network gateway is advertising to the + specified peer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param peer: The IP address of the peer. + :type peer: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either GatewayRouteListResult or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.GatewayRouteListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_advertised_routes_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + peer=peer, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_advertised_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes"} # type: ignore + + def _set_vpnclient_ipsec_parameters_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + vpnclient_ipsec_params: "_models.VpnClientIPsecParameters", + **kwargs: Any + ) -> Optional["_models.VpnClientIPsecParameters"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnClientIPsecParameters"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpnclient_ipsec_params, 'VpnClientIPsecParameters') + + request = build_virtual_network_gateways_set_vpnclient_ipsec_parameters_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._set_vpnclient_ipsec_parameters_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _set_vpnclient_ipsec_parameters_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters"} # type: ignore + + + @distributed_trace + def begin_set_vpnclient_ipsec_parameters( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + vpnclient_ipsec_params: "_models.VpnClientIPsecParameters", + **kwargs: Any + ) -> LROPoller["_models.VpnClientIPsecParameters"]: + """The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of + virtual network gateway in the specified resource group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param vpnclient_ipsec_params: Parameters supplied to the Begin Set vpnclient ipsec parameters + of Virtual Network Gateway P2S client operation through Network resource provider. + :type vpnclient_ipsec_params: ~azure.mgmt.network.v2021_08_01.models.VpnClientIPsecParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnClientIPsecParameters or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnClientIPsecParameters] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._set_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + vpnclient_ipsec_params=vpnclient_ipsec_params, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_set_vpnclient_ipsec_parameters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters"} # type: ignore + + def _get_vpnclient_ipsec_parameters_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> "_models.VpnClientIPsecParameters": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_vpnclient_ipsec_parameters_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_vpnclient_ipsec_parameters_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_vpnclient_ipsec_parameters_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters"} # type: ignore + + + @distributed_trace + def begin_get_vpnclient_ipsec_parameters( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> LROPoller["_models.VpnClientIPsecParameters"]: + """The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec + policy for P2S client of virtual network gateway in the specified resource group through + Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The virtual network gateway name. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnClientIPsecParameters or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnClientIPsecParameters] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_vpnclient_ipsec_parameters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters"} # type: ignore + + @distributed_trace + def vpn_device_configuration_script( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnDeviceScriptParameters", + **kwargs: Any + ) -> str: + """Gets a xml format representation for vpn device configuration script. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection for which the configuration script is generated. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the generate vpn device script operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnDeviceScriptParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnDeviceScriptParameters') + + request = build_virtual_network_gateways_vpn_device_configuration_script_request( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.vpn_device_configuration_script.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + vpn_device_configuration_script.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript"} # type: ignore + + + def _start_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnPacketCaptureStartParameters') + else: + _json = None + + request = build_virtual_network_gateways_start_packet_capture_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._start_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _start_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture"} # type: ignore + + + @distributed_trace + def begin_start_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> LROPoller[str]: + """Starts packet capture on virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to start packet + capture on gateway. Default value is None. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnPacketCaptureStartParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture"} # type: ignore + + def _stop_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnPacketCaptureStopParameters') + + request = build_virtual_network_gateways_stop_packet_capture_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _stop_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture"} # type: ignore + + + @distributed_trace + def begin_stop_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> LROPoller[str]: + """Stops packet capture on virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to stop packet + capture on gateway. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnPacketCaptureStopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture"} # type: ignore + + def _get_vpnclient_connection_health_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Optional["_models.VpnClientConnectionHealthDetailListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnClientConnectionHealthDetailListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateways_get_vpnclient_connection_health_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_vpnclient_connection_health_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnClientConnectionHealthDetailListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_vpnclient_connection_health_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth"} # type: ignore + + + @distributed_trace + def begin_get_vpnclient_connection_health( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> LROPoller["_models.VpnClientConnectionHealthDetailListResult"]: + """Get VPN client connection health detail per P2S client connection of the virtual network + gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnClientConnectionHealthDetailListResult + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnClientConnectionHealthDetailListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientConnectionHealthDetailListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_vpnclient_connection_health_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnClientConnectionHealthDetailListResult', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_vpnclient_connection_health.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth"} # type: ignore + + def _disconnect_virtual_network_gateway_vpn_connections_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'P2SVpnConnectionRequest') + + request = build_virtual_network_gateways_disconnect_virtual_network_gateway_vpn_connections_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._disconnect_virtual_network_gateway_vpn_connections_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disconnect_virtual_network_gateway_vpn_connections_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections"} # type: ignore + + + @distributed_trace + def begin_disconnect_virtual_network_gateway_vpn_connections( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> LROPoller[None]: + """Disconnect vpn connections of virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param request: The parameters are supplied to disconnect vpn connections. + :type request: ~azure.mgmt.network.v2021_08_01.models.P2SVpnConnectionRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._disconnect_virtual_network_gateway_vpn_connections_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + request=request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_disconnect_virtual_network_gateway_vpn_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections"} # type: ignore +class VirtualNetworkGatewayConnectionsOperations(object): # pylint: disable=too-many-public-methods + """VirtualNetworkGatewayConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VirtualNetworkGatewayConnection", + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') + + request = build_virtual_network_gateway_connections_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VirtualNetworkGatewayConnection", + **kwargs: Any + ) -> LROPoller["_models.VirtualNetworkGatewayConnection"]: + """Creates or updates a virtual network gateway connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the create or update virtual network gateway + connection operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayConnection": + """Gets the specified virtual network gateway connection by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkGatewayConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_get_request( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_delete_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified virtual network Gateway connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + def _update_tags_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.VirtualNetworkGatewayConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGatewayConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_virtual_network_gateway_connections_update_tags_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + + @distributed_trace + def begin_update_tags( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> LROPoller["_models.VirtualNetworkGatewayConnection"]: + """Updates a virtual network gateway connection tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to update virtual network gateway connection tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnection or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}"} # type: ignore + + def _set_shared_key_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionSharedKey", + **kwargs: Any + ) -> "_models.ConnectionSharedKey": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ConnectionSharedKey') + + request = build_virtual_network_gateway_connections_set_shared_key_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._set_shared_key_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _set_shared_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey"} # type: ignore + + + @distributed_trace + def begin_set_shared_key( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionSharedKey", + **kwargs: Any + ) -> LROPoller["_models.ConnectionSharedKey"]: + """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway + connection shared key for passed virtual network gateway connection in the specified resource + group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The virtual network gateway connection name. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection + Shared key operation throughNetwork resource provider. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ConnectionSharedKey + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ConnectionSharedKey or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectionSharedKey] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._set_shared_key_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_set_shared_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey"} # type: ignore + + @distributed_trace + def get_shared_key( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> "_models.ConnectionSharedKey": + """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the + specified virtual network gateway connection shared key through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The virtual network gateway connection shared + key name. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionSharedKey, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ConnectionSharedKey + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_get_shared_key_request( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_shared_key.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_shared_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkGatewayConnectionListResult"]: + """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways + connections created. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_gateway_connections_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_gateway_connections_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkGatewayConnectionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections"} # type: ignore + + def _reset_shared_key_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionResetSharedKey", + **kwargs: Any + ) -> Optional["_models.ConnectionResetSharedKey"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'ConnectionResetSharedKey') + + request = build_virtual_network_gateway_connections_reset_shared_key_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._reset_shared_key_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _reset_shared_key_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset"} # type: ignore + + + @distributed_trace + def begin_reset_shared_key( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionResetSharedKey", + **kwargs: Any + ) -> LROPoller["_models.ConnectionResetSharedKey"]: + """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway + connection shared key for passed virtual network gateway connection in the specified resource + group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The virtual network gateway connection reset + shared key Name. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the begin reset virtual network gateway connection + shared key operation through network resource provider. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.ConnectionResetSharedKey + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ConnectionResetSharedKey or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ConnectionResetSharedKey] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_shared_key_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset_shared_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset"} # type: ignore + + def _start_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnPacketCaptureStartParameters') + else: + _json = None + + request = build_virtual_network_gateway_connections_start_packet_capture_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._start_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _start_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture"} # type: ignore + + + @distributed_trace + def begin_start_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> LROPoller[str]: + """Starts packet capture on virtual network gateway connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to start packet + capture on gateway connection. Default value is None. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnPacketCaptureStartParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture"} # type: ignore + + def _stop_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VpnPacketCaptureStopParameters') + + request = build_virtual_network_gateway_connections_stop_packet_capture_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _stop_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture"} # type: ignore + + + @distributed_trace + def begin_stop_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> LROPoller[str]: + """Stops packet capture on virtual network gateway connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to stop packet + capture on gateway connection. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnPacketCaptureStopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture"} # type: ignore + + def _get_ike_sas_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_get_ike_sas_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_ike_sas_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_ike_sas_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas"} # type: ignore + + + @distributed_trace + def begin_get_ike_sas( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> LROPoller[str]: + """Lists IKE Security Associations for the virtual network gateway connection in the specified + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_ike_sas_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_ike_sas.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas"} # type: ignore + + def _reset_connection_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_connections_reset_connection_request_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reset_connection_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection"} # type: ignore + + + @distributed_trace + def begin_reset_connection( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Resets the virtual network gateway connection specified. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_connection_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection"} # type: ignore +class LocalNetworkGatewaysOperations(object): + """LocalNetworkGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + local_network_gateway_name: str, + parameters: "_models.LocalNetworkGateway", + **kwargs: Any + ) -> "_models.LocalNetworkGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'LocalNetworkGateway') + + request = build_local_network_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + local_network_gateway_name: str, + parameters: "_models.LocalNetworkGateway", + **kwargs: Any + ) -> LROPoller["_models.LocalNetworkGateway"]: + """Creates or updates a local network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :param parameters: Parameters supplied to the create or update local network gateway operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either LocalNetworkGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + local_network_gateway_name: str, + **kwargs: Any + ) -> "_models.LocalNetworkGateway": + """Gets the specified local network gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocalNetworkGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_local_network_gateways_get_request( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + local_network_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_local_network_gateways_delete_request_initial( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + local_network_gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified local network gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + local_network_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.LocalNetworkGateway": + """Updates a local network gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :param parameters: Parameters supplied to update local network gateway tags. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocalNetworkGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.LocalNetworkGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'TagsObject') + + request = build_local_network_gateways_update_tags_request( + resource_group_name=resource_group_name, + local_network_gateway_name=local_network_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.LocalNetworkGatewayListResult"]: + """Gets all the local network gateways in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LocalNetworkGatewayListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.LocalNetworkGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_local_network_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_local_network_gateways_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("LocalNetworkGatewayListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways"} # type: ignore +class VirtualNetworkGatewayNatRulesOperations(object): + """VirtualNetworkGatewayNatRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayNatRule": + """Retrieves the details of a nat rule. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkGatewayNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_nat_rules_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VirtualNetworkGatewayNatRule", + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayNatRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(nat_rule_parameters, 'VirtualNetworkGatewayNatRule') + + request = build_virtual_network_gateway_nat_rules_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VirtualNetworkGatewayNatRule", + **kwargs: Any + ) -> LROPoller["_models.VirtualNetworkGatewayNatRule"]: + """Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the + existing nat rules. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :param nat_rule_parameters: Parameters supplied to create or Update a Nat Rule. + :type nat_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetworkGatewayNatRule or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkGatewayNatRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + nat_rule_parameters=nat_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_gateway_nat_rules_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a nat rule. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}"} # type: ignore + + @distributed_trace + def list_by_virtual_network_gateway( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVirtualNetworkGatewayNatRulesResult"]: + """Retrieves all nat rules for a particular virtual network gateway. + + :param resource_group_name: The resource group name of the virtual network gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualNetworkGatewayNatRulesResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualNetworkGatewayNatRulesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualNetworkGatewayNatRulesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + template_url=self.list_by_virtual_network_gateway.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_gateway_nat_rules_list_by_virtual_network_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualNetworkGatewayNatRulesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_virtual_network_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules"} # type: ignore +class VirtualNetworkTapsOperations(object): + """VirtualNetworkTapsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + tap_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_taps_delete_request_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + tap_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified virtual network tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the virtual network tap. + :type tap_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + tap_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkTap": + """Gets information about the specified virtual network tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of virtual network tap. + :type tap_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkTap, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_network_taps_get_request( + resource_group_name=resource_group_name, + tap_name=tap_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + tap_name: str, + parameters: "_models.VirtualNetworkTap", + **kwargs: Any + ) -> "_models.VirtualNetworkTap": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualNetworkTap') + + request = build_virtual_network_taps_create_or_update_request_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + tap_name: str, + parameters: "_models.VirtualNetworkTap", + **kwargs: Any + ) -> LROPoller["_models.VirtualNetworkTap"]: + """Creates or updates a Virtual Network Tap. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the virtual network tap. + :type tap_name: str + :param parameters: Parameters supplied to the create or update virtual network tap operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualNetworkTap or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + tap_name=tap_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + tap_name: str, + tap_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualNetworkTap": + """Updates an VirtualNetworkTap tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the tap. + :type tap_name: str + :param tap_parameters: Parameters supplied to update VirtualNetworkTap tags. + :type tap_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkTap, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(tap_parameters, 'TagsObject') + + request = build_virtual_network_taps_update_tags_request( + resource_group_name=resource_group_name, + tap_name=tap_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}"} # type: ignore + + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkTapListResult"]: + """Gets all the VirtualNetworkTaps in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkTapListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTapListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTapListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_taps_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_taps_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkTapListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualNetworkTapListResult"]: + """Gets all the VirtualNetworkTaps in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkTapListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualNetworkTapListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTapListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_network_taps_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_network_taps_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualNetworkTapListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps"} # type: ignore +class VirtualRoutersOperations(object): + """VirtualRoutersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_router_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_routers_delete_request_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_router_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_router_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.VirtualRouter": + """Gets the specified Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param expand: Expands referenced resources. Default value is None. + :type expand: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualRouter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualRouter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_routers_get_request( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + expand=expand, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualRouter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_router_name: str, + parameters: "_models.VirtualRouter", + **kwargs: Any + ) -> "_models.VirtualRouter": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualRouter') + + request = build_virtual_routers_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualRouter', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualRouter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_router_name: str, + parameters: "_models.VirtualRouter", + **kwargs: Any + ) -> LROPoller["_models.VirtualRouter"]: + """Creates or updates the specified Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param parameters: Parameters supplied to the create or update Virtual Router. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualRouter + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualRouter or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualRouter] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualRouter', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualRouterListResult"]: + """Lists all Virtual Routers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualRouterListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualRouterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_routers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_routers_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualRouterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.VirtualRouterListResult"]: + """Gets all the Virtual Routers in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualRouterListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualRouterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_routers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_routers_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualRouterListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters"} # type: ignore +class VirtualRouterPeeringsOperations(object): + """VirtualRouterPeeringsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_router_peerings_delete_request_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified peering from a Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.VirtualRouterPeering": + """Gets the specified Virtual Router Peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the Virtual Router Peering. + :type peering_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualRouterPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_router_peerings_get_request( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + parameters: "_models.VirtualRouterPeering", + **kwargs: Any + ) -> "_models.VirtualRouterPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'VirtualRouterPeering') + + request = build_virtual_router_peerings_create_or_update_request_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + parameters: "_models.VirtualRouterPeering", + **kwargs: Any + ) -> LROPoller["_models.VirtualRouterPeering"]: + """Creates or updates the specified Virtual Router Peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the Virtual Router Peering. + :type peering_name: str + :param parameters: Parameters supplied to the create or update Virtual Router Peering + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeering + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualRouterPeering or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeering] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_router_name: str, + **kwargs: Any + ) -> Iterable["_models.VirtualRouterPeeringListResult"]: + """Lists all Virtual Router Peerings in a Virtual Router resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualRouterPeeringListResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.VirtualRouterPeeringListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeeringListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_router_peerings_list_request( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_router_peerings_list_request( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("VirtualRouterPeeringListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings"} # type: ignore +class VirtualWansOperations(object): + """VirtualWansOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> "_models.VirtualWAN": + """Retrieves the details of a VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being retrieved. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWAN, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWAN + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_wans_get_request( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.VirtualWAN", + **kwargs: Any + ) -> "_models.VirtualWAN": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(wan_parameters, 'VirtualWAN') + + request = build_virtual_wans_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.VirtualWAN", + **kwargs: Any + ) -> LROPoller["_models.VirtualWAN"]: + """Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being created or updated. + :type virtual_wan_name: str + :param wan_parameters: Parameters supplied to create or update VirtualWAN. + :type wan_parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualWAN + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualWAN or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualWAN] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + wan_parameters=wan_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualWAN', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualWAN": + """Updates a VirtualWAN tags. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being updated. + :type virtual_wan_name: str + :param wan_parameters: Parameters supplied to Update VirtualWAN tags. + :type wan_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWAN, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualWAN + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(wan_parameters, 'TagsObject') + + request = build_virtual_wans_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_wans_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being deleted. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVirtualWANsResult"]: + """Lists all the VirtualWANs in a resource group. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualWANsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualWANsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualWANsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_wans_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_wans_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualWANsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ListVirtualWANsResult"]: + """Lists all the VirtualWANs in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualWANsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualWANsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualWANsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_wans_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_wans_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualWANsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans"} # type: ignore +class VpnSitesOperations(object): + """VpnSitesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> "_models.VpnSite": + """Retrieves the details of a VPN site. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being retrieved. + :type vpn_site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_sites_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.VpnSite", + **kwargs: Any + ) -> "_models.VpnSite": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_site_parameters, 'VpnSite') + + request = build_vpn_sites_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnSite', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.VpnSite", + **kwargs: Any + ) -> LROPoller["_models.VpnSite"]: + """Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being created or updated. + :type vpn_site_name: str + :param vpn_site_parameters: Parameters supplied to create or update VpnSite. + :type vpn_site_parameters: ~azure.mgmt.network.v2021_08_01.models.VpnSite + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnSite or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnSite] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + vpn_site_parameters=vpn_site_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnSite', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VpnSite": + """Updates VpnSite tags. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being updated. + :type vpn_site_name: str + :param vpn_site_parameters: Parameters supplied to update VpnSite tags. + :type vpn_site_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_site_parameters, 'TagsObject') + + request = build_vpn_sites_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_sites_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a VpnSite. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being deleted. + :type vpn_site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVpnSitesResult"]: + """Lists all the vpnSites in a resource group. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSitesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnSitesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSitesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_sites_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_sites_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnSitesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ListVpnSitesResult"]: + """Lists all the VpnSites in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSitesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnSitesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSitesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_sites_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_sites_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnSitesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites"} # type: ignore +class VpnSiteLinksOperations(object): + """VpnSiteLinksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_link_name: str, + **kwargs: Any + ) -> "_models.VpnSiteLink": + """Retrieves the details of a VPN site link. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite. + :type vpn_site_name: str + :param vpn_site_link_name: The name of the VpnSiteLink being retrieved. + :type vpn_site_link_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSiteLink, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnSiteLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSiteLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_site_links_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + vpn_site_link_name=vpn_site_link_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSiteLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}"} # type: ignore + + + @distributed_trace + def list_by_vpn_site( + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVpnSiteLinksResult"]: + """Lists all the vpnSiteLinks in a resource group for a vpn site. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite. + :type vpn_site_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSiteLinksResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnSiteLinksResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSiteLinksResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_site_links_list_by_vpn_site_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + template_url=self.list_by_vpn_site.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_site_links_list_by_vpn_site_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnSiteLinksResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_vpn_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks"} # type: ignore +class VpnSitesConfigurationOperations(object): + """VpnSitesConfigurationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _download_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_wan_name: str, + request: "_models.GetVpnSitesConfigurationRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'GetVpnSitesConfigurationRequest') + + request = build_vpn_sites_configuration_download_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._download_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _download_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration"} # type: ignore + + + @distributed_trace + def begin_download( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_wan_name: str, + request: "_models.GetVpnSitesConfigurationRequest", + **kwargs: Any + ) -> LROPoller[None]: + """Gives the sas-url to download the configurations for vpn-sites in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN for which configuration of all vpn-sites is + needed. + :type virtual_wan_name: str + :param request: Parameters supplied to download vpn-sites configuration. + :type request: ~azure.mgmt.network.v2021_08_01.models.GetVpnSitesConfigurationRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._download_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + request=request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_download.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration"} # type: ignore +class VpnServerConfigurationsOperations(object): + """VpnServerConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + """Retrieves the details of a VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being retrieved. + :type vpn_server_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_server_configurations_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.VpnServerConfiguration", + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_server_configuration_parameters, 'VpnServerConfiguration') + + request = build_vpn_server_configurations_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.VpnServerConfiguration", + **kwargs: Any + ) -> LROPoller["_models.VpnServerConfiguration"]: + """Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing + VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being created or + updated. + :type vpn_server_configuration_name: str + :param vpn_server_configuration_parameters: Parameters supplied to create or update + VpnServerConfiguration. + :type vpn_server_configuration_parameters: + ~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnServerConfiguration or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + vpn_server_configuration_parameters=vpn_server_configuration_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + """Updates VpnServerConfiguration tags. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being updated. + :type vpn_server_configuration_name: str + :param vpn_server_configuration_parameters: Parameters supplied to update + VpnServerConfiguration tags. + :type vpn_server_configuration_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnServerConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_server_configuration_parameters, 'TagsObject') + + request = build_vpn_server_configurations_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_server_configurations_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being deleted. + :type vpn_server_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVpnServerConfigurationsResult"]: + """Lists all the vpnServerConfigurations in a resource group. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnServerConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_server_configurations_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_server_configurations_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnServerConfigurationsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ListVpnServerConfigurationsResult"]: + """Lists all the VpnServerConfigurations in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnServerConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_server_configurations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_server_configurations_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnServerConfigurationsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations"} # type: ignore +class ConfigurationPolicyGroupsOperations(object): + """ConfigurationPolicyGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + vpn_server_configuration_policy_group_parameters: "_models.VpnServerConfigurationPolicyGroup", + **kwargs: Any + ) -> "_models.VpnServerConfigurationPolicyGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationPolicyGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_server_configuration_policy_group_parameters, 'VpnServerConfigurationPolicyGroup') + + request = build_configuration_policy_groups_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfigurationPolicyGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnServerConfigurationPolicyGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + vpn_server_configuration_policy_group_parameters: "_models.VpnServerConfigurationPolicyGroup", + **kwargs: Any + ) -> LROPoller["_models.VpnServerConfigurationPolicyGroup"]: + """Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. + + :param resource_group_name: The resource group name of the ConfigurationPolicyGroup. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration. + :type vpn_server_configuration_name: str + :param configuration_policy_group_name: The name of the ConfigurationPolicyGroup. + :type configuration_policy_group_name: str + :param vpn_server_configuration_policy_group_parameters: Parameters supplied to create or + update a VpnServerConfiguration PolicyGroup. + :type vpn_server_configuration_policy_group_parameters: + ~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnServerConfigurationPolicyGroup or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationPolicyGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + vpn_server_configuration_policy_group_parameters=vpn_server_configuration_policy_group_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnServerConfigurationPolicyGroup', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_configuration_policy_groups_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a ConfigurationPolicyGroup. + + :param resource_group_name: The resource group name of the ConfigurationPolicyGroup. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration. + :type vpn_server_configuration_name: str + :param configuration_policy_group_name: The name of the ConfigurationPolicyGroup. + :type configuration_policy_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + configuration_policy_group_name: str, + **kwargs: Any + ) -> "_models.VpnServerConfigurationPolicyGroup": + """Retrieves the details of a ConfigurationPolicyGroup. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration. + :type vpn_server_configuration_name: str + :param configuration_policy_group_name: The name of the ConfigurationPolicyGroup being + retrieved. + :type configuration_policy_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfigurationPolicyGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationPolicyGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationPolicyGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_configuration_policy_groups_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + configuration_policy_group_name=configuration_policy_group_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfigurationPolicyGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}"} # type: ignore + + + @distributed_trace + def list_by_vpn_server_configuration( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVpnServerConfigurationPolicyGroupsResult"]: + """Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration. + :type vpn_server_configuration_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationPolicyGroupsResult or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnServerConfigurationPolicyGroupsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationPolicyGroupsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_configuration_policy_groups_list_by_vpn_server_configuration_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + template_url=self.list_by_vpn_server_configuration.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_configuration_policy_groups_list_by_vpn_server_configuration_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnServerConfigurationPolicyGroupsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_vpn_server_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups"} # type: ignore +class VirtualHubsOperations(object): + """VirtualHubsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> "_models.VirtualHub": + """Retrieves the details of a VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHub, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hubs_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.VirtualHub", + **kwargs: Any + ) -> "_models.VirtualHub": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(virtual_hub_parameters, 'VirtualHub') + + request = build_virtual_hubs_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.VirtualHub", + **kwargs: Any + ) -> LROPoller["_models.VirtualHub"]: + """Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param virtual_hub_parameters: Parameters supplied to create or update VirtualHub. + :type virtual_hub_parameters: ~azure.mgmt.network.v2021_08_01.models.VirtualHub + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualHub or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualHub] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + virtual_hub_parameters=virtual_hub_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualHub', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + @distributed_trace + def update_tags( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualHub": + """Updates VirtualHub tags. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param virtual_hub_parameters: Parameters supplied to update VirtualHub tags. + :type virtual_hub_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHub, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(virtual_hub_parameters, 'TagsObject') + + request = build_virtual_hubs_update_tags_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update_tags.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hubs_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVirtualHubsResult"]: + """Lists all the VirtualHubs in a resource group. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hubs_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hubs_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ListVirtualHubsResult"]: + """Lists all the VirtualHubs in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hubs_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hubs_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs"} # type: ignore + + def _get_effective_virtual_hub_routes_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + effective_routes_parameters: Optional["_models.EffectiveRoutesParameters"] = None, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if effective_routes_parameters is not None: + _json = self._serialize.body(effective_routes_parameters, 'EffectiveRoutesParameters') + else: + _json = None + + request = build_virtual_hubs_get_effective_virtual_hub_routes_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_effective_virtual_hub_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _get_effective_virtual_hub_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes"} # type: ignore + + + @distributed_trace + def begin_get_effective_virtual_hub_routes( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + effective_routes_parameters: Optional["_models.EffectiveRoutesParameters"] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Gets the effective routes configured for the Virtual Hub resource or the specified resource . + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param effective_routes_parameters: Parameters supplied to get the effective routes for a + specific resource. Default value is None. + :type effective_routes_parameters: + ~azure.mgmt.network.v2021_08_01.models.EffectiveRoutesParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_effective_virtual_hub_routes_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + effective_routes_parameters=effective_routes_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_effective_virtual_hub_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes"} # type: ignore +class HubVirtualNetworkConnectionsOperations(object): + """HubVirtualNetworkConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + hub_virtual_network_connection_parameters: "_models.HubVirtualNetworkConnection", + **kwargs: Any + ) -> "_models.HubVirtualNetworkConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(hub_virtual_network_connection_parameters, 'HubVirtualNetworkConnection') + + request = build_hub_virtual_network_connections_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + hub_virtual_network_connection_parameters: "_models.HubVirtualNetworkConnection", + **kwargs: Any + ) -> LROPoller["_models.HubVirtualNetworkConnection"]: + """Creates a hub virtual network connection if it doesn't exist else updates the existing one. + + :param resource_group_name: The resource group name of the HubVirtualNetworkConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the HubVirtualNetworkConnection. + :type connection_name: str + :param hub_virtual_network_connection_parameters: Parameters supplied to create or update a hub + virtual network connection. + :type hub_virtual_network_connection_parameters: + ~azure.mgmt.network.v2021_08_01.models.HubVirtualNetworkConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either HubVirtualNetworkConnection or the result + of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.HubVirtualNetworkConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + hub_virtual_network_connection_parameters=hub_virtual_network_connection_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_hub_virtual_network_connections_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a HubVirtualNetworkConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the HubVirtualNetworkConnection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.HubVirtualNetworkConnection": + """Retrieves the details of a HubVirtualNetworkConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubVirtualNetworkConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.HubVirtualNetworkConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_hub_virtual_network_connections_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> Iterable["_models.ListHubVirtualNetworkConnectionsResult"]: + """Retrieves the details of all HubVirtualNetworkConnections. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListHubVirtualNetworkConnectionsResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListHubVirtualNetworkConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListHubVirtualNetworkConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_hub_virtual_network_connections_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_hub_virtual_network_connections_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListHubVirtualNetworkConnectionsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections"} # type: ignore +class VpnGatewaysOperations(object): + """VpnGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> "_models.VpnGateway": + """Retrieves the details of a virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_gateways_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.VpnGateway", + **kwargs: Any + ) -> "_models.VpnGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_gateway_parameters, 'VpnGateway') + + request = build_vpn_gateways_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.VpnGateway", + **kwargs: Any + ) -> LROPoller["_models.VpnGateway"]: + """Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_gateway_parameters: Parameters supplied to create or Update a virtual wan vpn + gateway. + :type vpn_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.VpnGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_gateway_parameters=vpn_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + def _update_tags_initial( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.VpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_gateway_parameters, 'TagsObject') + + request = build_vpn_gateways_update_tags_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace + def begin_update_tags( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> LROPoller["_models.VpnGateway"]: + """Updates virtual wan vpn gateway tags. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_gateway_parameters: Parameters supplied to update a virtual wan vpn gateway tags. + :type vpn_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_gateway_parameters=vpn_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_gateways_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}"} # type: ignore + + def _reset_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Optional["_models.VpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_gateways_reset_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reset_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _reset_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset"} # type: ignore + + + @distributed_trace + def begin_reset( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> LROPoller["_models.VpnGateway"]: + """Resets the primary of the vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset"} # type: ignore + + def _start_packet_capture_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnGatewayPacketCaptureStartParameters') + else: + _json = None + + request = build_vpn_gateways_start_packet_capture_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._start_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _start_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture"} # type: ignore + + + @distributed_trace + def begin_start_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> LROPoller[str]: + """Starts packet capture on vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param parameters: Vpn gateway packet capture parameters supplied to start packet capture on + vpn gateway. Default value is None. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnGatewayPacketCaptureStartParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture"} # type: ignore + + def _stop_packet_capture_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnGatewayPacketCaptureStopParameters') + else: + _json = None + + request = build_vpn_gateways_stop_packet_capture_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _stop_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture"} # type: ignore + + + @distributed_trace + def begin_stop_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> LROPoller[str]: + """Stops packet capture on vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param parameters: Vpn gateway packet capture parameters supplied to stop packet capture on vpn + gateway. Default value is None. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.VpnGatewayPacketCaptureStopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVpnGatewaysResult"]: + """Lists all the VpnGateways in a resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnGatewaysResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_gateways_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_gateways_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnGatewaysResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ListVpnGatewaysResult"]: + """Lists all the VpnGateways in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnGatewaysResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_gateways_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_gateways_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnGatewaysResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways"} # type: ignore +class VpnLinkConnectionsOperations(object): + """VpnLinkConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _reset_connection_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_link_connections_reset_connection_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + template_url=self._reset_connection_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection"} # type: ignore + + + @distributed_trace + def begin_reset_connection( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Resets the VpnLink connection specified. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn link connection. + :type link_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_connection_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection"} # type: ignore + + def _get_ike_sas_initial( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_link_connections_get_ike_sas_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + template_url=self._get_ike_sas_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_ike_sas_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas"} # type: ignore + + + @distributed_trace + def begin_get_ike_sas( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> LROPoller[str]: + """Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn link connection. + :type link_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_ike_sas_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_ike_sas.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas"} # type: ignore + + @distributed_trace + def list_by_vpn_connection( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVpnSiteLinkConnectionsResult"]: + """Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn + connection. + + :param resource_group_name: The resource group name of the vpn gateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSiteLinkConnectionsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnSiteLinkConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSiteLinkConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_link_connections_list_by_vpn_connection_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + template_url=self.list_by_vpn_connection.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_link_connections_list_by_vpn_connection_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnSiteLinkConnectionsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_vpn_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections"} # type: ignore +class VpnConnectionsOperations(object): + """VpnConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.VpnConnection": + """Retrieves the details of a vpn connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_connections_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + vpn_connection_parameters: "_models.VpnConnection", + **kwargs: Any + ) -> "_models.VpnConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(vpn_connection_parameters, 'VpnConnection') + + request = build_vpn_connections_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + vpn_connection_parameters: "_models.VpnConnection", + **kwargs: Any + ) -> LROPoller["_models.VpnConnection"]: + """Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the + existing connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :param vpn_connection_parameters: Parameters supplied to create or Update a VPN Connection. + :type vpn_connection_parameters: ~azure.mgmt.network.v2021_08_01.models.VpnConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnConnection or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + vpn_connection_parameters=vpn_connection_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_connections_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a vpn connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}"} # type: ignore + + def _start_packet_capture_initial( + self, + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnConnectionPacketCaptureStartParameters') + else: + _json = None + + request = build_vpn_connections_start_packet_capture_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._start_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _start_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture"} # type: ignore + + + @distributed_trace + def begin_start_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> LROPoller[str]: + """Starts packet capture on Vpn connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_connection_name: The name of the vpn connection. + :type vpn_connection_name: str + :param parameters: Vpn Connection packet capture parameters supplied to start packet capture on + gateway connection. Default value is None. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.VpnConnectionPacketCaptureStartParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_start_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture"} # type: ignore + + def _stop_packet_capture_initial( + self, + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'VpnConnectionPacketCaptureStopParameters') + else: + _json = None + + request = build_vpn_connections_stop_packet_capture_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._stop_packet_capture_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _stop_packet_capture_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture"} # type: ignore + + + @distributed_trace + def begin_stop_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> LROPoller[str]: + """Stops packet capture on Vpn connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_connection_name: The name of the vpn connection. + :type vpn_connection_name: str + :param parameters: Vpn Connection packet capture parameters supplied to stop packet capture on + gateway connection. Default value is None. + :type parameters: + ~azure.mgmt.network.v2021_08_01.models.VpnConnectionPacketCaptureStopParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('str', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_stop_packet_capture.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture"} # type: ignore + + @distributed_trace + def list_by_vpn_gateway( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVpnConnectionsResult"]: + """Retrieves all vpn connections for a particular virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnConnectionsResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_vpn_connections_list_by_vpn_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self.list_by_vpn_gateway.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_vpn_connections_list_by_vpn_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnConnectionsResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_vpn_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections"} # type: ignore +class VpnSiteLinkConnectionsOperations(object): + """VpnSiteLinkConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> "_models.VpnSiteLinkConnection": + """Retrieves the details of a vpn site link connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn connection. + :type link_connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSiteLinkConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnSiteLinkConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSiteLinkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_site_link_connections_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSiteLinkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}"} # type: ignore + +class NatRulesOperations(object): + """NatRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> "_models.VpnGatewayNatRule": + """Retrieves the details of a nat ruleGet. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnGatewayNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_nat_rules_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VpnGatewayNatRule", + **kwargs: Any + ) -> "_models.VpnGatewayNatRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(nat_rule_parameters, 'VpnGatewayNatRule') + + request = build_nat_rules_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VpnGatewayNatRule", + **kwargs: Any + ) -> LROPoller["_models.VpnGatewayNatRule"]: + """Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat + rules. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :param nat_rule_parameters: Parameters supplied to create or Update a Nat Rule. + :type nat_rule_parameters: ~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnGatewayNatRule or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnGatewayNatRule] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + nat_rule_parameters=nat_rule_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_nat_rules_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a nat rule. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}"} # type: ignore + + @distributed_trace + def list_by_vpn_gateway( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVpnGatewayNatRulesResult"]: + """Retrieves all nat rules for a particular virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnGatewayNatRulesResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVpnGatewayNatRulesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewayNatRulesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_nat_rules_list_by_vpn_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self.list_by_vpn_gateway.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_nat_rules_list_by_vpn_gateway_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVpnGatewayNatRulesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_vpn_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules"} # type: ignore +class P2SVpnGatewaysOperations(object): + """P2SVpnGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> "_models.P2SVpnGateway": + """Retrieves the details of a virtual wan p2s vpn gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: P2SVpnGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_p2_svpn_gateways_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.P2SVpnGateway", + **kwargs: Any + ) -> "_models.P2SVpnGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(p2_s_vpn_gateway_parameters, 'P2SVpnGateway') + + request = build_p2_svpn_gateways_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.P2SVpnGateway", + **kwargs: Any + ) -> LROPoller["_models.P2SVpnGateway"]: + """Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param p2_s_vpn_gateway_parameters: Parameters supplied to create or Update a virtual wan p2s + vpn gateway. + :type p2_s_vpn_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnGateway or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + p2_s_vpn_gateway_parameters=p2_s_vpn_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + def _update_tags_initial( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(p2_s_vpn_gateway_parameters, 'TagsObject') + + request = build_p2_svpn_gateways_update_tags_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace + def begin_update_tags( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> LROPoller["_models.P2SVpnGateway"]: + """Updates virtual wan p2s vpn gateway tags. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param p2_s_vpn_gateway_parameters: Parameters supplied to update a virtual wan p2s vpn gateway + tags. + :type p2_s_vpn_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnGateway or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + p2_s_vpn_gateway_parameters=p2_s_vpn_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_p2_svpn_gateways_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a virtual wan p2s vpn gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.ListP2SVpnGatewaysResult"]: + """Lists all the P2SVpnGateways in a resource group. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListP2SVpnGatewaysResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListP2SVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListP2SVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_p2_svpn_gateways_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_p2_svpn_gateways_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListP2SVpnGatewaysResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways"} # type: ignore + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.ListP2SVpnGatewaysResult"]: + """Lists all the P2SVpnGateways in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListP2SVpnGatewaysResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListP2SVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListP2SVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_p2_svpn_gateways_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_p2_svpn_gateways_list_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListP2SVpnGatewaysResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways"} # type: ignore + + def _reset_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_p2_svpn_gateways_reset_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reset_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _reset_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset"} # type: ignore + + + @distributed_trace + def begin_reset( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> LROPoller["_models.P2SVpnGateway"]: + """Resets the primary of the p2s vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnGateway or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_reset.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset"} # type: ignore + + def _generate_vpn_profile_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: "_models.P2SVpnProfileParameters", + **kwargs: Any + ) -> Optional["_models.VpnProfileResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnProfileResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'P2SVpnProfileParameters') + + request = build_p2_svpn_gateways_generate_vpn_profile_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._generate_vpn_profile_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _generate_vpn_profile_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile"} # type: ignore + + + @distributed_trace + def begin_generate_vpn_profile( + self, + resource_group_name: str, + gateway_name: str, + parameters: "_models.P2SVpnProfileParameters", + **kwargs: Any + ) -> LROPoller["_models.VpnProfileResponse"]: + """Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :param parameters: Parameters supplied to the generate P2SVpnGateway VPN client package + operation. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.P2SVpnProfileParameters + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnProfileResponse or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnProfileResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnProfileResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._generate_vpn_profile_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_generate_vpn_profile.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile"} # type: ignore + + def _get_p2_s_vpn_connection_health_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_p2_svpn_gateways_get_p2_s_vpn_connection_health_request_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._get_p2_s_vpn_connection_health_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_p2_s_vpn_connection_health_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth"} # type: ignore + + + @distributed_trace + def begin_get_p2_s_vpn_connection_health( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> LROPoller["_models.P2SVpnGateway"]: + """Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnGateway or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_p2_s_vpn_connection_health_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_p2_s_vpn_connection_health.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth"} # type: ignore + + def _get_p2_s_vpn_connection_health_detailed_initial( + self, + resource_group_name: str, + gateway_name: str, + request: "_models.P2SVpnConnectionHealthRequest", + **kwargs: Any + ) -> Optional["_models.P2SVpnConnectionHealth"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnConnectionHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'P2SVpnConnectionHealthRequest') + + request = build_p2_svpn_gateways_get_p2_s_vpn_connection_health_detailed_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + gateway_name=gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._get_p2_s_vpn_connection_health_detailed_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnConnectionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _get_p2_s_vpn_connection_health_detailed_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed"} # type: ignore + + + @distributed_trace + def begin_get_p2_s_vpn_connection_health_detailed( + self, + resource_group_name: str, + gateway_name: str, + request: "_models.P2SVpnConnectionHealthRequest", + **kwargs: Any + ) -> LROPoller["_models.P2SVpnConnectionHealth"]: + """Gets the sas url to get the connection health detail of P2S clients of the virtual wan + P2SVpnGateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :param request: Request parameters supplied to get p2s vpn connections detailed health. + :type request: ~azure.mgmt.network.v2021_08_01.models.P2SVpnConnectionHealthRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnConnectionHealth or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.P2SVpnConnectionHealth] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnConnectionHealth"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_p2_s_vpn_connection_health_detailed_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + request=request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('P2SVpnConnectionHealth', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_get_p2_s_vpn_connection_health_detailed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed"} # type: ignore + + def _disconnect_p2_s_vpn_connections_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + p2_s_vpn_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(request, 'P2SVpnConnectionRequest') + + request = build_p2_svpn_gateways_disconnect_p2_s_vpn_connections_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + p2_s_vpn_gateway_name=p2_s_vpn_gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._disconnect_p2_s_vpn_connections_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disconnect_p2_s_vpn_connections_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections"} # type: ignore + + + @distributed_trace + def begin_disconnect_p2_s_vpn_connections( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + p2_s_vpn_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> LROPoller[None]: + """Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param p2_s_vpn_gateway_name: The name of the P2S Vpn Gateway. + :type p2_s_vpn_gateway_name: str + :param request: The parameters are supplied to disconnect p2s vpn connections. + :type request: ~azure.mgmt.network.v2021_08_01.models.P2SVpnConnectionRequest + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._disconnect_p2_s_vpn_connections_initial( + resource_group_name=resource_group_name, + p2_s_vpn_gateway_name=p2_s_vpn_gateway_name, + request=request, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_disconnect_p2_s_vpn_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections"} # type: ignore +class VpnServerConfigurationsAssociatedWithVirtualWanOperations(object): + """VpnServerConfigurationsAssociatedWithVirtualWanOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _list_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> Optional["_models.VpnServerConfigurationsResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnServerConfigurationsResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_vpn_server_configurations_associated_with_virtual_wan_list_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + template_url=self._list_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfigurationsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations"} # type: ignore + + + @distributed_trace + def begin_list( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> LROPoller["_models.VpnServerConfigurationsResponse"]: + """Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VpnServerConfigurationsResponse or the + result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VpnServerConfigurationsResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationsResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VpnServerConfigurationsResponse', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations"} # type: ignore +class VirtualHubRouteTableV2SOperations(object): + """VirtualHubRouteTableV2SOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> "_models.VirtualHubRouteTableV2": + """Retrieves the details of a VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHubRouteTableV2. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHubRouteTableV2, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_route_table_v2_s_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + virtual_hub_route_table_v2_parameters: "_models.VirtualHubRouteTableV2", + **kwargs: Any + ) -> "_models.VirtualHubRouteTableV2": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(virtual_hub_route_table_v2_parameters, 'VirtualHubRouteTableV2') + + request = build_virtual_hub_route_table_v2_s_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + virtual_hub_route_table_v2_parameters: "_models.VirtualHubRouteTableV2", + **kwargs: Any + ) -> LROPoller["_models.VirtualHubRouteTableV2"]: + """Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing + VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :param virtual_hub_route_table_v2_parameters: Parameters supplied to create or update + VirtualHubRouteTableV2. + :type virtual_hub_route_table_v2_parameters: + ~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2 + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualHubRouteTableV2 or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.VirtualHubRouteTableV2] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + virtual_hub_route_table_v2_parameters=virtual_hub_route_table_v2_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_route_table_v2_s_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHubRouteTableV2. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVirtualHubRouteTableV2SResult"]: + """Retrieves the details of all VirtualHubRouteTableV2s. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubRouteTableV2SResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubRouteTableV2SResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubRouteTableV2SResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hub_route_table_v2_s_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hub_route_table_v2_s_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubRouteTableV2SResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables"} # type: ignore +class ExpressRouteGatewaysOperations(object): + """ExpressRouteGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_subscription( + self, + **kwargs: Any + ) -> "_models.ExpressRouteGatewayList": + """Lists ExpressRoute gateways under a given subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGatewayList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGatewayList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGatewayList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_gateways_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGatewayList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways"} # type: ignore + + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteGatewayList": + """Lists ExpressRoute gateways in a given resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGatewayList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGatewayList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGatewayList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_gateways_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGatewayList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + put_express_route_gateway_parameters: "_models.ExpressRouteGateway", + **kwargs: Any + ) -> "_models.ExpressRouteGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(put_express_route_gateway_parameters, 'ExpressRouteGateway') + + request = build_express_route_gateways_create_or_update_request_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + express_route_gateway_name: str, + put_express_route_gateway_parameters: "_models.ExpressRouteGateway", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteGateway"]: + """Creates or updates a ExpressRoute gateway in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param put_express_route_gateway_parameters: Parameters required in an ExpressRoute gateway PUT + operation. + :type put_express_route_gateway_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + put_express_route_gateway_parameters=put_express_route_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + def _update_tags_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + express_route_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.ExpressRouteGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(express_route_gateway_parameters, 'TagsObject') + + request = build_express_route_gateways_update_tags_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_tags_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_tags_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + + @distributed_trace + def begin_update_tags( + self, + resource_group_name: str, + express_route_gateway_name: str, + express_route_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteGateway"]: + """Updates express route gateway tags. + + :param resource_group_name: The resource group name of the ExpressRouteGateway. + :type resource_group_name: str + :param express_route_gateway_name: The name of the gateway. + :type express_route_gateway_name: str + :param express_route_gateway_parameters: Parameters supplied to update a virtual wan express + route gateway tags. + :type express_route_gateway_parameters: ~azure.mgmt.network.v2021_08_01.models.TagsObject + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteGateway or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + express_route_gateway_parameters=express_route_gateway_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update_tags.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteGateway": + """Fetches the details of a ExpressRoute gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_gateways_get_request( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_gateways_delete_request_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway + resource can only be deleted when there are no connection subresources. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}"} # type: ignore +class ExpressRouteConnectionsOperations(object): + """ExpressRouteConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + put_express_route_connection_parameters: "_models.ExpressRouteConnection", + **kwargs: Any + ) -> "_models.ExpressRouteConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(put_express_route_connection_parameters, 'ExpressRouteConnection') + + request = build_express_route_connections_create_or_update_request_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + put_express_route_connection_parameters: "_models.ExpressRouteConnection", + **kwargs: Any + ) -> LROPoller["_models.ExpressRouteConnection"]: + """Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :param put_express_route_connection_parameters: Parameters required in an + ExpressRouteConnection PUT operation. + :type put_express_route_connection_parameters: + ~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteConnection or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + put_express_route_connection_parameters=put_express_route_connection_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteConnection": + """Gets the specified ExpressRouteConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the ExpressRoute connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_connections_get_request( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_connections_delete_request_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a connection to a ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteConnectionList": + """Lists ExpressRouteConnections. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteConnectionList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.ExpressRouteConnectionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnectionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_express_route_connections_list_request( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteConnectionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections"} # type: ignore + +class VirtualHubBgpConnectionOperations(object): + """VirtualHubBgpConnectionOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.BgpConnection": + """Retrieves the details of a Virtual Hub Bgp Connection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BgpConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.BgpConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_bgp_connection_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + parameters: "_models.BgpConnection", + **kwargs: Any + ) -> "_models.BgpConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'BgpConnection') + + request = build_virtual_hub_bgp_connection_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + parameters: "_models.BgpConnection", + **kwargs: Any + ) -> LROPoller["_models.BgpConnection"]: + """Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing + VirtualHubBgpConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :param parameters: Parameters of Bgp connection. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.BgpConnection + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either BgpConnection or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.BgpConnection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('BgpConnection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_bgp_connection_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a VirtualHubBgpConnection. + + :param resource_group_name: The resource group name of the VirtualHubBgpConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}"} # type: ignore +class VirtualHubBgpConnectionsOperations(object): + """VirtualHubBgpConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVirtualHubBgpConnectionResults"]: + """Retrieves the details of all VirtualHubBgpConnections. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubBgpConnectionResults or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubBgpConnectionResults] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubBgpConnectionResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hub_bgp_connections_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hub_bgp_connections_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubBgpConnectionResults", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections"} # type: ignore + + def _list_learned_routes_initial( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> Optional["_models.PeerRouteList"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PeerRouteList"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_bgp_connections_list_learned_routes_request_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_learned_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_learned_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes"} # type: ignore + + + @distributed_trace + def begin_list_learned_routes( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> LROPoller["_models.PeerRouteList"]: + """Retrieves a list of routes the virtual hub bgp connection has learned. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param hub_name: The name of the virtual hub. + :type hub_name: str + :param connection_name: The name of the virtual hub bgp connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PeerRouteList or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PeerRouteList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerRouteList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_learned_routes_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PeerRouteList', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_learned_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes"} # type: ignore + + def _list_advertised_routes_initial( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> Optional["_models.PeerRouteList"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PeerRouteList"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_bgp_connections_list_advertised_routes_request_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._list_advertised_routes_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_advertised_routes_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes"} # type: ignore + + + @distributed_trace + def begin_list_advertised_routes( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> LROPoller["_models.PeerRouteList"]: + """Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param hub_name: The name of the virtual hub. + :type hub_name: str + :param connection_name: The name of the virtual hub bgp connection. + :type connection_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PeerRouteList or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.PeerRouteList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerRouteList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_advertised_routes_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PeerRouteList', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_advertised_routes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes"} # type: ignore +class VirtualHubIpConfigurationOperations(object): + """VirtualHubIpConfigurationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + **kwargs: Any + ) -> "_models.HubIpConfiguration": + """Retrieves the details of a Virtual Hub Ip configuration. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubIpConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.HubIpConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_ip_configuration_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + parameters: "_models.HubIpConfiguration", + **kwargs: Any + ) -> "_models.HubIpConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'HubIpConfiguration') + + request = build_virtual_hub_ip_configuration_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + parameters: "_models.HubIpConfiguration", + **kwargs: Any + ) -> LROPoller["_models.HubIpConfiguration"]: + """Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing + VirtualHubIpConfiguration. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :param parameters: Hub Ip Configuration parameters. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.HubIpConfiguration + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either HubIpConfiguration or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.HubIpConfiguration] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + parameters=parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_virtual_hub_ip_configuration_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a VirtualHubIpConfiguration. + + :param resource_group_name: The resource group name of the VirtualHubBgpConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> Iterable["_models.ListVirtualHubIpConfigurationResults"]: + """Retrieves the details of all VirtualHubIpConfigurations. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubIpConfigurationResults or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListVirtualHubIpConfigurationResults] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubIpConfigurationResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_virtual_hub_ip_configuration_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_virtual_hub_ip_configuration_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListVirtualHubIpConfigurationResults", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations"} # type: ignore +class HubRouteTablesOperations(object): + """HubRouteTablesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + route_table_parameters: "_models.HubRouteTable", + **kwargs: Any + ) -> "_models.HubRouteTable": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(route_table_parameters, 'HubRouteTable') + + request = build_hub_route_tables_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HubRouteTable', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubRouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + route_table_parameters: "_models.HubRouteTable", + **kwargs: Any + ) -> LROPoller["_models.HubRouteTable"]: + """Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. + :type route_table_name: str + :param route_table_parameters: Parameters supplied to create or update RouteTable. + :type route_table_parameters: ~azure.mgmt.network.v2021_08_01.models.HubRouteTable + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either HubRouteTable or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.HubRouteTable] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + route_table_parameters=route_table_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('HubRouteTable', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> "_models.HubRouteTable": + """Retrieves the details of a RouteTable. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubRouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.HubRouteTable + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_hub_route_tables_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubRouteTable', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_hub_route_tables_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a RouteTable. + + :param resource_group_name: The resource group name of the RouteTable. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. + :type route_table_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> Iterable["_models.ListHubRouteTablesResult"]: + """Retrieves the details of all RouteTables. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListHubRouteTablesResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListHubRouteTablesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListHubRouteTablesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_hub_route_tables_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_hub_route_tables_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListHubRouteTablesResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables"} # type: ignore +class RoutingIntentOperations(object): + """RoutingIntentOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + routing_intent_parameters: "_models.RoutingIntent", + **kwargs: Any + ) -> "_models.RoutingIntent": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(routing_intent_parameters, 'RoutingIntent') + + request = build_routing_intent_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RoutingIntent', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RoutingIntent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + routing_intent_parameters: "_models.RoutingIntent", + **kwargs: Any + ) -> LROPoller["_models.RoutingIntent"]: + """Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. + + :param resource_group_name: The resource group name of the RoutingIntent. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the per VirtualHub singleton Routing Intent resource. + :type routing_intent_name: str + :param routing_intent_parameters: Parameters supplied to create or update RoutingIntent. + :type routing_intent_parameters: ~azure.mgmt.network.v2021_08_01.models.RoutingIntent + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either RoutingIntent or the result of + cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_08_01.models.RoutingIntent] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + routing_intent_parameters=routing_intent_parameters, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('RoutingIntent', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + **kwargs: Any + ) -> "_models.RoutingIntent": + """Retrieves the details of a RoutingIntent. + + :param resource_group_name: The resource group name of the RoutingIntent. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the RoutingIntent. + :type routing_intent_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RoutingIntent, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.RoutingIntent + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_routing_intent_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RoutingIntent', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_routing_intent_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + virtual_hub_name: str, + routing_intent_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a RoutingIntent. + + :param resource_group_name: The resource group name of the RoutingIntent. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the RoutingIntent. + :type routing_intent_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}"} # type: ignore + + @distributed_trace + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> Iterable["_models.ListRoutingIntentResult"]: + """Retrieves the details of all RoutingIntent child resources of the VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListRoutingIntentResult or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.ListRoutingIntentResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListRoutingIntentResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_routing_intent_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_routing_intent_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ListRoutingIntentResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent"} # type: ignore +class WebApplicationFirewallPoliciesOperations(object): + """WebApplicationFirewallPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_08_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.WebApplicationFirewallPolicyListResult"]: + """Lists all of the protection policies within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_web_application_firewall_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_web_application_firewall_policies_list_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WebApplicationFirewallPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"} # type: ignore + + @distributed_trace + def list_all( + self, + **kwargs: Any + ) -> Iterable["_models.WebApplicationFirewallPolicyListResult"]: + """Gets all the WAF policies in a subscription. + + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_web_application_firewall_policies_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_web_application_firewall_policies_list_all_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WebApplicationFirewallPolicyListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> "_models.WebApplicationFirewallPolicy": + """Retrieve protection policy with specified 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 policy. + :type policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_web_application_firewall_policies_get_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + policy_name: str, + parameters: "_models.WebApplicationFirewallPolicy", + **kwargs: Any + ) -> "_models.WebApplicationFirewallPolicy": + """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 policy. + :type policy_name: str + :param parameters: Policy to be created. + :type parameters: ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicy + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_08_01.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'WebApplicationFirewallPolicy') + + request = build_web_application_firewall_policies_create_or_update_request( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}"} # type: ignore + + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + + + request = build_web_application_firewall_policies_delete_request_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param policy_name: The name of the policy. + :type policy_name: str + :keyword api_version: Api Version. Default value is "2021-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2021-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}"} # type: ignore diff --git a/src/azure-firewall/setup.py b/src/azure-firewall/setup.py index 672cb496da7..1a37cc45b21 100644 --- a/src/azure-firewall/setup.py +++ b/src/azure-firewall/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "0.13.0" +VERSION = "0.14.0" CLASSIFIERS = [ 'Development Status :: 4 - Beta',